From 892635fd9f46dc2afbb41d0fafe14d344050acb7 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Thu, 19 Jul 2007 09:12:09 +0000 Subject: [PATCH] * sec_helper.cc: Remove unused code. --- winsup/cygwin/ChangeLog | 4 +++ winsup/cygwin/sec_helper.cc | 71 ------------------------------------- 2 files changed, 4 insertions(+), 71 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 8b0b4ea05..c5c012ca1 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,7 @@ +2007-07-19 Corinna Vinschen + + * sec_helper.cc: Remove unused code. + 2007-07-19 Corinna Vinschen * autoload.cc (SetSecurityDescriptorControl): Drop. diff --git a/winsup/cygwin/sec_helper.cc b/winsup/cygwin/sec_helper.cc index 6667357a8..4fb6252bc 100644 --- a/winsup/cygwin/sec_helper.cc +++ b/winsup/cygwin/sec_helper.cc @@ -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[] = {