Hello, Justus Winter, le Wed 11 Jun 2014 13:41:09 +0200, a écrit : > @@ -25,6 +25,12 @@ diskfs_S_file_chflags (struct protid *cred, > { > CHANGE_NODE_FIELD (cred, > ({ > + if (flags & 0xffff0000 > + && ! idvec_contains (cred->user->uids, 0)) > + /* Only root is allowed to change the high 16 > + bits. */ > + return EPERM; > +
Mmm, but if a flag was set by root, then a user shouldn't be allowed to clear it, I guess. So it'd probably rather be something like: if ((flags & 0xffff0000u) != (np->dn_stat.st_flags & 0xffff0000u)) etc. Note the needed u in the constant, it is unspecified how negative int are coded. Samuel