s3-winbindd: copy acct_info to wb_acct_info so we dont need passdb for it.
authorGünther Deschner <gd@samba.org>
Tue, 22 Mar 2011 16:43:39 +0000 (17:43 +0100)
committerGünther Deschner <gd@samba.org>
Tue, 29 Mar 2011 23:13:08 +0000 (01:13 +0200)
Guenther

source3/winbindd/winbindd.h
source3/winbindd/winbindd_ads.c
source3/winbindd/winbindd_cache.c
source3/winbindd/winbindd_dual_srv.c
source3/winbindd/winbindd_msrpc.c
source3/winbindd/winbindd_reconnect.c
source3/winbindd/winbindd_rpc.c
source3/winbindd/winbindd_rpc.h
source3/winbindd/winbindd_samr.c

index 3bb60a9f42144c1d22cd3deaba9c27f25709b037..4f0f624d5be123c04101e1640d65f7d28e297fd6 100644 (file)
@@ -219,6 +219,12 @@ struct winbindd_domain {
        struct winbindd_domain *prev, *next;
 };
 
+struct wb_acct_info {
+       fstring acct_name; /* account name */
+       fstring acct_desc; /* account name */
+       uint32_t rid; /* domain-relative RID */
+};
+
 /* per-domain methods. This is how LDAP vs RPC is selected
  */
 struct winbindd_methods {
@@ -236,13 +242,13 @@ struct winbindd_methods {
        NTSTATUS (*enum_dom_groups)(struct winbindd_domain *domain,
                                    TALLOC_CTX *mem_ctx,
                                    uint32 *num_entries, 
-                                   struct acct_info **info);
+                                   struct wb_acct_info **info);
 
        /* get a list of domain local groups */
        NTSTATUS (*enum_local_groups)(struct winbindd_domain *domain,
                                    TALLOC_CTX *mem_ctx,
                                    uint32 *num_entries, 
-                                   struct acct_info **info);
+                                   struct wb_acct_info **info);
 
        /* convert one user or group name to a sid */
        NTSTATUS (*name_to_sid)(struct winbindd_domain *domain,
index 116f87315f013dac1353c00d492bc4b77d87b882..1fa4b81543b2f8beb199a380599b6ed031d89592 100644 (file)
@@ -275,7 +275,7 @@ done:
 static NTSTATUS enum_dom_groups(struct winbindd_domain *domain,
                                TALLOC_CTX *mem_ctx,
                                uint32 *num_entries, 
-                               struct acct_info **info)
+                               struct wb_acct_info **info)
 {
        ADS_STRUCT *ads = NULL;
        const char *attrs[] = {"userPrincipalName", "sAMAccountName",
@@ -349,7 +349,7 @@ static NTSTATUS enum_dom_groups(struct winbindd_domain *domain,
                goto done;
        }
 
-       (*info) = TALLOC_ZERO_ARRAY(mem_ctx, struct acct_info, count);
+       (*info) = TALLOC_ZERO_ARRAY(mem_ctx, struct wb_acct_info, count);
        if (!*info) {
                status = NT_STATUS_NO_MEMORY;
                goto done;
@@ -397,7 +397,7 @@ done:
 static NTSTATUS enum_local_groups(struct winbindd_domain *domain,
                                TALLOC_CTX *mem_ctx,
                                uint32 *num_entries, 
-                               struct acct_info **info)
+                               struct wb_acct_info **info)
 {
        /*
         * This is a stub function only as we returned the domain 
index 5b1757b1dd3ecdbc4fba72089dde90a33fcacaa6..108e0b39b61f903d1df75921247aeac32fbbc4ab 100644 (file)
@@ -1560,7 +1560,7 @@ skip_save:
 static NTSTATUS enum_dom_groups(struct winbindd_domain *domain,
                                TALLOC_CTX *mem_ctx,
                                uint32 *num_entries, 
-                               struct acct_info **info)
+                               struct wb_acct_info **info)
 {
        struct winbind_cache *cache = get_cache(domain);
        struct cache_entry *centry = NULL;
@@ -1582,7 +1582,7 @@ do_fetch_cache:
        if (*num_entries == 0)
                goto do_cached;
 
-       (*info) = TALLOC_ARRAY(mem_ctx, struct acct_info, *num_entries);
+       (*info) = TALLOC_ARRAY(mem_ctx, struct wb_acct_info, *num_entries);
        if (! (*info)) {
                smb_panic_fn("enum_dom_groups out of memory");
        }
@@ -1655,7 +1655,7 @@ skip_save:
 static NTSTATUS enum_local_groups(struct winbindd_domain *domain,
                                TALLOC_CTX *mem_ctx,
                                uint32 *num_entries, 
-                               struct acct_info **info)
+                               struct wb_acct_info **info)
 {
        struct winbind_cache *cache = get_cache(domain);
        struct cache_entry *centry = NULL;
@@ -1677,7 +1677,7 @@ do_fetch_cache:
        if (*num_entries == 0)
                goto do_cached;
 
-       (*info) = TALLOC_ARRAY(mem_ctx, struct acct_info, *num_entries);
+       (*info) = TALLOC_ARRAY(mem_ctx, struct wb_acct_info, *num_entries);
        if (! (*info)) {
                smb_panic_fn("enum_dom_groups out of memory");
        }
index 850367274c2405080eea8ec0e6cad37736cde340..0d3736b2b57eb0a15d14fa766fc38f5bb8b73479 100644 (file)
@@ -246,7 +246,7 @@ NTSTATUS _wbint_QueryGroupList(struct pipes_struct *p,
 {
        struct winbindd_domain *domain = wb_child_domain();
        uint32_t i, num_groups;
-       struct acct_info *groups;
+       struct wb_acct_info *groups;
        struct wbint_Principal *result;
        NTSTATUS status;
 
index 1aa2349bc09260b10841232d635d39ad26bf0601..7bbcf77e8fb9011db7ba74d5ae5a32c99ca53cf6 100644 (file)
@@ -101,11 +101,11 @@ done:
 static NTSTATUS msrpc_enum_dom_groups(struct winbindd_domain *domain,
                                      TALLOC_CTX *mem_ctx,
                                      uint32_t *pnum_info,
-                                     struct acct_info **pinfo)
+                                     struct wb_acct_info **pinfo)
 {
        struct rpc_pipe_client *samr_pipe;
        struct policy_handle dom_pol;
-       struct acct_info *info = NULL;
+       struct wb_acct_info *info = NULL;
        uint32_t num_info = 0;
        TALLOC_CTX *tmp_ctx;
        NTSTATUS status;
@@ -160,11 +160,11 @@ done:
 static NTSTATUS msrpc_enum_local_groups(struct winbindd_domain *domain,
                                        TALLOC_CTX *mem_ctx,
                                        uint32_t *pnum_info,
-                                       struct acct_info **pinfo)
+                                       struct wb_acct_info **pinfo)
 {
        struct rpc_pipe_client *samr_pipe;
        struct policy_handle dom_pol;
-       struct acct_info *info = NULL;
+       struct wb_acct_info *info = NULL;
        uint32_t num_info = 0;
        TALLOC_CTX *tmp_ctx;
        NTSTATUS status;
index d04c1bf61f81ffdf19c95501cdfa7805a26f7025..62bf57ea4add35b04eb2e51f9eb9ea9b77662698 100644 (file)
@@ -93,7 +93,7 @@ static NTSTATUS query_user_list(struct winbindd_domain *domain,
 static NTSTATUS enum_dom_groups(struct winbindd_domain *domain,
                                TALLOC_CTX *mem_ctx,
                                uint32 *num_entries, 
-                               struct acct_info **info)
+                               struct wb_acct_info **info)
 {
        NTSTATUS result;
 
@@ -111,7 +111,7 @@ static NTSTATUS enum_dom_groups(struct winbindd_domain *domain,
 static NTSTATUS enum_local_groups(struct winbindd_domain *domain,
                                  TALLOC_CTX *mem_ctx,
                                  uint32 *num_entries, 
-                                 struct acct_info **info)
+                                 struct wb_acct_info **info)
 {
        NTSTATUS result;
 
index 5efd57e21955ac1ac413562bbba79bda5b6490b5..ac17bc90c2fd43c33335b60447bf9cd18295328e 100644 (file)
@@ -148,9 +148,9 @@ NTSTATUS rpc_enum_dom_groups(TALLOC_CTX *mem_ctx,
                             struct rpc_pipe_client *samr_pipe,
                             struct policy_handle *samr_policy,
                             uint32_t *pnum_info,
-                            struct acct_info **pinfo)
+                            struct wb_acct_info **pinfo)
 {
-       struct acct_info *info = NULL;
+       struct wb_acct_info *info = NULL;
        uint32_t start = 0;
        uint32_t num_info = 0;
        NTSTATUS status, result;
@@ -185,7 +185,7 @@ NTSTATUS rpc_enum_dom_groups(TALLOC_CTX *mem_ctx,
 
                info = TALLOC_REALLOC_ARRAY(mem_ctx,
                                            info,
-                                           struct acct_info,
+                                           struct wb_acct_info,
                                            num_info + count);
                if (info == NULL) {
                        return NT_STATUS_NO_MEMORY;
@@ -211,9 +211,9 @@ NTSTATUS rpc_enum_local_groups(TALLOC_CTX *mem_ctx,
                               struct rpc_pipe_client *samr_pipe,
                               struct policy_handle *samr_policy,
                               uint32_t *pnum_info,
-                              struct acct_info **pinfo)
+                              struct wb_acct_info **pinfo)
 {
-       struct acct_info *info = NULL;
+       struct wb_acct_info *info = NULL;
        uint32_t num_info = 0;
        NTSTATUS status, result;
        struct dcerpc_binding_handle *b = samr_pipe->binding_handle;
@@ -245,7 +245,7 @@ NTSTATUS rpc_enum_local_groups(TALLOC_CTX *mem_ctx,
 
                info = TALLOC_REALLOC_ARRAY(mem_ctx,
                                            info,
-                                           struct acct_info,
+                                           struct wb_acct_info,
                                            num_info + count);
                if (info == NULL) {
                        return  NT_STATUS_NO_MEMORY;
index 42405df6e02f5c1da3d37643f72acabc566d48ca..5513788ec8dd215c6679818a7e72e4af8ae1087d 100644 (file)
@@ -38,14 +38,14 @@ NTSTATUS rpc_enum_dom_groups(TALLOC_CTX *mem_ctx,
                             struct rpc_pipe_client *samr_pipe,
                             struct policy_handle *sam_policy,
                             uint32_t *pnum_info,
-                            struct acct_info **pinfo);
+                            struct wb_acct_info **pinfo);
 
 /* List all domain groups */
 NTSTATUS rpc_enum_local_groups(TALLOC_CTX *mem_ctx,
                               struct rpc_pipe_client *samr_pipe,
                               struct policy_handle *samr_policy,
                               uint32_t *pnum_info,
-                              struct acct_info **pinfo);
+                              struct wb_acct_info **pinfo);
 
 /* Convert a single name to a sid in a domain */
 NTSTATUS rpc_name_to_sid(TALLOC_CTX *mem_ctx,
index 40f0100bc3896aa2603471b47860da42ae41c80f..fd49914328270287eafd8eb3abfb881e5d8384b9 100644 (file)
@@ -180,11 +180,11 @@ static NTSTATUS open_internal_lsa_conn(TALLOC_CTX *mem_ctx,
 static NTSTATUS sam_enum_dom_groups(struct winbindd_domain *domain,
                                    TALLOC_CTX *mem_ctx,
                                    uint32_t *pnum_info,
-                                   struct acct_info **pinfo)
+                                   struct wb_acct_info **pinfo)
 {
        struct rpc_pipe_client *samr_pipe;
        struct policy_handle dom_pol;
-       struct acct_info *info = NULL;
+       struct wb_acct_info *info = NULL;
        uint32_t num_info = 0;
        TALLOC_CTX *tmp_ctx;
        NTSTATUS status, result;
@@ -500,7 +500,7 @@ done:
 static NTSTATUS builtin_enum_dom_groups(struct winbindd_domain *domain,
                                TALLOC_CTX *mem_ctx,
                                uint32 *num_entries,
-                               struct acct_info **info)
+                               struct wb_acct_info **info)
 {
        /* BUILTIN doesn't have domain groups */
        *num_entries = 0;
@@ -546,11 +546,11 @@ static NTSTATUS builtin_trusted_domains(struct winbindd_domain *domain,
 static NTSTATUS sam_enum_local_groups(struct winbindd_domain *domain,
                                      TALLOC_CTX *mem_ctx,
                                      uint32_t *pnum_info,
-                                     struct acct_info **pinfo)
+                                     struct wb_acct_info **pinfo)
 {
        struct rpc_pipe_client *samr_pipe;
        struct policy_handle dom_pol;
-       struct acct_info *info = NULL;
+       struct wb_acct_info *info = NULL;
        uint32_t num_info = 0;
        TALLOC_CTX *tmp_ctx;
        NTSTATUS status, result;