s3: Make parse_sidlist public
authorVolker Lendecke <vl@samba.org>
Tue, 8 Mar 2011 13:23:15 +0000 (14:23 +0100)
committerJeremy Allison <jra@samba.org>
Wed, 13 Apr 2011 21:13:24 +0000 (14:13 -0700)
Signed-off-by: Jeremy Allison <jra@samba.org>
source3/winbindd/winbindd_getsidaliases.c
source3/winbindd/winbindd_proto.h
source3/winbindd/winbindd_util.c

index a90bfb31d43b9b8d4cb1fc0c23bc41c388022c71..f01dac9c4ce9cd3ab1f2fd29184577231d12cc7b 100644 (file)
@@ -27,9 +27,6 @@ struct winbindd_getsidaliases_state {
        uint32_t *aliases;
 };
 
-static bool parse_sidlist(TALLOC_CTX *mem_ctx, const char *sidstr,
-                         struct dom_sid **sids, uint32_t *num_sids);
-
 static void winbindd_getsidaliases_done(struct tevent_req *subreq);
 
 struct tevent_req *winbindd_getsidaliases_send(TALLOC_CTX *mem_ctx,
@@ -155,34 +152,3 @@ NTSTATUS winbindd_getsidaliases_recv(struct tevent_req *req,
        response->data.num_entries = state->num_aliases;
        return NT_STATUS_OK;
 }
-
-static bool parse_sidlist(TALLOC_CTX *mem_ctx, const char *sidstr,
-                         struct dom_sid **sids, uint32_t *num_sids)
-{
-       const char *p;
-
-       p = sidstr;
-       if (p == NULL)
-               return False;
-
-       while (p[0] != '\0') {
-               struct dom_sid sid;
-               const char *q = NULL;
-
-               if (!dom_sid_parse_endp(p, &sid, &q)) {
-                       DEBUG(1, ("Could not parse sid %s\n", p));
-                       return false;
-               }
-               if ((q == NULL) || (q[0] != '\n')) {
-                       DEBUG(1, ("Got invalid sidstr: %s\n", p));
-                       return false;
-               }
-               if (!NT_STATUS_IS_OK(add_sid_to_array(mem_ctx, &sid, sids,
-                                                     num_sids)))
-               {
-                       return False;
-               }
-               p = q+1;
-       }
-       return True;
-}
index a9d5659f98f2967ce396b1beb0bb2a06c98c3160..a5b4a64643243e4c395c69d498eabde815f63567 100644 (file)
@@ -424,6 +424,8 @@ void winbindd_set_locator_kdc_envs(const struct winbindd_domain *domain);
 void winbindd_unset_locator_kdc_env(const struct winbindd_domain *domain);
 void set_auth_errors(struct winbindd_response *resp, NTSTATUS result);
 bool is_domain_offline(const struct winbindd_domain *domain);
+bool parse_sidlist(TALLOC_CTX *mem_ctx, const char *sidstr,
+                  struct dom_sid **sids, uint32_t *num_sids);
 
 /* The following definitions come from winbindd/winbindd_wins.c  */
 
index 1a6cf8722e522ed28fb7fffbe497c0efd30a940a..b43d7b826f5c172d344e7e643bbf13a904540301 100644 (file)
@@ -1370,3 +1370,34 @@ bool is_domain_offline(const struct winbindd_domain *domain)
        }
        return !domain->online;
 }
+
+bool parse_sidlist(TALLOC_CTX *mem_ctx, const char *sidstr,
+                  struct dom_sid **sids, uint32_t *num_sids)
+{
+       const char *p;
+
+       p = sidstr;
+       if (p == NULL)
+               return False;
+
+       while (p[0] != '\0') {
+               struct dom_sid sid;
+               const char *q = NULL;
+
+               if (!dom_sid_parse_endp(p, &sid, &q)) {
+                       DEBUG(1, ("Could not parse sid %s\n", p));
+                       return false;
+               }
+               if ((q == NULL) || (q[0] != '\n')) {
+                       DEBUG(1, ("Got invalid sidstr: %s\n", p));
+                       return false;
+               }
+               if (!NT_STATUS_IS_OK(add_sid_to_array(mem_ctx, &sid, sids,
+                                                     num_sids)))
+               {
+                       return False;
+               }
+               p = q+1;
+       }
+       return True;
+}