OSDN Git Service

* sec_helper.cc: Remove unused code.
authorcorinna <corinna>
Thu, 19 Jul 2007 09:12:09 +0000 (09:12 +0000)
committercorinna <corinna>
Thu, 19 Jul 2007 09:12:09 +0000 (09:12 +0000)
winsup/cygwin/ChangeLog
winsup/cygwin/sec_helper.cc

index 8b0b4ea..c5c012c 100644 (file)
@@ -1,5 +1,9 @@
 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.
        * security.cc (alloc_sd): Set security descriptor control flag without
        calling SetSecurityDescriptorControl function.
index 6667357..4fb6252 100644 (file)
@@ -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[] =
 {