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:
@@ -282,6 +282,12 @@ getlogin (void)
|
||||
return strcpy (this_username, cygheap->user.name ());
|
||||
}
|
||||
|
||||
extern "C" __uid32_t
|
||||
getuid32 (void)
|
||||
{
|
||||
return cygheap->user.real_uid;
|
||||
}
|
||||
|
||||
extern "C" __uid16_t
|
||||
getuid (void)
|
||||
{
|
||||
@@ -300,6 +306,12 @@ getgid (void)
|
||||
return cygheap->user.real_gid;
|
||||
}
|
||||
|
||||
extern "C" __uid32_t
|
||||
geteuid32 (void)
|
||||
{
|
||||
return myself->uid;
|
||||
}
|
||||
|
||||
extern "C" __uid16_t
|
||||
geteuid (void)
|
||||
{
|
||||
|
Reference in New Issue
Block a user