mirror of
https://git.code.sf.net/p/ntfs-3g/ntfs-3g.git
synced 2024-11-27 12:03:42 +08:00
Fixed a bug when getting permissions for the first time
This commit is contained in:
parent
59a21e6110
commit
78bd8350ca
@ -1624,6 +1624,10 @@ static BOOL groupmember(struct SECURITY_CONTEXT *scx, uid_t uid, gid_t gid)
|
|||||||
* must be kept separately : the interpretation of ACL
|
* must be kept separately : the interpretation of ACL
|
||||||
* in both direction are approximations which could be non
|
* in both direction are approximations which could be non
|
||||||
* reciprocal for some configuration of the user mapping data
|
* reciprocal for some configuration of the user mapping data
|
||||||
|
*
|
||||||
|
* During the process of recompiling ntfs-3g from a tgz archive,
|
||||||
|
* security processing added 7.6% to the cpu time used by ntfs-3g
|
||||||
|
* and 30% if the cache is disabled.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static struct SECURITY_CACHE *create_caches(struct SECURITY_CONTEXT *scx,
|
static struct SECURITY_CACHE *create_caches(struct SECURITY_CONTEXT *scx,
|
||||||
@ -3142,9 +3146,10 @@ static int ntfs_get_perm(struct SECURITY_CONTEXT *scx,
|
|||||||
gid, perm);
|
gid, perm);
|
||||||
}
|
}
|
||||||
free(securattr);
|
free(securattr);
|
||||||
} else
|
} else {
|
||||||
perm = -1;
|
perm = -1;
|
||||||
uid = gid = 0;
|
uid = gid = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (perm >= 0) {
|
if (perm >= 0) {
|
||||||
if (uid == scx->uid)
|
if (uid == scx->uid)
|
||||||
|
Loading…
Reference in New Issue
Block a user