* [PATCH] chown in 2.5.8pre3
@ 2002-04-14 21:08 Andries.Brouwer
0 siblings, 0 replies; only message in thread
From: Andries.Brouwer @ 2002-04-14 21:08 UTC (permalink / raw)
To: linux-kernel, torvalds
In 2.5.8pre3 root cannot chown his files to some mortal.
I have not read the code but blindly made the change below,
and that fixed this particular problem for me.
Andries
--- /linux/2.5/linux-2.5.8-pre3/linux/fs/open.c Fri Apr 12 12:10:48 2002
+++ ./open.c Tue Apr 16 00:00:38 2002
@@ -522,13 +522,13 @@
error = -EPERM;
if (IS_IMMUTABLE(inode) || IS_APPEND(inode))
goto out;
- newattrs.ia_valid = ATTR_CTIME;
+ 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;
newattrs.ia_gid = group;
}
if (!S_ISDIR(inode->i_mode))
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-04-14 21:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-14 21:08 [PATCH] chown in 2.5.8pre3 Andries.Brouwer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®