summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/cygheap.h
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2009-10-13 10:23:31 +0000
committerCorinna Vinschen <corinna@vinschen.de>2009-10-13 10:23:31 +0000
commit0191627a260aee41f464d3e0a2c2d4d067cad5ad (patch)
treefbb1b641d62b3a8955ff1c98b293c8e4fabe4e33 /winsup/cygwin/cygheap.h
parent6c41e710c91ef093e58e6b6923b0696d9383a685 (diff)
downloadcygnal-0191627a260aee41f464d3e0a2c2d4d067cad5ad.tar.gz
cygnal-0191627a260aee41f464d3e0a2c2d4d067cad5ad.tar.bz2
cygnal-0191627a260aee41f464d3e0a2c2d4d067cad5ad.zip
* include/sys/cygwin.h: Add new cygwin_getinfo_type
CW_SET_EXTERNAL_TOKEN. Add new enum CW_TOKEN_IMPERSONATION, CW_TOKEN_RESTRICTED. * cygheap.h (cyguser): New flags ext_token_is_restricted, curr_token_is_restricted and setuid_to_restricted. * external.cc (cygwin_internal): Add CW_SET_EXTERNAL_TOKEN. * sec_auth.cc (set_imp_token): New function. (cygwin_set_impersonation_token): Call set_imp_token (). * security.h (set_imp_token): New prototype. * spawn.cc (spawn_guts): Use CreateProcessAsUserW if restricted token was enabled by setuid(). Do not create new window station in this case. * syscalls.cc (seteuid32): Add handling of restricted external tokens. Set HANDLE_FLAG_INHERIT for primary token. (setuid32): Set setuid_to_restricted flag. * uinfo.cc (uinfo_init): Do not reimpersonate if restricted token was enabled by setuid (). Initialize user.*_restricted flags.
Diffstat (limited to 'winsup/cygwin/cygheap.h')
-rw-r--r--winsup/cygwin/cygheap.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/winsup/cygwin/cygheap.h b/winsup/cygwin/cygheap.h
index 7a39de627..b8ffd3fbe 100644
--- a/winsup/cygwin/cygheap.h
+++ b/winsup/cygwin/cygheap.h
@@ -108,6 +108,9 @@ public:
HANDLE internal_token;
HANDLE curr_primary_token;
HANDLE curr_imp_token;
+ bool ext_token_is_restricted; /* external_token is restricted token */
+ bool curr_token_is_restricted; /* curr_primary_token is restricted token */
+ bool setuid_to_restricted; /* switch to restricted token by setuid () */
/* CGF 2002-06-27. I removed the initializaton from this constructor
since this class is always allocated statically. That means that everything