* external.cc (cygwin_internal): Add CW_GET_UID_FROM_SID and
CW_GET_GID_FROM_SID handling. * include/cygwin/version.h: Bump API minor number. * include/sys/cygwin.h (cygwin_getinfo_types): Add CW_GET_UID_FROM_SID and CW_GET_GID_FROM_SID.
This commit is contained in:
parent
fe359733a4
commit
8e68687d2a
|
@ -1,3 +1,11 @@
|
|||
2003-11-08 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* external.cc (cygwin_internal): Add CW_GET_UID_FROM_SID and
|
||||
CW_GET_GID_FROM_SID handling.
|
||||
* include/cygwin/version.h: Bump API minor number.
|
||||
* include/sys/cygwin.h (cygwin_getinfo_types): Add
|
||||
CW_GET_UID_FROM_SID and CW_GET_GID_FROM_SID.
|
||||
|
||||
2003-11-07 Christopher Faylor <cgf@redhat.com>
|
||||
|
||||
* fhandler_disk_file.cc (fhandler_disk_file::opendir): Reorganize to
|
||||
|
|
|
@ -26,6 +26,7 @@ details. */
|
|||
#include "wincap.h"
|
||||
#include "heap.h"
|
||||
#include "cygthread.h"
|
||||
#include "pwdgrp.h"
|
||||
|
||||
static external_pinfo *
|
||||
fillout_pinfo (pid_t pid, int winpid)
|
||||
|
@ -278,6 +279,20 @@ cygwin_internal (cygwin_getinfo_types t, ...)
|
|||
{
|
||||
return getshmlba ();
|
||||
}
|
||||
case CW_GET_UID_FROM_SID:
|
||||
{
|
||||
PSID psid = va_arg (arg, PSID);
|
||||
cygsid sid (psid);
|
||||
struct passwd *pw = internal_getpwsid (sid);
|
||||
return pw ? pw->pw_uid : (__uid32_t)-1;
|
||||
}
|
||||
case CW_GET_GID_FROM_SID:
|
||||
{
|
||||
PSID psid = va_arg (arg, PSID);
|
||||
cygsid sid (psid);
|
||||
struct __group32 *gr = internal_getgrsid (sid);
|
||||
return gr ? gr->gr_gid : (__gid32_t)-1;
|
||||
}
|
||||
default:
|
||||
return (DWORD) -1;
|
||||
}
|
||||
|
|
|
@ -226,13 +226,14 @@ details. */
|
|||
99: CW_GET_POSIX_SECURITY_ATTRIBUTE addition to external.cc.
|
||||
100: CW_GET_SHMLBA addition to external.cc.
|
||||
101: Export err, errx, verr, verrx, warn, warnx, vwarn, vwarnx.
|
||||
102: CW_GET_UID_FROM_SID and CW_GET_GID_FROM_SID addition to external.cc.
|
||||
|
||||
*/
|
||||
|
||||
/* Note that we forgot to bump the api for ualarm, strtoll, strtoull */
|
||||
|
||||
#define CYGWIN_VERSION_API_MAJOR 0
|
||||
#define CYGWIN_VERSION_API_MINOR 101
|
||||
#define CYGWIN_VERSION_API_MINOR 102
|
||||
|
||||
/* There is also a compatibity version number associated with the
|
||||
shared memory regions. It is incremented when incompatible
|
||||
|
|
|
@ -75,7 +75,9 @@ typedef enum
|
|||
CW_CHECK_NTSEC,
|
||||
CW_GET_ERRNO_FROM_WINERROR,
|
||||
CW_GET_POSIX_SECURITY_ATTRIBUTE,
|
||||
CW_GET_SHMLBA
|
||||
CW_GET_SHMLBA,
|
||||
CW_GET_UID_FROM_SID,
|
||||
CW_GET_GID_FROM_SID
|
||||
} cygwin_getinfo_types;
|
||||
|
||||
#define CW_NEXTPID 0x80000000 /* or with pid to get next one */
|
||||
|
|
Loading…
Reference in New Issue