summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libdiskfs/file-chown.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libdiskfs/file-chown.c b/libdiskfs/file-chown.c
index d91e3059..f71d2496 100644
--- a/libdiskfs/file-chown.c
+++ b/libdiskfs/file-chown.c
@@ -26,7 +26,8 @@ diskfs_S_file_chown (struct protid *cred,
{
CHANGE_NODE_FIELD (cred,
({
- if (!diskfs_isowner (np, cred)
+ err = diskfs_isowner (np, cred);
+ if (err
|| ((!diskfs_isuid (uid, cred)
|| !diskfs_groupmember (gid, cred))
&& !diskfs_isuid (0, cred)))