mirror of
https://git.code.sf.net/p/ntfs-3g/ntfs-3g.git
synced 2024-11-23 10:04:00 +08:00
Avoided setuid/setgid removal by chown on OpenIndiana
On OpenIndiana, it is not customary to remove the setuid/setgid flags when doing a chown, so comply with the local rules.
This commit is contained in:
parent
319958545e
commit
1c93e2a97d
@ -3546,10 +3546,12 @@ int ntfs_set_owner(struct SECURITY_CONTEXT *scx, ntfs_inode *ni,
|
||||
uid = fileuid;
|
||||
if ((int)gid < 0)
|
||||
gid = filegid;
|
||||
#if !defined(__sun) || !defined (__SVR4)
|
||||
/* clear setuid and setgid if owner has changed */
|
||||
/* unless request originated by root */
|
||||
if (uid && (fileuid != uid))
|
||||
mode &= 01777;
|
||||
#endif
|
||||
#if POSIXACLS
|
||||
res = ntfs_set_owner_mode(scx, ni, uid, gid,
|
||||
mode, pxdesc);
|
||||
|
Loading…
Reference in New Issue
Block a user