Author: trasz Date: Wed Jul 22 15:15:58 2009 New Revision: 195822 URL: http://svn.freebsd.org/changeset/base/195822
Log: Fix extattr_list_file(2) on ZFS in case the attribute directory doesn't exist and user doesn't have write access to the file. Without this fix, it returns bogus value instead of 0. For some reason this didn't manifest on my kernel compiled with -O0. PR: kern/136601 Submitted by: Jaakko Heinonen <jh at saunalahti dot fi> Approved by: re (kib) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Wed Jul 22 14:37:53 2009 (r195821) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Wed Jul 22 15:15:58 2009 (r195822) @@ -4722,6 +4722,9 @@ vop_listextattr { ZFS_ENTER(zfsvfs); + if (sizep != NULL) + *sizep = 0; + error = zfs_lookup(ap->a_vp, NULL, &xvp, NULL, 0, ap->a_cred, td, LOOKUP_XATTR); if (error != 0) { @@ -4752,9 +4755,6 @@ vop_listextattr { auio.uio_rw = UIO_READ; auio.uio_offset = 0; - if (sizep != NULL) - *sizep = 0; - do { u_char nlen; _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"