* external.cc (cygwin_internal): Add CW_EXTRACT_DOMAIN_AND_USER

handling to call extract_nt_dom_user() from applications.
	* include/sys/cygwin.h (cygwin_getinfo_types): Add
	CW_EXTRACT_DOMAIN_AND_USER.
This commit is contained in:
Corinna Vinschen 2002-06-03 17:56:10 +00:00
parent cc890e8952
commit 31b98a623c
3 changed files with 17 additions and 1 deletions

View File

@ -1,3 +1,10 @@
2002-06-03 Corinna Vinschen <corinna@vinschen.de>
* external.cc (cygwin_internal): Add CW_EXTRACT_DOMAIN_AND_USER
handling to call extract_nt_dom_user() from applications.
* include/sys/cygwin.h (cygwin_getinfo_types): Add
CW_EXTRACT_DOMAIN_AND_USER.
2002-06-03 Corinna Vinschen <corinna@vinschen.de> 2002-06-03 Corinna Vinschen <corinna@vinschen.de>
* syscalls.cc (stat64_to_stat32): Transform st_dev correctly. * syscalls.cc (stat64_to_stat32): Transform st_dev correctly.

View File

@ -234,6 +234,14 @@ cygwin_internal (cygwin_getinfo_types t, ...)
pinfo p (va_arg (arg, pid_t)); pinfo p (va_arg (arg, pid_t));
return p ? p->dwProcessId : 0; return p ? p->dwProcessId : 0;
} }
case CW_EXTRACT_DOMAIN_AND_USER:
{
struct passwd *pw = va_arg (arg, struct passwd *);
char *domain = va_arg (arg, char *);
char *user = va_arg (arg, char *);
extract_nt_dom_user (pw, domain, user);
return 0;
}
default: default:
return (DWORD) -1; return (DWORD) -1;
} }

View File

@ -69,7 +69,8 @@ typedef enum
CW_GET_CYGWIN_REGISTRY_NAME, CW_GET_CYGWIN_REGISTRY_NAME,
CW_STRACE_TOGGLE, CW_STRACE_TOGGLE,
CW_STRACE_ACTIVE, CW_STRACE_ACTIVE,
CW_CYGWIN_PID_TO_WINPID CW_CYGWIN_PID_TO_WINPID,
CW_EXTRACT_DOMAIN_AND_USER
} cygwin_getinfo_types; } cygwin_getinfo_types;
#define CW_NEXTPID 0x80000000 // or with pid to get next one #define CW_NEXTPID 0x80000000 // or with pid to get next one