aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin/cygheap.h
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2000-11-15 21:04:02 +0000
committerCorinna Vinschen <corinna@vinschen.de>2000-11-15 21:04:02 +0000
commit66c161baac1a31cd8c87eeec2e9b7dab9a2f50c8 (patch)
treeb530de5f8919203459f7443243ebdc46161c41c0 /winsup/cygwin/cygheap.h
parente00449d65705c976fcb970e4b39c4f3fd860c861 (diff)
downloadnewlib-66c161baac1a31cd8c87eeec2e9b7dab9a2f50c8.zip
newlib-66c161baac1a31cd8c87eeec2e9b7dab9a2f50c8.tar.gz
newlib-66c161baac1a31cd8c87eeec2e9b7dab9a2f50c8.tar.bz2
* cygheap.h: Move `token' and `impersonated' from class _pinfo
to class cygheap_user. * pinfo.h: Ditto. * fork.cc (fork_child): Change usage of `token' and `impersonated' accordingly. (fork_parent): Ditto. * security.cc (cygwin_set_impersonation_token): Ditto. * sigproc.cc (proc_subproc): Ditto. * spawn.cc (spawn_guts): Ditto. * syscalls.cc (seteuid): Ditto. * uinfo.cc (uinfo_init): Ditto.
Diffstat (limited to 'winsup/cygwin/cygheap.h')
-rw-r--r--winsup/cygwin/cygheap.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/winsup/cygwin/cygheap.h b/winsup/cygwin/cygheap.h
index 779df67..c39438a 100644
--- a/winsup/cygwin/cygheap.h
+++ b/winsup/cygwin/cygheap.h
@@ -57,17 +57,21 @@ class cygheap_user {
/* Extendend user information.
The information is derived from the internal_getlogin call
when on a NT system. */
- char *pname; /* user's name */
- char *plogsrv; /* Logon server, may be FQDN */
- char *pdomain; /* Logon domain of the user */
- PSID psid; /* buffer for user's SID */
-
+ char *pname; /* user's name */
+ char *plogsrv; /* Logon server, may be FQDN */
+ char *pdomain; /* Logon domain of the user */
+ PSID psid; /* buffer for user's SID */
public:
uid_t orig_uid; /* Remains intact even after impersonation */
uid_t orig_gid; /* Ditto */
uid_t real_uid; /* Remains intact on seteuid, replaced by setuid */
gid_t real_gid; /* Ditto */
+ /* token is needed if set(e)uid should be called. It can be set by a call
+ to `set_impersonation_token()'. */
+ HANDLE token;
+ BOOL impersonated;
+
cygheap_user () : pname (NULL), plogsrv (NULL), pdomain (NULL), psid (NULL) {}
~cygheap_user ();