Skip to contentSkip to conversation

2.5.8 pre3 chown problem

DISCUSSION Leopold Gouverneur 2 participants 2 messages Apr 14, 2002 – Apr 15, 2002 VFS

lore
Share & tools
lore
#0 lore raw

I tried 2.5.8 pre3 and exim stopped working!
I found the problem was that logrotate is unable to change exim's mainlog owner from root to mail. So i made a little test:

gouv:~# touch junk
gouv:~# ls -l junk
-rw-r--r--    1 root     root            0 avr 14 21:30 junk
gouv:~# chown mail.adm junk
gouv:~# echo $?
0
gouv:~# ls -l junk
-rw-r--r--    1 root     adm             0 avr 14 21:30 junk
gouv:~# chown --version
chown (fileutils) 4.1
Écrit par David MacKenzie.
gouv:~# bash --version 
GNU bash, version 2.05a.0(1)-release (i386-pc-linux-gnu)
Copyright 2001 Free Software Foundation, Inc.

file system is ext 2

I reverted to 2.5.7 and everyting worked as expected

#1 lore raw

Andrew Morton posted this patch earlier:

fs/open.c Thu Apr 11 00:15:09 2002 renamed from fs/open.c Tue Apr 9 18:16:40 2002 +2 -2
@@ -524,11 +524,11 @@ static int chown_common(struct dentry * 
              goto out;
      newattrs.ia_valid =  ATTR_CTIME;
      if (user != (uid_t) -1) {
-             newattrs.ia_valid =  ATTR_UID;
+             newattrs.ia_valid |= ATTR_UID;
              newattrs.ia_uid = user;
      }
      if (group != (gid_t) -1) {
-             newattrs.ia_valid =  ATTR_GID;
+             newattrs.ia_valid |= ATTR_GID;