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 389010 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]
extract xattrs before writing file data
tar-1.19-xattr-first.patch (text/plain), 3.00 KB, created by
Andreas Dilger
on 2010-02-05 08:11:02 UTC
(
hide
)
Description:
extract xattrs before writing file data
Filename:
MIME Type:
Creator:
Andreas Dilger
Created:
2010-02-05 08:11:02 UTC
Size:
3.00 KB
patch
obsolete
>Signed-off-by: Andreas Dilger <adilger@sun.com> >Signed-off-by: Girish Shilamkar <girish.shilamkar@sun.com> > >Index: tar-1.22.sun1/src/extract.c >=================================================================== >--- tar-1.22.sun1.orig/src/extract.c >+++ tar-1.22.sun1/src/extract.c >@@ -297,7 +297,6 @@ set_stat (char const *file_name, > > xattrs_acls_set(st, file_name, typeflag); > xattrs_selinux_set(st, file_name, typeflag); >- xattrs_xattrs_set(st, file_name, typeflag); > > if (0 < same_owner_option && permstatus != INTERDIR_PERMSTATUS) > { >@@ -592,6 +591,31 @@ maybe_recoverable (char *file_name, int > } > } > >+/* 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,13 +777,17 @@ extract_dir (char *file_name, int typefl > > > 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 >- | (old_files_option == OVERWRITE_OLD_FILES >- ? O_TRUNC >- : O_EXCL)); >+ | (old_files_option == OVERWRITE_OLD_FILES >+ ? O_TRUNC >+ : O_EXCL)); >+ >+ /* File might be created in set_xattr. So clear O_EXCL to avoid open() failure */ >+ if (file_created) >+ openflag = openflag & ~O_EXCL; > > #if O_CTG > /* Contiguous files (on the Masscomp) have to specify the size in >@@ -817,8 +845,18 @@ extract_file (char *file_name, int typef > } > 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)
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