From: Andries.Brouwer@cwi.nl
To: linux-kernel@vger.kernel.org, torvalds@transmeta.com
Subject: [PATCH] chown in 2.5.8pre3
Date: Sun, 14 Apr 2002 21:08:00 GMT [thread overview]
Message-ID: <UTC200204142108.VAA622694.aeb@cwi.nl> (raw)
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))
reply other threads:[~2002-04-14 21:08 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=UTC200204142108.VAA622694.aeb@cwi.nl \
--to=andries.brouwer@cwi.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®