* sec_auth.cc (get_user_groups): Mark well-known groups as well-known.

(get_user_local_groups): Ditto.
	(verify_token): Drop useless label.
	* sec_helper.cc (cygsid::get_sid): Check for well-known SID if
	well_known isn't set.
	* security.h (well_known_sid_type): New inline function.
This commit is contained in:
Corinna Vinschen
2011-04-04 09:00:02 +00:00
parent 0d6f2b0117
commit 99edadedc9
3 changed files with 29 additions and 9 deletions

View File

@ -1,7 +1,7 @@
/* security.h: security declarations
Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
2010 Red Hat, Inc.
2010, 2011 Red Hat, Inc.
This file is part of Cygwin.
@ -339,6 +339,12 @@ extern cygpsid well_known_samba_unix_user_fake_sid;
bool privilege_luid (const PWCHAR pname, LUID *luid);
inline BOOL
well_known_sid_type (SID_NAME_USE type)
{
return type == SidTypeAlias || type == SidTypeWellKnownGroup;
}
inline BOOL
legal_sid_type (SID_NAME_USE type)
{