* syscalls.cc (chmod): Simplify conditional.

* sec_helper (cygsid::getfromstr): Reorganize to remove
	calls to strcpy and strtok_r.
	(cygsid::getfromgr): Change type to __uid32_t instead of int.
	Keep only the allow_ntsec branch. Never call LookupAccountSid
	which calls PDCs, simply return -1 in case of failure.
	Use cygsid == instead of calling EqualSid and remove test
	for NULL psid.
	* security.h: Declare cygsid::getfromgr as __uid32_t.
This commit is contained in:
Corinna Vinschen
2002-11-12 15:51:11 +00:00
parent bc612556a8
commit 7a11fe607e
4 changed files with 64 additions and 135 deletions

View File

@@ -57,7 +57,7 @@ public:
BOOL getfrompw (const struct passwd *pw);
BOOL getfromgr (const struct __group32 *gr);
int get_id (BOOL search_grp, int *type = NULL);
__uid32_t get_id (BOOL search_grp, int *type = NULL);
inline int get_uid () { return get_id (FALSE); }
inline int get_gid () { return get_id (TRUE); }