Summary: | под unionfs не работает passwd | ||||||
---|---|---|---|---|---|---|---|
Product: | Sisyphus | Reporter: | Anton Farygin <rider> | ||||
Component: | kernel-image-std-smp | Assignee: | Sergey Vlasov <vsu> | ||||
Status: | NEW --- | QA Contact: | qa-sisyphus | ||||
Severity: | normal | ||||||
Priority: | P2 | CC: | silicium, stanv | ||||
Version: | unstable | ||||||
Hardware: | all | ||||||
OS: | Linux | ||||||
Attachments: |
|
Description
Anton Farygin
2007-08-09 16:48:12 MSD
Эксперемент на LiveCD: [root@localhost] # chmod 2710 /etc/tcb/altlinux католог /etc/tcb/altlinux получает законные права drwx--s--- владелецом каталога /etc/tcb/altlinux является: user (uid) auth (gid) [user@localhost] $ touch /etc/tcb/altlinux/test_file [root@localhost] # ls -l /etc/tcb/altlinux/test_file -rw-r--r-- 1 user user 0 Aug 21 06:49 test_file вместо: -rw-r--r-- 1 user auth 0 Aug 21 06:49 test_file т.е. unionfs не отрабатывает флаг SGID для каталога. Created attachment 2158 [details]
можно попробовать приложить этот патч
Вот что ответили по поводу моего патча, разработчики unionfs: 1. -------------------------------------------------------------------------- On Tue, Aug 21, 2007 at 10:11:51AM +0400, Andrew Stepanov wrote: > > Hello. > > > > I have LiveCD. > > > > Mount options are like this: > > > > /mnt/root//etc /etc unionfs > > rw,dirs=/mnt/root/etc=rw:/etc=ro,debug=4294967295,delete=whiteout 0 0 Which version of unionfs is this? It looks old. Unionfs 2.x doesn't support the debug/delete mount options - no need for them really. > > CD-ROM contain /etc/tcb/user directory with 'drwx--x---' rights > > > > [root@localhost~] # chmod 2710 /etc/tcb/user directory now with > > 'drwx--s---' rights > > > > /etc/tcb/user is owned by 'user' (uid) and 'auth' (gid) > > > > [user@localhost~] $ touch /etc/tcb/user/test_file > > [user@localhost~] $ ls -l /etc/tcb/user/test_file > > -rw-r--r-- 1 user user 0 Aug 21 06:49 test_file > > Instead of: > > -rw-r--r-- 1 user auth 0 Aug 21 06:49 test_file Good catch. > > Please, see attached patch. Does it solve this problem ? > > > > Thanks. > > diff -ruN linux-2.6.18/fs/unionfs/inode.c linux-2.6.18-modified/fs/unionfs/inode.c > > --- linux-2.6.18/fs/unionfs/inode.c 2007-08-20 16:23:45 +0400 > > +++ linux-2.6.18-modified/fs/unionfs/inode.c 2007-08-20 16:20:44 +0400 > > @@ -85,7 +85,12 @@ > > > > newattrs.ia_mode = mode & ~current->fs->umask; > > newattrs.ia_uid = current->fsuid; > > - newattrs.ia_gid = current->fsgid; > > + else if (parent->i_mode & S_ISGID) { I'm a little bit confused about the above 'else' keyword (could be that you're looking at 1.x code which is different quite a bit), but otherwise I think idea is sane. Josef 'Jeff' Sipek. > > + newattrs.i_gid = parent->i_gid; > > + if (S_ISDIR(mode)) > > + mode |= S_ISGID; > > + } else > > + newattrs.ia_gid = current->fsgid; > > > > if (wh_dentry->d_inode->i_size != 0) { > > newattrs.ia_valid |= ATTR_SIZE; 2. -------------------------------------------------------------------------- Andrew, I've verified that the SGID bug doesn't exist in Unionfs-2.1. As Jeff hinted, you're probably using Unionfs 1.x, right? If so, we strongly recommend you upgrade to 2.1 -- this and many bugs are fixed. Erez. Проблема актуальна? Надо проверять на LiveCD. |