* reiser4 problem with pam_mktemp @ 2005-07-28 16:29 sergey ivanov 2005-07-31 13:34 ` Vladimir V. Saveliev 0 siblings, 1 reply; 7+ messages in thread From: sergey ivanov @ 2005-07-28 16:29 UTC (permalink / raw) To: reiserfs-list I have a problem with reiser4. Recently I have installed Altlinux Compact-rc2 on reiserfs (v3.6), patched kernel 2.6.12 with patch 2.6.12-mm2, created new reiser4 partition hda6 and copied by #cp -ax / /mnt/hda6 there. Fixed /etc/fstab and /boot/grub for new partition and booted. And could not login, with messages in virtual consoles : --- pam_tcb[8386]: login: Authentication passed for root from (uid=0) Login incorrect --- So I rebooted in original on reiserfs 3.6, edited /mnt/hda6/etc/inittab to change one of "/sbin/mingetty tty6" to be "/bin/bash" and after reboot to reiser4 based system saw, that the problem in pam_mktemp, by commenting out string # account required pam_mktemp.so in file /etc/pam.d/system_auth the problem get fixed. Also it get fixed if I create some non-reiser4 partition to place /tmp on it. With best regards, Sergey Ivanov ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: reiser4 problem with pam_mktemp 2005-07-28 16:29 reiser4 problem with pam_mktemp sergey ivanov @ 2005-07-31 13:34 ` Vladimir V. Saveliev 2005-08-10 3:41 ` sergey ivanov 0 siblings, 1 reply; 7+ messages in thread From: Vladimir V. Saveliev @ 2005-07-31 13:34 UTC (permalink / raw) To: sergey ivanov; +Cc: reiserfs-list Hello sergey ivanov wrote: > I have a problem with reiser4. > Recently I have installed Altlinux Compact-rc2 on reiserfs (v3.6), > patched kernel 2.6.12 with patch 2.6.12-mm2, created new reiser4 > partition hda6 and copied by #cp -ax / /mnt/hda6 there. Fixed /etc/fstab > and /boot/grub for new partition and booted. And could not login, with > messages in virtual consoles : > --- > > pam_tcb[8386]: login: Authentication passed for root from (uid=0) > Login incorrect > --- > So I rebooted in original on reiserfs 3.6, edited /mnt/hda6/etc/inittab to change one of "/sbin/mingetty tty6" to be "/bin/bash" and after reboot to reiser4 based system saw, that the problem in pam_mktemp, by commenting out string > # account required pam_mktemp.so > in file /etc/pam.d/system_auth the problem get fixed. > Also it get fixed if I create some non-reiser4 partition to place /tmp on it. > Thanks for the report. The problem is that reiser4 does not support ext2's file attributes pam_mktemp deals with. Maybe reiser4 should have support for that like reiserfs, but now it does not. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: reiser4 problem with pam_mktemp 2005-07-31 13:34 ` Vladimir V. Saveliev @ 2005-08-10 3:41 ` sergey ivanov 2005-08-10 12:14 ` Vladimir V. Saveliev 0 siblings, 1 reply; 7+ messages in thread From: sergey ivanov @ 2005-08-10 3:41 UTC (permalink / raw) To: Vladimir V. Saveliev; +Cc: reiserfs-list Hi Vladimir, pam_mktemp can work on filesystem which does not support ext2's file attributes. For example, it works well on tmpfs. For pam_mktemp to recognize the case and work without attributes, the filesystem should return 'ENOTTY' (Inappropriate ioctl for device) as a result of an setting/getting attributes call, as it tmpfs does. But reiser4 returns 'ENOSYS' (Function not implemented). Will you accept patch changing this code to 'ENOTTY'? Sergey Vladimir V. Saveliev wrote: > Hello > > sergey ivanov wrote: > >> I have a problem with reiser4. >> Recently I have installed Altlinux Compact-rc2 on reiserfs (v3.6), >> patched kernel 2.6.12 with patch 2.6.12-mm2, created new reiser4 >> partition hda6 and copied by #cp -ax / /mnt/hda6 there. Fixed /etc/fstab >> and /boot/grub for new partition and booted. And could not login, with >> messages in virtual consoles : >> --- >> >> pam_tcb[8386]: login: Authentication passed for root from (uid=0) >> Login incorrect >> --- >> So I rebooted in original on reiserfs 3.6, edited >> /mnt/hda6/etc/inittab to change one of "/sbin/mingetty tty6" to be >> "/bin/bash" and after reboot to reiser4 based system saw, that the >> problem in pam_mktemp, by commenting out string # account required >> pam_mktemp.so >> in file /etc/pam.d/system_auth the problem get fixed. Also it get >> fixed if I create some non-reiser4 partition to place /tmp on it. >> > > Thanks for the report. > The problem is that reiser4 does not support ext2's file attributes > pam_mktemp deals with. > > Maybe reiser4 should have support for that like reiserfs, but now it > does not. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: reiser4 problem with pam_mktemp 2005-08-10 3:41 ` sergey ivanov @ 2005-08-10 12:14 ` Vladimir V. Saveliev 2005-08-11 11:01 ` sergey ivanov [not found] ` <42FB2F04.7090003@parkheights.dyndns.org> 0 siblings, 2 replies; 7+ messages in thread From: Vladimir V. Saveliev @ 2005-08-10 12:14 UTC (permalink / raw) To: sergey ivanov; +Cc: reiserfs-list Hello sergey ivanov wrote: > Hi Vladimir, > pam_mktemp can work on filesystem which does not support ext2's file attributes. > For example, it works well on tmpfs. > For pam_mktemp to recognize the case and work without attributes, > the filesystem should return 'ENOTTY' (Inappropriate ioctl for device) > as a result of an setting/getting attributes call, as it tmpfs does. > But reiser4 returns 'ENOSYS' (Function not implemented). > Will you accept patch changing this code to 'ENOTTY'? yes > Sergey > > Vladimir V. Saveliev wrote: > > >>Hello >> >>sergey ivanov wrote: >> >> >>>I have a problem with reiser4. >>>Recently I have installed Altlinux Compact-rc2 on reiserfs (v3.6), >>>patched kernel 2.6.12 with patch 2.6.12-mm2, created new reiser4 >>>partition hda6 and copied by #cp -ax / /mnt/hda6 there. Fixed /etc/fstab >>>and /boot/grub for new partition and booted. And could not login, with >>>messages in virtual consoles : >>>--- >>> >>>pam_tcb[8386]: login: Authentication passed for root from (uid=0) >>>Login incorrect >>>--- >>>So I rebooted in original on reiserfs 3.6, edited >>>/mnt/hda6/etc/inittab to change one of "/sbin/mingetty tty6" to be >>>"/bin/bash" and after reboot to reiser4 based system saw, that the >>>problem in pam_mktemp, by commenting out string # account required >>>pam_mktemp.so >>>in file /etc/pam.d/system_auth the problem get fixed. Also it get >>>fixed if I create some non-reiser4 partition to place /tmp on it. >>> >> >>Thanks for the report. >>The problem is that reiser4 does not support ext2's file attributes >>pam_mktemp deals with. >> >>Maybe reiser4 should have support for that like reiserfs, but now it >>does not. > > > > > ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: reiser4 problem with pam_mktemp 2005-08-10 12:14 ` Vladimir V. Saveliev @ 2005-08-11 11:01 ` sergey ivanov 2005-08-12 0:42 ` michael chang [not found] ` <42FB2F04.7090003@parkheights.dyndns.org> 1 sibling, 1 reply; 7+ messages in thread From: sergey ivanov @ 2005-08-11 11:01 UTC (permalink / raw) To: reiserfs-list I have not succeeded with integrating reiser4 & pam_mktemp. From one side I recompiled kernel with reiser4 patches modified to return ENOTTY for attempt to deal with attributes, as tmpfs does. Pam_mktemp does not work after this. So I returned to the kernel with original Namesys' patches. Then by my apeal pam_mktemp was modified to recognize ENOSYS the same way it recognizes ENOTTY returned by tmpfs and try to deal without attributes. But this also does not help pam_mktemp to work. So I did the following: rebooted to runlevel 1, and then did # strace -o su.log -fF su - seriv Once with /tmp on tmpfs and once with /tmp on reiser4. And the following catches my attention: while on tmpfs, the lines dealing with attributes looks like the following: --- 2034 mkdir("/tmp/.private", 0711) = 0 2034 lstat64("/tmp/.private", {st_mode=S_IFDIR|0711, st_size=40, ...}) = 0 2034 open("/tmp/.private", O_RDONLY) = 3 2034 ioctl(3, EXT2_IOC_GETFLAGS, 0xbfb7aab8) = -1 ENOTTY (Inappropriate ioctl for device) 2034 close(3) = 0 2034 mkdir("/tmp/.private/seriv", 01700) = 0 2034 open("/tmp/.private/seriv", O_RDONLY) = 3 2034 ioctl(3, EXT2_IOC_GETFLAGS, 0xbfb7aa88) = -1 ENOTTY (Inappropriate ioctl for device) 2034 close(3) = 0 2034 chown32("/tmp/.private/seriv", 0, 500) = 0 2034 chmod("/tmp/.private/seriv", 01770) = 0 --- But with /tmp on reiser4, they are: --- 1993 mkdir("/tmp/.private", 0711) = -1 EEXIST (File exists) 1993 lstat64("/tmp/.private", {st_mode=S_IFDIR|0711, st_size=7, ...}) = 0 1993 open("/tmp/.private", O_RDONLY) = 3 1993 ioctl(3, EXT2_IOC_GETFLAGS, 0xbf9e37f8) = -1 EISDIR (Is a directory) 1993 close(3) = 0 1993 mkdir("/tmp/.private/seriv", 01700) = -1 EEXIST (File exists) 1993 open("/tmp/.private/seriv", O_RDONLY) = 3 1993 ioctl(3, EXT2_IOC_GETFLAGS, 0xbf9e37c8) = -1 EISDIR (Is a directory) 1993 close(3) = 0 1993 getuid32() = 0 1993 write(2, "Account management:- Cannot make"..., 85) = 85 --- So it looks like reiser4 tries to be good and answer to ioctl getting/setting attributes "EEXIST" and "EISDIR", and not return error "ENOTTY". This is the reason, why pam_mktemp passes the tests if filesystem support attributes with confidence that reiser4 can do attributes. I think this was the right decision to return fake successes at the beginning of reiser4 development, but now I think reiser4 should behave more strictly and rejects this attribute setting/getting ioctl by ENOTTY codes. -- Sergey ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: reiser4 problem with pam_mktemp 2005-08-11 11:01 ` sergey ivanov @ 2005-08-12 0:42 ` michael chang 0 siblings, 0 replies; 7+ messages in thread From: michael chang @ 2005-08-12 0:42 UTC (permalink / raw) To: sergey ivanov; +Cc: reiserfs-list On 8/11/05, sergey ivanov <seriv@parkheights.dyndns.org> wrote: > I have not succeeded with integrating reiser4 & pam_mktemp. > From one side I recompiled kernel with reiser4 patches modified to > return ENOTTY for attempt to deal with attributes, as tmpfs does. > Pam_mktemp does not work after this. So I returned to the kernel with > original Namesys' patches. > # strace -o su.log -fF su - seriv > 1993 mkdir("/tmp/.private", 0711) = -1 EEXIST (File exists) > 1993 lstat64("/tmp/.private", {st_mode=S_IFDIR|0711, st_size=7, ...}) = 0 > 1993 open("/tmp/.private", O_RDONLY) = 3 > 1993 ioctl(3, EXT2_IOC_GETFLAGS, 0xbf9e37f8) = -1 EISDIR (Is a directory) > So it looks like reiser4 tries to be good and answer to ioctl > getting/setting attributes "EEXIST" and "EISDIR", > and not return error "ENOTTY". This seems kind of confusing -- the problem with the idea that all files are files and directories... do we really want to be returning that it's a directory here? My guess is that this is the confusing bit about this filesystem. AFAIK, this is probably confusing the PAM code or whatever. *shrugs* -- ~Mike - Just my two cents - No man is an island, and no man is unable. ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <42FB2F04.7090003@parkheights.dyndns.org>]
[parent not found: <42FC702D.8070802@namesys.com>]
* Re: reiser4 problem with pam_mktemp [not found] ` <42FC702D.8070802@namesys.com> @ 2005-08-12 10:55 ` sergey ivanov 0 siblings, 0 replies; 7+ messages in thread From: sergey ivanov @ 2005-08-12 10:55 UTC (permalink / raw) To: reiserfs-list; +Cc: Vladimir V. Saveliev, ldv Thank you, it works! I've just recompiled kernel and now / mounted on reiser4 with /tmp in the same filesystem, and pam_mktemp works without problems. -- Sergey. Vladimir V. Saveliev пишет: > Hello > > sergey ivanov wrote: > >> I have not succeeded with integrating reiser4 & pam_mktemp. > > > Would you try the attached patch, please. > >>> From one side I recompiled kernel with reiser4 patches modified to >> >> return ENOTTY for attempt to deal with attributes, as tmpfs does. >> Pam_mktemp does not work after this. So I returned to the kernel with >> original Namesys' patches. >> Then by my apeal pam_mktemp was modified to recognize ENOSYS the same >> way it recognizes ENOTTY returned by tmpfs and try to deal without >> attributes. >> But this also does not help pam_mktemp to work. >> So I did the following: rebooted to runlevel 1, and then did >> # strace -o su.log -fF su - seriv >> Once with /tmp on tmpfs and once with /tmp on reiser4. >> And the following catches my attention: while on tmpfs, the lines >> dealing with attributes looks like the following: >> --- >> 2034 mkdir("/tmp/.private", 0711) = 0 >> 2034 lstat64("/tmp/.private", {st_mode=S_IFDIR|0711, st_size=40, >> ...}) = 0 >> >> 2034 open("/tmp/.private", O_RDONLY) = 3 >> 2034 ioctl(3, EXT2_IOC_GETFLAGS, 0xbfb7aab8) = -1 ENOTTY (Inappropriate >> ioctl for device) >> 2034 close(3) = 0 >> 2034 mkdir("/tmp/.private/seriv", 01700) = 0 >> 2034 open("/tmp/.private/seriv", O_RDONLY) = 3 >> 2034 ioctl(3, EXT2_IOC_GETFLAGS, 0xbfb7aa88) = -1 ENOTTY (Inappropriate >> ioctl for device) >> 2034 close(3) = 0 >> 2034 chown32("/tmp/.private/seriv", 0, 500) = 0 >> 2034 chmod("/tmp/.private/seriv", 01770) = 0 >> --- >> But with /tmp on reiser4, they are: >> --- >> 1993 mkdir("/tmp/.private", 0711) = -1 EEXIST (File exists) >> 1993 lstat64("/tmp/.private", {st_mode=S_IFDIR|0711, st_size=7, >> ...}) = 0 >> 1993 open("/tmp/.private", O_RDONLY) = 3 >> 1993 ioctl(3, EXT2_IOC_GETFLAGS, 0xbf9e37f8) = -1 EISDIR (Is a >> directory) >> 1993 close(3) = 0 >> 1993 mkdir("/tmp/.private/seriv", 01700) = -1 EEXIST (File exists) >> 1993 open("/tmp/.private/seriv", O_RDONLY) = 3 >> 1993 ioctl(3, EXT2_IOC_GETFLAGS, 0xbf9e37c8) = -1 EISDIR (Is a >> directory) >> 1993 close(3) = 0 >> 1993 getuid32() = 0 >> 1993 write(2, "Account management:- Cannot make"..., 85) = 85 >> --- >> So it looks like reiser4 tries to be good and answer to ioctl >> getting/setting attributes "EEXIST" and "EISDIR", and not return >> error "ENOTTY". This is the reason, why pam_mktemp passes the tests >> if filesystem support attributes with confidence that reiser4 can do >> attributes. I think this was the right decision to return fake >> successes at the beginning of reiser4 development, but now I think >> reiser4 should behave more strictly and rejects this attribute >> setting/getting ioctl by ENOTTY codes. > > >------------------------------------------------------------------------ > > fs/reiser4/plugin/file/file.c | 2 +- > fs/reiser4/plugin/object.c | 17 ++++++++++++----- > 2 files changed, 13 insertions(+), 6 deletions(-) > >diff -puN fs/reiser4/plugin/object.c~reiser4-pam_mktemp-fix fs/reiser4/plugin/object.c >--- linux-2.6.13-rc5-mm1/fs/reiser4/plugin/object.c~reiser4-pam_mktemp-fix 2005-08-12 13:42:05.904058842 +0400 >+++ linux-2.6.13-rc5-mm1-vs/fs/reiser4/plugin/object.c 2005-08-12 13:46:12.622408259 +0400 >@@ -966,6 +966,13 @@ isdir(void) > > #define eisdir ((void *)isdir) > >+static int >+notty(void) >+{ >+ return RETERR(-ENOTTY); >+} >+#define enotty ((void *)notty) >+ > static ssize_t > perm(void) > { >@@ -1243,7 +1250,7 @@ file_plugin file_plugins[LAST_FILE_PLUGI > .read = eisdir, > .write = eisdir, > .release = release_dir, >- .ioctl = eisdir, >+ .ioctl = enotty, > .mmap = eisdir, > .get_block = NULL, > .flow_by_inode = NULL, >@@ -1299,7 +1306,7 @@ file_plugin file_plugins[LAST_FILE_PLUGI > .read = eperm, > .write = eperm, > .release = NULL, >- .ioctl = eperm, >+ .ioctl = enotty, > .mmap = eperm, > .sync = sync_common, > .get_block = NULL, >@@ -1358,7 +1365,7 @@ file_plugin file_plugins[LAST_FILE_PLUGI > .read = eperm, > .write = eperm, > .release = NULL, >- .ioctl = eperm, >+ .ioctl = enotty, > .mmap = eperm, > .sync = sync_common, > .get_block = NULL, >@@ -1413,7 +1420,7 @@ file_plugin file_plugins[LAST_FILE_PLUGI > .read = read_pseudo, > .write = write_pseudo, > .release = release_pseudo, >- .ioctl = eperm, >+ .ioctl = enotty, > .mmap = eperm, > .sync = sync_common, > .get_block = eperm, >@@ -1470,7 +1477,7 @@ file_plugin file_plugins[LAST_FILE_PLUGI > .read = read_cryptcompress, > .write = write_cryptcompress, > .release = NULL, >- .ioctl = NULL, >+ .ioctl = enotty, > .mmap = mmap_cryptcompress, > .get_block = get_block_cryptcompress, > .sync = sync_common, >diff -puN fs/reiser4/plugin/file/file.c~reiser4-pam_mktemp-fix fs/reiser4/plugin/file/file.c >--- linux-2.6.13-rc5-mm1/fs/reiser4/plugin/file/file.c~reiser4-pam_mktemp-fix 2005-08-12 13:45:48.276202815 +0400 >+++ linux-2.6.13-rc5-mm1-vs/fs/reiser4/plugin/file/file.c 2005-08-12 13:45:58.469126159 +0400 >@@ -2361,7 +2361,7 @@ ioctl_unix_file(struct inode *inode, str > break; > > default: >- result = RETERR(-ENOSYS); >+ result = RETERR(-ENOTTY); > break; > } > return result; > >_ > > ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2005-08-12 10:55 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-28 16:29 reiser4 problem with pam_mktemp sergey ivanov
2005-07-31 13:34 ` Vladimir V. Saveliev
2005-08-10 3:41 ` sergey ivanov
2005-08-10 12:14 ` Vladimir V. Saveliev
2005-08-11 11:01 ` sergey ivanov
2005-08-12 0:42 ` michael chang
[not found] ` <42FB2F04.7090003@parkheights.dyndns.org>
[not found] ` <42FC702D.8070802@namesys.com>
2005-08-12 10:55 ` sergey ivanov
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.