Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2003-07-14 21:04:21 +0400
committerCorinna Vinschen <corinna@vinschen.de>2003-07-14 21:04:21 +0400
commitea3ba114990eb77ddf74d054bd01418ca580cb0b (patch)
tree837c0867009718e779809c4b328212fab4abb4fc /winsup/cygwin/uinfo.cc
parent9ff631a70c520489af06cce5127b9dd5c6e512fe (diff)
* cygheap.h (class cygheap_user): Use INVALID_HANDLE_VALUE as invalid
value for tokens. * syscalls.cc (seteuid32): Ditto. Set new_token to process token if process token is suitable. * uinfo.cc (uinfo_init): Initialize tokens in cygheap user info to INVALID_HANDLE_VALUE. * cygheap.h (enum impersonation): Delete. (cygheap_user::impersonation_state): Delete. (cygheap_user::current_token): New. (cygheap_user::issetuid): Modify to use current_token. (cygheap_user::token): Ditto. (cygheap_user::deimpersonate): Ditto. (cygheap_user::reimpersonate): Ditto. (cygheap_user::has_impersonation_tokens): Ditto. (cygheap_user::close_impersonation_tokens): Ditto. * security.cc (cygwin_set_impersonation_token): Always set the token. (verify_token): Change type of gsid to cygpsid. (get_file_attribute): Use the effective ids. * syscalls.cc (seteuid32): Modify to use cygheap_user::current_token. * uinfo.cc (uinfo_init) Do not set cygheap->user.impersonation_state.
Diffstat (limited to 'winsup/cygwin/uinfo.cc')
-rw-r--r--winsup/cygwin/uinfo.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/winsup/cygwin/uinfo.cc b/winsup/cygwin/uinfo.cc
index f63230d0a..54a7bec9a 100644
--- a/winsup/cygwin/uinfo.cc
+++ b/winsup/cygwin/uinfo.cc
@@ -122,7 +122,9 @@ uinfo_init ()
cygheap->user.orig_uid = cygheap->user.real_uid = myself->uid;
cygheap->user.orig_gid = cygheap->user.real_gid = myself->gid;
- cygheap->user.impersonation_state = IMP_NONE;
+ cygheap->user.external_token = INVALID_HANDLE_VALUE;
+ cygheap->user.internal_token = INVALID_HANDLE_VALUE;
+ cygheap->user.current_token = INVALID_HANDLE_VALUE;
cygheap->user.set_orig_sid (); /* Update the original sid */
}