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.
This commit is contained in:
@@ -442,7 +442,7 @@ shmctl (int shmid, int cmd, struct shmid_ds *buf)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* FIXME: evaluate getuid() and getgid32() against the requested mode. Then
|
||||
/* FIXME: evaluate getuid32() and getgid32() against the requested mode. Then
|
||||
* choose PAGE_READWRITE | PAGE_READONLY and FILE_MAP_WRITE | FILE_MAP_READ
|
||||
* appropriately
|
||||
*/
|
||||
@@ -461,7 +461,7 @@ shmget (key_t key, size_t size, int shmflg)
|
||||
/* create a sd for our open requests based on shmflag & 0x01ff */
|
||||
InitializeSecurityDescriptor (psd,
|
||||
SECURITY_DESCRIPTOR_REVISION);
|
||||
psd = alloc_sd (getuid (), getgid32 (), cygheap->user.logsrv (),
|
||||
psd = alloc_sd (getuid32 (), getgid32 (), cygheap->user.logsrv (),
|
||||
shmflg & 0x01ff, psd, &sd_size);
|
||||
|
||||
if (key == (key_t) - 1)
|
||||
@@ -538,7 +538,7 @@ shmget (key_t key, size_t size, int shmflg)
|
||||
|
||||
#if 0
|
||||
/* fill out the node data */
|
||||
shmtemp->shm_perm.cuid = getuid ();
|
||||
shmtemp->shm_perm.cuid = getuid32 ();
|
||||
shmtemp->shm_perm.uid = shmtemp->shm_perm.cuid;
|
||||
shmtemp->shm_perm.cgid = getgid32 ();
|
||||
shmtemp->shm_perm.gid = shmtemp->shm_perm.cgid;
|
||||
|
Reference in New Issue
Block a user