Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
d514d18f
Commit
d514d18f
authored
Apr 10, 2002
by
Linus Torvalds
Committed by
Linus Torvalds
Apr 10, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't stomp on old ia_valid when changing user/group.
Found by Andrew Morton <akpm@zip.com.au>
parent
cfd14b9e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
fs/open.c
fs/open.c
+2
-2
No files found.
fs/open.c
View file @
d514d18f
...
...
@@ -524,11 +524,11 @@ static int chown_common(struct dentry * dentry, uid_t user, gid_t group)
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
;
newattrs
.
ia_gid
=
group
;
}
if
(
!
S_ISDIR
(
inode
->
i_mode
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment