From a8d7ae61e7b832d354731b1d024e4ff1ed22fca0 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Wed, 29 May 2002 15:04:29 +0000 Subject: Change internal uid datatype from __uid16_t to __uid32_t throughout. * cygwin.din: Export new symbols getpwuid32, getpwuid_r32, getuid32, geteuid32, setuid32, seteuid32. * passwd.cc (getpwuid32): New function. (getpwuid_r32): Ditto. * syscalls.cc (seteuid32): Ditto. (setuid32): Ditto. * uinfo.cc (getuid32): Ditto. (geteuid32): Ditto. * winsup.h (uid16touid32): New macro, correclt casting from __uid16_t to __uid32_t. (gid16togid32): Ditto fir gids. (getuid32): Declare. (geteuid32): Ditto. (getpwuid32): Ditto. * include/sys/cygwin.h (struct external_pinfo): Add members uid32 and gid32. --- winsup/cygwin/sec_acl.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'winsup/cygwin/sec_acl.cc') diff --git a/winsup/cygwin/sec_acl.cc b/winsup/cygwin/sec_acl.cc index 47f1cb426..71a0147e8 100644 --- a/winsup/cygwin/sec_acl.cc +++ b/winsup/cygwin/sec_acl.cc @@ -158,7 +158,7 @@ setacl (const char *file, int nentries, __aclent16_t *aclbufp) break; case USER: case DEF_USER: - if (!(pw = getpwuid (aclbufp[i].a_id)) + if (!(pw = getpwuid32 (aclbufp[i].a_id)) || !sid.getfrompw (pw) || !add_access_allowed_ace (acl, ace_off++, allow, sid, acl_len, inheritance)) @@ -255,7 +255,7 @@ getacl (const char *file, DWORD attr, int nentries, __aclent16_t *aclbufp) PSID owner_sid; PSID group_sid; BOOL dummy; - __uid16_t uid; + __uid32_t uid; __gid32_t gid; if (!GetSecurityDescriptorOwner (psd, &owner_sid, &dummy)) @@ -426,7 +426,7 @@ acl_access (const char *path, int flags) struct passwd *pw; struct __group32 *gr = NULL; - if ((pw = getpwuid (acls[i].a_id)) != NULL + if ((pw = getpwuid32 (acls[i].a_id)) != NULL && owner.getfrompw (pw)) { for (int gidx = 0; (gr = internal_getgrent (gidx)); ++gidx) -- cgit v1.2.3