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:
authorPierre Humblet <phumblet@phumblet.no-ip.org>2003-09-27 05:56:36 +0400
committerPierre Humblet <phumblet@phumblet.no-ip.org>2003-09-27 05:56:36 +0400
commit6806a8b51f96d59cb6dadd86fab4ae7cdecca3ed (patch)
tree513357f0c179f944228ac5f669f9e53b3456cce1 /winsup/cygwin/cygheap.h
parent349a6402fe566a06f18ee2a1e2d412b8b8d9d304 (diff)
2003-09-26 Pierre Humblet <pierre.humblet@ieee.org>
* uinfo.cc (cygheap_user::init): Make sure the current user appears in the default DACL. Rearrange to decrease the indentation levels. Initialize the effec_cygsid directly. (internal_getlogin): Do not reinitialize myself->gid. Open the process token with the required access. * cygheap.h (class cygheap_user): Delete members pid and saved_psid. Create members effec_cygsid and saved_cygsid. (cygheap_user::set_sid): Define inline. (cygheap_user::set_saved_sid): Ditto. (cygheap_user::sid): Modify. (cygheap_user::saved_sid): Modify. * cygheap.cc (cygheap_user::set_sid): Delete. (cygheap_user::set_saved_sid): Ditto. * sec_helper.cc (sec_acl): Set the correct acl size. * autoload.cc (FindFirstFreeAce): Add. * security.h: Define ACL_DEFAULT_SIZE.
Diffstat (limited to 'winsup/cygwin/cygheap.h')
-rw-r--r--winsup/cygwin/cygheap.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/winsup/cygwin/cygheap.h b/winsup/cygwin/cygheap.h
index 3a8085ffb..fc46118a1 100644
--- a/winsup/cygwin/cygheap.h
+++ b/winsup/cygwin/cygheap.h
@@ -106,8 +106,8 @@ class cygheap_user
char *homepath; /* User's home path */
char *pwinname; /* User's name as far as Windows knows it */
char *puserprof; /* User profile */
- PSID psid; /* buffer for user's SID */
- PSID saved_psid; /* Remains intact even after impersonation */
+ cygsid effec_cygsid; /* buffer for user's SID */
+ cygsid saved_cygsid; /* Remains intact even after impersonation */
public:
__uid32_t saved_uid; /* Remains intact even after impersonation */
__gid32_t saved_gid; /* Ditto */
@@ -160,10 +160,10 @@ public:
const char *p = env_domain ("USERDOMAIN=", sizeof ("USERDOMAIN=") - 1);
return (p == almost_null) ? NULL : p;
}
- BOOL set_sid (PSID new_sid);
- BOOL set_saved_sid ();
- PSID sid () const { return psid; }
- PSID saved_sid () const { return saved_psid; }
+ BOOL set_sid (PSID new_sid) {return (BOOL) (effec_cygsid = new_sid);}
+ BOOL set_saved_sid () { return (BOOL) (saved_cygsid = effec_cygsid); }
+ PSID sid () { return effec_cygsid; }
+ PSID saved_sid () { return saved_cygsid; }
const char *ontherange (homebodies what, struct passwd * = NULL);
bool issetuid () const { return current_token != INVALID_HANDLE_VALUE; }
HANDLE token () { return current_token; }