Login
Log in using an SSO provider:
Fedora Account System
Red Hat Associate
Red Hat Customer
Login using a Red Hat Bugzilla account
Forgot Password
Create an Account
Red Hat Bugzilla – Attachment 388801 Details for
Bug 561855
[RFE] support for "lustre.*" extended attributes
Home
New
Search
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh90 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
[?]
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
[PATCH 2/2] xattrs: set attributes before extracting a file
0002-xattrs-set-attributes-before-extracting-a-file.patch (text/plain), 2.98 KB, created by
Kamil Dudka
on 2010-02-04 14:29:01 UTC
(
hide
)
Description:
[PATCH 2/2] xattrs: set attributes before extracting a file
Filename:
MIME Type:
Creator:
Kamil Dudka
Created:
2010-02-04 14:29:01 UTC
Size:
2.98 KB
patch
obsolete
>From e8c6308705767e39b1efd44aca20232ec692c9d1 Mon Sep 17 00:00:00 2001 >From: Kamil Dudka <kdudka@redhat.com> >Date: Thu, 4 Feb 2010 14:36:51 +0100 >Subject: [PATCH 2/2] xattrs: set attributes before extracting a file > >Signed-off-by: Kamil Dudka <kdudka@redhat.com> >--- > src/extract.c | 43 +++++++++++++++++++++++++++++++++++++++++-- > 1 files changed, 41 insertions(+), 2 deletions(-) > >diff --git a/src/extract.c b/src/extract.c >index 58c413e..c4f844e 100644 >--- a/src/extract.c >+++ b/src/extract.c >@@ -592,6 +592,31 @@ maybe_recoverable (char *file_name, int *interdir_made) > } > } > >+/* Restore stat extended attributes (xattr) for FILE_NAME, using information >+ given in *ST. Restore before extraction because they may affect layout. >+ If not restoring permissions, invert the >+ INVERT_PERMISSIONS bits from the file's current permissions. >+ TYPEFLAG specifies the type of the file. >+ FILE_CREATED indicates set_xattr has created the file */ >+static int >+set_xattr (char const *file_name, struct tar_stat_info const *st, >+ mode_t invert_permissions, char typeflag, int *file_created) >+{ >+ int status = 0; >+ int interdir_made = 0; >+ >+ if ((xattrs_option >= 0) && st->xattr_map_size) { >+ mode_t mode = current_stat_info.stat.st_mode & MODE_RWX & ~ current_umask; >+ >+ do >+ status = mknod (file_name, mode ^ invert_permissions, 0); >+ while (status && maybe_recoverable ((char *)file_name, &interdir_made)); >+ xattrs_xattrs_set(st, file_name, typeflag); >+ *file_created = 1; >+ } >+ return(status); >+} >+ > /* Fix the statuses of all directories whose statuses need fixing, and > which are not ancestors of FILE_NAME. If AFTER_LINKS is > nonzero, do this for all such directories; otherwise, stop at the >@@ -753,7 +778,7 @@ extract_dir (char *file_name, int typeflag) > > > static int >-open_output_file (char *file_name, int typeflag, mode_t mode) >+open_output_file (char *file_name, int typeflag, mode_t mode, int file_created) > { > int fd; > int openflag = (O_WRONLY | O_BINARY | O_CREAT >@@ -761,6 +786,10 @@ open_output_file (char *file_name, int typeflag, mode_t mode) > ? O_TRUNC > : O_EXCL)); > >+ /* File might be created in set_xattr. Clear O_EXCL to avoid open() error */ >+ if (file_created) >+ openflag = openflag & ~O_EXCL; >+ > #if O_CTG > /* Contiguous files (on the Masscomp) have to specify the size in > the open call that creates them. */ >@@ -817,8 +846,18 @@ extract_file (char *file_name, int typeflag) > } > else > { >+ int file_created = 0; >+ if (set_xattr (file_name, ¤t_stat_info, invert_permissions, >+ typeflag, &file_created)) >+ { >+ skip_member (); >+ open_error (file_name); >+ return 1; >+ } >+ > do >- fd = open_output_file (file_name, typeflag, mode ^ invert_permissions); >+ fd = open_output_file (file_name, typeflag, mode ^ invert_permissions, >+ file_created); > while (fd < 0 && maybe_recoverable (file_name, &interdir_made)); > > if (fd < 0) >-- >1.6.2.5 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 561855
:
388800
|
388801
|
389010
|
389012
|
389013
|
394722
|
395254