| To: | Gustavo Homem <gustavo@xxxxxxxxxxxx> |
|---|---|
| Subject: | Re: bug 280 / your patch |
| From: | Eric Sandeen <sandeen@xxxxxxx> |
| Date: | Sun, 14 Nov 2004 10:57:38 -0600 |
| Cc: | linux-xfs@xxxxxxxxxxx, s.hetze@xxxxxxxxxxx, hch@xxxxxxx |
| In-reply-to: | <200411141601.01782.gustavo@login.com.pt> |
| References: | <200411141601.01782.gustavo@login.com.pt> |
| Sender: | linux-xfs-bounce@xxxxxxxxxxx |
| User-agent: | Mozilla Thunderbird 0.9 (Macintosh/20041103) |
Gustavo Homem wrote:
Hello,
However this bug was opened a long time after, on
Just to be sure, if you could check it in the latest cvs kernel, or even the latest kernel.org kernel, that would be useful information. I took a look at the webCVS interface but I can't request version 1.335 of xfs_inode.c Here is the patch as it was checked in in 2002. However, I don't think it addresses the aclc problem: =========================================================================== linux/Documentation/filesystems/xfs.txt =========================================================================== --- a/linux/Documentation/filesystems/xfs.txt 2004-11-14 10:49:21.000000000 -0600 +++ b/linux/Documentation/filesystems/xfs.txt 2004-11-14 10:49:21.000000000 -0600 @@ -32,6 +32,12 @@ dmapi/xdsm Enable the DMAPI (Data Management API) event callouts. + irixsgid
+ Do not inherit the ISGID bit on subdirectories of ISGID
+ directories, if the process creating the subdirectory
+ is not a member of the parent directory group ID.
+ This matches IRIX behavior.
+
logbufs=value
Set the number of in-memory log buffers. Valid numbers range
from 2-8 inclusive.=========================================================================== linux/fs/xfs/linux/xfs_super.c =========================================================================== --- a/linux/fs/xfs/linux/xfs_super.c 2004-11-14 10:49:21.000000000 -0600 +++ b/linux/fs/xfs/linux/xfs_super.c 2004-11-14 10:49:21.000000000 -0600 @@ -113,6 +113,7 @@ #define MNTOPT_RO "ro" /* read only */ #define MNTOPT_RW "rw" /* read/write */ #define MNTOPT_NOUUID "nouuid" /* Ignore FS uuid */ +#define MNTOPT_IRIXSGID "irixsgid" /* Irix-style sgid inheritance */ STATIC int xfs_parseargs( @@ -239,6 +240,8 @@ args->flags |= MS_NOSUID; } else if (!strcmp(this_char, MNTOPT_NOUUID)) { args->flags |= XFSMNT_NOUUID; + } else if (!strcmp(this_char, MNTOPT_IRIXSGID)) { + args->flags |= XFSMNT_IRIXSGID; } else { printk("XFS: unknown mount option [%s].\n", this_char); return rval; =========================================================================== linux/fs/xfs/xfs_clnt.h =========================================================================== --- a/linux/fs/xfs/xfs_clnt.h 2004-11-14 10:49:21.000000000 -0600 +++ b/linux/fs/xfs/xfs_clnt.h 2004-11-14 10:49:21.000000000 -0600 @@ -123,6 +123,7 @@ #define XFSMNT_NOUUID 0x01000000 /* Ignore fs uuid */ #define XFSMNT_32BITINODES 0x02000000 /* restrict inodes to 32 * bits of address space */ +#define XFSMNT_IRIXSGID 0x04000000 /* Irix-style sgid inheritance */ /* Did we get any args for CXFS to consume? */ #define XFSARGS_FOR_CXFSARR(ap) \ =========================================================================== linux/fs/xfs/xfs_inode.c =========================================================================== --- a/linux/fs/xfs/xfs_inode.c 2004-11-14 10:49:21.000000000 -0600 +++ b/linux/fs/xfs/xfs_inode.c 2004-11-14 10:49:21.000000000 -0600 @@ -1098,10 +1098,11 @@ /* * If the group ID of the new file does not match the effective group * ID or one of the supplementary group IDs, the ISGID bit is - * cleared. + * cleared if the "irixsgid" mount option is set. */ if (ip->i_d.di_mode & ISGID) { - if (!in_group_p((gid_t)ip->i_d.di_gid) && !capable(CAP_FSETID)){ + if (!in_group_p((gid_t)ip->i_d.di_gid) + && (ip->i_mount->m_flags & XFS_MOUNT_IRIXSGID)) { ip->i_d.di_mode &= ~ISGID; } } =========================================================================== linux/fs/xfs/xfs_mount.h =========================================================================== --- a/linux/fs/xfs/xfs_mount.h 2004-11-14 10:49:21.000000000 -0600 +++ b/linux/fs/xfs/xfs_mount.h 2004-11-14 10:49:21.000000000 -0600 @@ -341,6 +341,7 @@ #define XFS_MOUNT_NOUUID 0x00004000 /* ignore uuid during mount */ #define XFS_MOUNT_32BITINODES 0x00008000 /* do not create inodes above * 32 bits in size */ +#define XFS_MOUNT_IRIXSGID 0x00010000 /* Irix-style sgid inheritance */ /* * Flags for m_cxfstype =========================================================================== linux/fs/xfs/xfs_vfsops.c =========================================================================== --- a/linux/fs/xfs/xfs_vfsops.c 2004-11-14 10:49:21.000000000 -0600
+++ b/linux/fs/xfs/xfs_vfsops.c 2004-11-14 10:49:21.000000000 -0600
@@ -363,6 +363,9 @@
if (ap->flags & XFSMNT_32BITINODES)
mp->m_flags |= XFS_MOUNT_32BITINODES;+ if (ap->flags & XFSMNT_IRIXSGID)
+ mp->m_flags |= XFS_MOUNT_IRIXSGID;
+
if (ap->flags & XFSMNT_IOSIZE) {
if (ap->iosizelog > XFS_MAX_IO_LOG ||
ap->iosizelog < XFS_MIN_IO_LOG) { |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | bug 280 / your patch, Gustavo Homem |
|---|---|
| Next by Date: | [Bug 385] New: xfs_force_shutdown(loop7,0x1) called from line 353 of file fs/xfs/xfs_rw.c, bugzilla-daemon |
| Previous by Thread: | bug 280 / your patch, Gustavo Homem |
| Next by Thread: | Re: bug 280 / your patch, Gustavo Homem |
| Indexes: | [Date] [Thread] [Top] [All Lists] |