search for: xattr_size_max

Displaying 12 results from an estimated 12 matches for "xattr_size_max".

2009 Dec 23
1
[PATCH] ocfs2/trivial: Use le16_to_cpu for a disk value in xattr.c
...lock *sb, * to the extent block, so just calculate a maximum record num. */ if (!xv->xr_list.l_tree_depth) - *num_recs += xv->xr_list.l_next_free_rec; + *num_recs += le16_to_cpu(xv->xr_list.l_next_free_rec); else *num_recs += ocfs2_clusters_for_bytes(sb, XATTR_SIZE_MAX); -- 1.5.5
2020 Mar 12
0
[PATCH libguestfs 1/3] daemon: xattr: Refactor code which splits attr names from the kernel.
...; - vlen = getxattr (path, &buf[i], NULL, 0); + vlen = getxattr (path, names[i], NULL, 0); CHROOT_OUT; if (vlen == -1) { - reply_with_perror ("getxattr"); + reply_with_perror ("%s: getxattr", names[i]); goto error; } if (vlen > XATTR_SIZE_MAX) { /* The next call to getxattr will fail anyway, so ... */ - reply_with_error ("extended attribute is too large"); + reply_with_error ("%s: extended attribute is too large", names[i]); goto error; } - r->guestfs_int_xattr_list_val[j].attrnam...
2020 Mar 16
0
[PATCH libguestfs v2 1/3] daemon: xattr: Refactor code which splits attr names from the kernel.
...; - vlen = getxattr (path, &buf[i], NULL, 0); + vlen = getxattr (path, names[i], NULL, 0); CHROOT_OUT; if (vlen == -1) { - reply_with_perror ("getxattr"); + reply_with_perror ("getxattr: %s", names[i]); goto error; } if (vlen > XATTR_SIZE_MAX) { /* The next call to getxattr will fail anyway, so ... */ - reply_with_error ("extended attribute is too large"); + reply_with_error ("%s: extended attribute is too large", names[i]); goto error; } - r->guestfs_int_xattr_list_val[j].attrnam...
2014 Apr 30
2
[PATCH] daemon: xattr: factorize do_getxattr and do_lgetxattr
...getxattr (const char *path, const char *name, size_t *size_r) { - ssize_t r; - char *buf; - size_t len; - - CHROOT_IN; - r = lgetxattr (path, name, NULL, 0); - CHROOT_OUT; - if (r == -1) { - reply_with_perror ("lgetxattr"); - return NULL; - } - - len = r; - - if (len > XATTR_SIZE_MAX) { - reply_with_error ("extended attribute is too large"); - return NULL; - } - - buf = malloc (len); - if (buf == NULL) { - reply_with_perror ("malloc"); - return NULL; - } - - CHROOT_IN; - r = lgetxattr (path, name, buf, len); - CHROOT_OUT; - if (r == -1) {...
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
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.
2012 May 28
0
NTFS(-3g) large alternate data streams
...hat actually fails is the kernel call: > > vlen = getxattr (path, /* name of xattr */, > /* return pointer */, > /* ~ 48 MB */); > > because I was wrong before when I said there was no limit at all. In > fact the limit in the kernel is XATTR_SIZE_MAX == 65536. > > So essentially there is no chance of returning ADSes using the > standard way. You'll have to use the ntfs-3g streams_interface=windows > mount option. > > Rich. > > -- > Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones...
2014 Jan 07
8
RFC: copy-attributes command
Hi, attached there is a prototype of patch for adding a new copy-attributes command. Such command would allow copy the attributes of 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
2014 Jan 13
0
[PATCH] New API: copy-attributes.
...*/ + for (i = 0; i < (size_t) len; i += strlen (&buf[i]) + 1) { + CHROOT_IN; + vlen = getxattr (src, &buf[i], NULL, 0); + CHROOT_OUT; + if (vlen == -1) { + reply_with_perror ("getxattr: %s, %s", src, &buf[i]); + goto error; + } + + if (vlen > XATTR_SIZE_MAX) { + /* The next call to getxattr will fail anyway, so ... */ + reply_with_error ("extended attribute is too large"); + goto error; + } + + if (vlen > attrval_len) { + char *new = realloc (attrval, vlen); + if (new == NULL) { + reply_with_perror (&...
2014 Jan 07
0
Re: RFC: copy-attributes command
...trlen (&buf[i]) + 1) { > + CHROOT_IN; > + vlen = getxattr (src, &buf[i], NULL, 0); > + CHROOT_OUT; > + if (vlen == -1) { > + reply_with_perror ("getxattr: %s, %s", src, &buf[i]); > + goto error; > + } > + > + if (vlen > XATTR_SIZE_MAX) { > + /* The next call to getxattr will fail anyway, so ... */ > + reply_with_error ("extended attribute is too large"); > + goto error; > + } > + > + if (vlen > attrval_len) { > + char *new = realloc (attrval, vlen); > + if (new...
2014 Jan 10
4
Re: RFC: copy-attributes command
...OOT_IN; > > + vlen = getxattr (src, &buf[i], NULL, 0); > > + CHROOT_OUT; > > + if (vlen == -1) { > > + reply_with_perror ("getxattr: %s, %s", src, &buf[i]); > > + goto error; > > + } > > + > > + if (vlen > XATTR_SIZE_MAX) { > > + /* The next call to getxattr will fail anyway, so ... */ > > + reply_with_error ("extended attribute is too large"); > > + goto error; > > + } > > + > > + if (vlen > attrval_len) { > > + char *new = realloc (a...
2008 Oct 17
3
[PATCH 0/3] ocfs2: add security EA and ACL support v3
Hi, These three patches fix the problems in the version two. And them base on the Tao's patches: ocfs2/xattr: xattr improvement The first patch fix some problem in xattr code. The second patch add security EA support. The third patch add ACL support. Best regards, tiger