* sec_helper.cc: Remove unused code.
This commit is contained in:
parent
63a87c815a
commit
892635fd9f
|
@ -1,3 +1,7 @@
|
|||
2007-07-19 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* sec_helper.cc: Remove unused code.
|
||||
|
||||
2007-07-19 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* autoload.cc (SetSecurityDescriptorControl): Drop.
|
||||
|
|
|
@ -291,77 +291,6 @@ security_descriptor::free ()
|
|||
sd_size = 0;
|
||||
}
|
||||
|
||||
#if 0 // unused
|
||||
#define SIDLEN (sidlen = MAX_SID_LEN, &sidlen)
|
||||
#define DOMLEN (domlen = INTERNET_MAX_HOST_NAME_LENGTH, &domlen)
|
||||
|
||||
BOOL
|
||||
lookup_name (const char *name, const char *logsrv, PSID ret_sid)
|
||||
{
|
||||
cygsid sid;
|
||||
DWORD sidlen;
|
||||
char domuser[INTERNET_MAX_HOST_NAME_LENGTH + UNLEN + 2];
|
||||
char dom[INTERNET_MAX_HOST_NAME_LENGTH + 1];
|
||||
DWORD domlen;
|
||||
SID_NAME_USE acc_type;
|
||||
|
||||
debug_printf ("name : %s", name ? name : "NULL");
|
||||
|
||||
if (!name)
|
||||
return FALSE;
|
||||
|
||||
if (cygheap->user.domain ())
|
||||
{
|
||||
strcat (strcat (strcpy (domuser, cygheap->user.domain ()), "\\"), name);
|
||||
if (LookupAccountName (NULL, domuser, sid, SIDLEN, dom, DOMLEN, &acc_type)
|
||||
&& legal_sid_type (acc_type))
|
||||
goto got_it;
|
||||
if (logsrv && *logsrv
|
||||
&& LookupAccountName (logsrv, domuser, sid, SIDLEN,
|
||||
dom, DOMLEN, &acc_type)
|
||||
&& legal_sid_type (acc_type))
|
||||
goto got_it;
|
||||
}
|
||||
if (logsrv && *logsrv)
|
||||
{
|
||||
if (LookupAccountName (logsrv, name, sid, SIDLEN, dom, DOMLEN, &acc_type)
|
||||
&& legal_sid_type (acc_type))
|
||||
goto got_it;
|
||||
if (acc_type == SidTypeDomain)
|
||||
{
|
||||
strcat (strcat (strcpy (domuser, dom), "\\"), name);
|
||||
if (LookupAccountName (logsrv, domuser, sid, SIDLEN,
|
||||
dom, DOMLEN, &acc_type))
|
||||
goto got_it;
|
||||
}
|
||||
}
|
||||
if (LookupAccountName (NULL, name, sid, SIDLEN, dom, DOMLEN, &acc_type)
|
||||
&& legal_sid_type (acc_type))
|
||||
goto got_it;
|
||||
if (acc_type == SidTypeDomain)
|
||||
{
|
||||
strcat (strcat (strcpy (domuser, dom), "\\"), name);
|
||||
if (LookupAccountName (NULL, domuser, sid, SIDLEN, dom, DOMLEN,&acc_type))
|
||||
goto got_it;
|
||||
}
|
||||
debug_printf ("LookupAccountName (%s) %E", name);
|
||||
__seterrno ();
|
||||
return FALSE;
|
||||
|
||||
got_it:
|
||||
debug_printf ("sid : [%d]", *GetSidSubAuthority ((PSID) sid,
|
||||
*GetSidSubAuthorityCount ((PSID) sid) - 1));
|
||||
|
||||
if (ret_sid)
|
||||
memcpy (ret_sid, sid, sidlen);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#undef SIDLEN
|
||||
#undef DOMLEN
|
||||
#endif //unused
|
||||
|
||||
/* Index must match the correspoding foo_PRIVILEGE value, see security.h. */
|
||||
static const char *cygpriv[] =
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue