* external.cc (cygwin_internal): Add cases for CW_GETNSSSEP,
CW_GETPWSID and CW_GETGRSID. * grp.cc (internal_getgrsid_from_db): New function. * passwd.cc (internal_getpwsid_from_db): New function. (pg_ent::setent): Add special case for call from mkpasswd/mkgroup. * pwdgrp.h (internal_getpwsid_from_db): Declare. (internal_getgrsid_from_db): Declare. (enum nss_enum_t): Move to include/sys/cygwin.h. (class pg_ent): Add comment. * uinfo.cc (pwdgrp::fetch_account_from_windows): Fix typo in comment. Change "UNIX" to "Unix" in domain name. * include/sys/cygwin.h (cygwin_getinfo_types): Add CW_GETNSSSEP, CW_GETPWSID and CW_GETGRSID. (enum nss_enum_t): Define here.
This commit is contained in:
@ -595,6 +595,30 @@ cygwin_internal (cygwin_getinfo_types t, ...)
|
||||
}
|
||||
break;
|
||||
|
||||
case CW_GETNSSSEP:
|
||||
res = (uintptr_t) cygheap->pg.nss_separator ();
|
||||
break;
|
||||
|
||||
case CW_GETPWSID:
|
||||
{
|
||||
int db_only = va_arg (arg, int);
|
||||
PSID psid = va_arg (arg, PSID);
|
||||
cygpsid sid (psid);
|
||||
res = (uintptr_t) (db_only ? internal_getpwsid_from_db (sid)
|
||||
: internal_getpwsid (sid));
|
||||
}
|
||||
break;
|
||||
|
||||
case CW_GETGRSID:
|
||||
{
|
||||
int db_only = va_arg (arg, int);
|
||||
PSID psid = va_arg (arg, PSID);
|
||||
cygpsid sid (psid);
|
||||
res = (uintptr_t) (db_only ? internal_getgrsid_from_db (sid)
|
||||
: internal_getgrsid (sid));
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
set_errno (ENOSYS);
|
||||
}
|
||||
|
Reference in New Issue
Block a user