search for: copy_xattrs

Displaying 20 results from an estimated 34 matches for "copy_xattrs".

2014 Jan 10
2
Re: RFC: copy-attributes command
On Fri, Jan 10, 2014 at 05:36:39PM +0100, Pino Toscano wrote: > +int > +copy_xattrs (const char *src, const char *dest) > +{ > + abort (); > +} Is this called in the case where someone does copy-attributes foo bar xattributes:true on a version of libguestfs with no support for xattrs? It's probably better to silently ignore this case instead of crashing. Rich....
2014 Jan 07
8
RFC: copy-attributes command
...f a "file" to another, so for example in guestfish: copy-attributes foo bar permissions:true xattributes:false would only copy the permissions of foo to bar, not copying its extended attributes too. Just few notes: - my first daemon command, so possibly I could be missing something - copy_xattrs is in xattr.c to avoid spreading the usage of xattr API in many places - copy_xattrs does a bit of code repetition with other stuff in xattr.c, but I'm not sure how to avoid it without making the xattr listing code (getxattrs) a bit more complex that what it is already Comments? -- Pin...
2014 Jan 07
0
Re: RFC: copy-attributes command
...butes:false > would only copy the permissions of foo to bar, not copying its extended > attributes too. I think the general idea of the new API is fine. More comments about the code below. > Just few notes: > - my first daemon command, so possibly I could be missing something > - copy_xattrs is in xattr.c to avoid spreading the usage of xattr API in > many places > - copy_xattrs does a bit of code repetition with other stuff in xattr.c, > but I'm not sure how to avoid it without making the xattr listing code > (getxattrs) a bit more complex that what it is already...
2023 Jun 10
0
[Bug 15393] New: rsync attempts to set extended attributes while in dry-run
...11 with rsync 3.2.3 Fedora 38 with rsync 3.2.7 Creating the following environment: mkdir -p src/x cmp/x dst/ setfattr -n user.foo -v bar cmp/x Executing the following command: rsync --recursive --xattrs --dry-run --compare-dest=../cmp/ src/ dst/ Results in the following error: rsync: [generator] copy_xattrs: lsetxattr("/home/user/dst/x","user.foo") failed: No such file or directory (2) The issue only seems to occur if: x is a directory (inside another, not as a direct argument) --recursive, --xattrs and --dry-run are set --compare-dest, --copy-dest or --link-dest are set The erro...
2014 Jan 13
0
[PATCH] New API: copy-attributes.
...h diff --git a/daemon/daemon.h b/daemon/daemon.h index b77d764..6535658 100644 --- a/daemon/daemon.h +++ b/daemon/daemon.h @@ -231,6 +231,9 @@ extern void journal_finalize (void); /*-- in proto.c --*/ extern void main_loop (int sock) __attribute__((noreturn)); +/*-- in xattr.c --*/ +extern int copy_xattrs (const char *src, const char *dest); + /* ordinary daemon functions use these to indicate errors * NB: you don't need to prefix the string with the current command, * it is added automatically by the client-side RPC stubs. diff --git a/daemon/file.c b/daemon/file.c index f348f87..856ab5f 1...
2020 Mar 16
6
[PATCH libguestfs v2 0/3] daemon: Fix various commands which break on NTFS-3g compressed files.
v1 here: https://www.redhat.com/archives/libguestfs/2020-March/msg00099.html This one fixes most of the points picked up in review, and does not strdup the strings which should keep down memory usage if that is a concern. Rich.
2014 Jan 10
0
Re: RFC: copy-attributes command
On Friday 10 January 2014 16:55:38 Richard W.M. Jones wrote: > On Fri, Jan 10, 2014 at 05:36:39PM +0100, Pino Toscano wrote: > > +int > > +copy_xattrs (const char *src, const char *dest) > > +{ > > + abort (); > > +} > > Is this called in the case where someone does > > copy-attributes foo bar xattributes:true > > on a version of libguestfs with no support for xattrs? It's probably > better to sil...
2020 Mar 12
0
[PATCH libguestfs 1/3] daemon: xattr: Refactor code which splits attr names from the kernel.
...attrnames[i], + entry[i+1].attrval.attrval_val, vlen); CHROOT_OUT; if (vlen == -1) { - reply_with_perror ("getxattr"); + reply_with_perror ("%s: getxattr", attrnames[i]); goto error; } } @@ -510,6 +538,7 @@ copy_xattrs (const char *src, const char *dest) { ssize_t len, vlen, ret, attrval_len = 0; CLEANUP_FREE char *buf = NULL, *attrval = NULL; + CLEANUP_FREE_STRING_LIST char **names = NULL; size_t i; buf = _listxattrs (src, listxattr, &len); @@ -517,21 +546,22 @@ copy_xattrs (const char *src,...
2020 Mar 16
0
[PATCH libguestfs v2 1/3] daemon: xattr: Refactor code which splits attr names from the kernel.
...attrnames[i], + entry[i+1].attrval.attrval_val, vlen); CHROOT_OUT; if (vlen == -1) { - reply_with_perror ("getxattr"); + reply_with_perror ("getxattr: %s", attrnames[i]); goto error; } } @@ -510,6 +535,7 @@ copy_xattrs (const char *src, const char *dest) { ssize_t len, vlen, ret, attrval_len = 0; CLEANUP_FREE char *buf = NULL, *attrval = NULL; + CLEANUP_FREE /* not string list */ char **names = NULL; size_t i; buf = _listxattrs (src, listxattr, &len); @@ -517,21 +543,22 @@ copy_xattrs (const c...
2020 Mar 16
0
[PATCH libguestfs v2 3/3] daemon: xattr: Filter out user.WofCompressedData from xattrs (RHBZ#1811539).
...rnames_unfiltered = split_attr_names (buf, len); + if (attrnames_unfiltered == NULL) + goto error; + attrnames = filter_list (not_hidden_xattr, attrnames_unfiltered); if (attrnames == NULL) goto error; nr_attrs = guestfs_int_count_strings (attrnames); @@ -535,6 +568,7 @@ copy_xattrs (const char *src, const char *dest) { ssize_t len, vlen, ret, attrval_len = 0; CLEANUP_FREE char *buf = NULL, *attrval = NULL; + CLEANUP_FREE /* not string list */ char **names_unfiltered = NULL; CLEANUP_FREE /* not string list */ char **names = NULL; size_t i; @@ -543,7 +577,10 @@...
2014 Nov 12
1
[PATCH] daemon: check xfs label lengths (RHBZ#1162966).
...daemon/xfs.c | 6 ++++++ 3 files changed, 16 insertions(+) diff --git a/daemon/daemon.h b/daemon/daemon.h index 0ccbc9e..f442efd 100644 --- a/daemon/daemon.h +++ b/daemon/daemon.h @@ -253,6 +253,10 @@ extern void main_loop (int sock) __attribute__((noreturn)); /*-- in xattr.c --*/ extern int copy_xattrs (const char *src, const char *dest); +/*-- in xfs.c --*/ +/* Documented in xfs_admin(8). */ +#define XFS_LABEL_MAX 12 + /* ordinary daemon functions use these to indicate errors * NB: you don't need to prefix the string with the current command, * it is added automatically by the client-...
2020 Mar 12
8
[PATCH libguestfs 0/3] daemon: Fix various commands which break on NTFS-3g compressed files.
https://bugzilla.redhat.com/show_bug.cgi?id=1811539 Commands including virt-diff which read extended attributes will sometimes fail on NTFS filesystems that are using system compressed. The reason is complex, see comment 5 of the bug linked above. This patch filters out the troublesome xattr. For justification, see the comment I added in patch 3. Patch 1 & 2 are refactoring. I was on the
2015 Oct 27
1
[PATCHv2] Added xfs support to vfs_minimum_size.
...ize.c | 7 +++++++ daemon/xfs.c | 16 ++++++++++++++++ generator/actions.ml | 6 +++++- 4 files changed, 29 insertions(+), 1 deletion(-) diff --git a/daemon/daemon.h b/daemon/daemon.h index 4a969dd..1f0cd30 100644 --- a/daemon/daemon.h +++ b/daemon/daemon.h @@ -269,6 +269,7 @@ extern int copy_xattrs (const char *src, const char *dest); extern int xfs_set_uuid (const char *device, const char *uuid); extern int xfs_set_uuid_random (const char *device); extern int xfs_set_label (const char *device, const char *label); +extern int64_t xfs_minimum_size (const char *path); /*-- debug-bmap.c --*...
2014 Jan 10
4
Re: RFC: copy-attributes command
...ions of foo to bar, not copying its > > extended attributes too. > > I think the general idea of the new API is fine. > > More comments about the code below. > > > Just few notes: > > - my first daemon command, so possibly I could be missing something > > - copy_xattrs is in xattr.c to avoid spreading the usage of xattr > > API in> > > many places > > > > - copy_xattrs does a bit of code repetition with other stuff in > > xattr.c,> > > but I'm not sure how to avoid it without making the xattr listing > >...
2015 Jul 02
1
[PATCH v6] New API: set_uuid_random
...is true up to ext4 from the Linux sources. */ #define EXT2_LABEL_MAX 16 extern int fstype_is_extfs (const char *fstype); +extern int ext_set_uuid_random (const char *device); /*-- in blkid.c --*/ extern char *get_blkid_tag (const char *device, const char *tag); @@ -265,6 +266,7 @@ extern int copy_xattrs (const char *src, const char *dest); /* Documented in xfs_admin(8). */ #define XFS_LABEL_MAX 12 extern int xfs_set_uuid (const char *device, const char *uuid); +extern int xfs_set_uuid_random (const char *device); /*-- debug-bmap.c --*/ extern char *debug_bmap (const char *subcmd, size_t arg...
2015 Jun 24
0
[PATCH 3/5] uuid: use newly introduced do_xfs_admin_uuid of xfs
...t; --- daemon/daemon.h | 1 + daemon/uuids.c | 12 +----------- daemon/xfs.c | 7 +++++++ 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/daemon/daemon.h b/daemon/daemon.h index eeb4ff7..aba6ef2 100644 --- a/daemon/daemon.h +++ b/daemon/daemon.h @@ -261,6 +261,7 @@ extern int copy_xattrs (const char *src, const char *dest); /*-- in xfs.c --*/ /* Documented in xfs_admin(8). */ #define XFS_LABEL_MAX 12 +extern int do_xfs_admin_uuid (const char *device, const char *uuid); /*-- debug-bmap.c --*/ extern char *debug_bmap (const char *subcmd, size_t argc, char *const *const argv);...
2015 Jun 30
0
[PATCH v4 3/7] uuid: use newly introduced xfs_set_uuid of xfs
..._uuid daemon/daemon.h | 1 + daemon/uuids.c | 12 +----------- daemon/xfs.c | 7 +++++++ 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/daemon/daemon.h b/daemon/daemon.h index dd7798c..cbe8ada 100644 --- a/daemon/daemon.h +++ b/daemon/daemon.h @@ -262,6 +262,7 @@ extern int copy_xattrs (const char *src, const char *dest); /*-- in xfs.c --*/ /* Documented in xfs_admin(8). */ #define XFS_LABEL_MAX 12 +extern int xfs_set_uuid (const char *device, const char *uuid); /*-- debug-bmap.c --*/ extern char *debug_bmap (const char *subcmd, size_t argc, char *const *const argv); diff...
2014 Jan 09
1
Re: RFC: copy-attributes command
...fd4..97a94d5 100644 > > --- a/daemon/xattr.c > > +++ b/daemon/xattr.c > > @@ -545,8 +545,98 @@ do_lgetxattr (const char *path, const char > > *name, size_t *size_r)> > > return buf; /* caller frees */ > > > > } > > > > +int > > +copy_xattrs (const char *src, const char *dest) > > +{ > > +#if defined(HAVE_LISTXATTR) && defined(HAVE_GETXATTR) && > > defined(HAVE_SETXATTR) > I wonder if there are any platforms that lack one of listxattr, > getxattr and setxattr, but at the same time have one of the...
2015 Jun 30
0
[PATCH v4 6/7] daemon: add functions for setting random uuid of fs
...is is true up to ext4 from the Linux sources. */ #define EXT2_LABEL_MAX 16 extern int fstype_is_extfs (const char *fstype); +extern int set_e2uuid_random (const char *device); /*-- in blkid.c --*/ extern char *get_blkid_tag (const char *device, const char *tag); @@ -265,6 +266,7 @@ extern int copy_xattrs (const char *src, const char *dest); /* Documented in xfs_admin(8). */ #define XFS_LABEL_MAX 12 extern int xfs_set_uuid (const char *device, const char *uuid); +extern int xfs_set_uuid_random (const char *device); /*-- debug-bmap.c --*/ extern char *debug_bmap (const char *subcmd, size_t arg...
2015 Oct 24
3
[PATCH] Added xfs support for vfs_min_size.
...in-size.c | 7 +++++++ daemon/xfs.c | 12 ++++++++++++ generator/actions.ml | 6 +++++- 4 files changed, 25 insertions(+), 1 deletion(-) diff --git a/daemon/daemon.h b/daemon/daemon.h index 4a969dd..1f0cd30 100644 --- a/daemon/daemon.h +++ b/daemon/daemon.h @@ -269,6 +269,7 @@ extern int copy_xattrs (const char *src, const char *dest); extern int xfs_set_uuid (const char *device, const char *uuid); extern int xfs_set_uuid_random (const char *device); extern int xfs_set_label (const char *device, const char *label); +extern int64_t xfs_minimum_size (const char *path); /*-- debug-bmap.c --*...