changed query_dispinfo to query_user_list
authorAndrew Tridgell <tridge@samba.org>
Mon, 3 Dec 2001 11:32:55 +0000 (11:32 +0000)
committerAndrew Tridgell <tridge@samba.org>
Mon, 3 Dec 2001 11:32:55 +0000 (11:32 +0000)
(This used to be commit 80010d80f93cfb32c53a1720c7564fb080846f35)

source3/nsswitch/winbindd.h
source3/nsswitch/winbindd_ads.c
source3/nsswitch/winbindd_rpc.c
source3/nsswitch/winbindd_user.c

index 610b4503f7cdef21a38b046728158030f3e421b6..a3c9d0afb713c40f504b4d258516073356e8fdf8 100644 (file)
@@ -82,17 +82,17 @@ typedef struct {
        char *full_name;
        uint32 user_rid;
        uint32 group_rid; /* primary group */
-} WINBIND_DISPINFO;
+} WINBIND_USERINFO;
 
 /* per-domain methods. This is how LDAP vs RPC is selected
    This will eventually be the sole entry point to all the methods,
    I'm just starting small
  */
 struct winbindd_methods {
-       NTSTATUS (*query_dispinfo)(struct winbindd_domain *domain,
+       NTSTATUS (*query_user_list)(struct winbindd_domain *domain,
                                   TALLOC_CTX *mem_ctx,
                                   uint32 *start_ndx, uint32 *num_entries, 
-                                  WINBIND_DISPINFO **info);
+                                  WINBIND_USERINFO **info);
 
        NTSTATUS (*enum_dom_groups)(struct winbindd_domain *domain,
                                    TALLOC_CTX *mem_ctx,
index 5ff5c90b78f3964b0aa3555bd1bc96b2c815a8c1..287151abd7ae5205f1e6f43f4d139a78c3d95f0e 100644 (file)
 #ifdef HAVE_ADS
 
 /* Query display info for a realm. This is the basic user list fn */
-static NTSTATUS query_dispinfo(struct winbindd_domain *domain,
+static NTSTATUS query_user_list(struct winbindd_domain *domain,
                               TALLOC_CTX *mem_ctx,
                               uint32 *start_ndx, uint32 *num_entries, 
-                              WINBIND_DISPINFO **info)
+                              WINBIND_USERINFO **info)
 {
        ADS_STRUCT *ads;
        const char *attrs[] = {"sAMAccountName", "name", "objectSid", "primaryGroupID", 
@@ -37,7 +37,7 @@ static NTSTATUS query_dispinfo(struct winbindd_domain *domain,
        void *res;
        void *msg;
 
-       DEBUG(3,("ads: query_dispinfo\n"));
+       DEBUG(3,("ads: query_user_list\n"));
 
        if ((*start_ndx) != 0) {
                DEBUG(1,("ads backend start_ndx not implemented\n"));
@@ -52,19 +52,19 @@ static NTSTATUS query_dispinfo(struct winbindd_domain *domain,
 
        rc = ads_connect(ads);
        if (rc) {
-               DEBUG(1,("query_dispinfo ads_connect: %s\n", ads_errstr(rc)));
+               DEBUG(1,("query_user_list ads_connect: %s\n", ads_errstr(rc)));
                return NT_STATUS_UNSUCCESSFUL;
        }
 
        rc = ads_search(ads, &res, "(objectclass=user)", attrs);
        if (rc) {
-               DEBUG(1,("query_dispinfo ads_search: %s\n", ads_errstr(rc)));
+               DEBUG(1,("query_user_list ads_search: %s\n", ads_errstr(rc)));
                return NT_STATUS_UNSUCCESSFUL;
        }
 
        count = ads_count_replies(ads, res);
        if (count == 0) {
-               DEBUG(1,("query_dispinfo: No users found\n"));
+               DEBUG(1,("query_user_list: No users found\n"));
                return NT_STATUS_UNSUCCESSFUL;
        }
 
@@ -141,19 +141,19 @@ static NTSTATUS enum_dom_groups(struct winbindd_domain *domain,
 
        rc = ads_connect(ads);
        if (rc) {
-               DEBUG(1,("query_dispinfo ads_connect: %s\n", ads_errstr(rc)));
+               DEBUG(1,("query_user_list ads_connect: %s\n", ads_errstr(rc)));
                return NT_STATUS_UNSUCCESSFUL;
        }
 
        rc = ads_search(ads, &res, "(objectclass=group)", attrs);
        if (rc) {
-               DEBUG(1,("query_dispinfo ads_search: %s\n", ads_errstr(rc)));
+               DEBUG(1,("query_user_list ads_search: %s\n", ads_errstr(rc)));
                return NT_STATUS_UNSUCCESSFUL;
        }
 
        count = ads_count_replies(ads, res);
        if (count == 0) {
-               DEBUG(1,("query_dispinfo: No users found\n"));
+               DEBUG(1,("query_user_list: No users found\n"));
                return NT_STATUS_UNSUCCESSFUL;
        }
 
@@ -273,7 +273,7 @@ static NTSTATUS name_to_sid(struct winbindd_domain *domain,
 
 /* the ADS backend methods are exposed via this structure */
 struct winbindd_methods ads_methods = {
-       query_dispinfo,
+       query_user_list,
        enum_dom_groups,
        name_to_sid,
        /* I can't see a good way to do a sid to name mapping with ldap,
index bf2cc5d9d304e86e4cc68044f48fb0fcd8cd2ba0..e4654254cb0a72602c3274e4d43eb301f1bbf6f2 100644 (file)
 /* Query display info for a domain.  This returns enough information plus a
    bit extra to give an overview of domain users for the User Manager
    application. */
-static NTSTATUS query_dispinfo(struct winbindd_domain *domain,
+static NTSTATUS query_user_list(struct winbindd_domain *domain,
                               TALLOC_CTX *mem_ctx,
                               uint32 *start_ndx, uint32 *num_entries, 
-                              WINBIND_DISPINFO **info)
+                              WINBIND_USERINFO **info)
 {
        CLI_POLICY_HND *hnd;
        NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
@@ -62,8 +62,8 @@ static NTSTATUS query_dispinfo(struct winbindd_domain *domain,
                                        &dom_pol, start_ndx, 1,
                                        num_entries, 0xffff, &ctr);
 
-       /* now map the result into the WINBIND_DISPINFO structure */
-       (*info) = (WINBIND_DISPINFO *)talloc(mem_ctx, (*num_entries)*sizeof(WINBIND_DISPINFO));
+       /* now map the result into the WINBIND_USERINFO structure */
+       (*info) = (WINBIND_USERINFO *)talloc(mem_ctx, (*num_entries)*sizeof(WINBIND_USERINFO));
        if (!(*info)) {
                return NT_STATUS_NO_MEMORY;
        }
@@ -187,7 +187,7 @@ NTSTATUS winbindd_rpc_sid_to_name(struct winbindd_domain *domain,
 
 /* the rpc backend methods are exposed via this structure */
 struct winbindd_methods msrpc_methods = {
-       query_dispinfo,
+       query_user_list,
        enum_dom_groups,
        name_to_sid,
        winbindd_rpc_sid_to_name
index 5a4dd82d78e7d3a1272a1ef7837ef88f73ec5102..ebd9503c7cb7fd00b177c58ce9c2940fd3059f59 100644 (file)
@@ -377,7 +377,7 @@ static BOOL get_sam_user_entries(struct getent_state *ent)
 {
        NTSTATUS status;
        uint32 num_entries;
-       WINBIND_DISPINFO *info;
+       WINBIND_USERINFO *info;
        struct getpwent_user *name_list = NULL;
        BOOL result = False;
        TALLOC_CTX *mem_ctx;
@@ -407,14 +407,14 @@ static BOOL get_sam_user_entries(struct getent_state *ent)
        SAFE_FREE(ent->sam_entries);
        ent->num_sam_entries = 0;
        
-       /* Call query_dispinfo to get a list of usernames and user rids */
+       /* Call query_user_list to get a list of usernames and user rids */
 
        do {
                int i;
                                        
                num_entries = 0;
 
-               status = methods->query_dispinfo(ent->domain, mem_ctx,
+               status = methods->query_user_list(ent->domain, mem_ctx,
                                                 &ent->dispinfo_ndx, 
                                                 &num_entries, &info);
                
@@ -600,7 +600,7 @@ enum winbindd_result winbindd_getpwent(struct winbindd_cli_state *state)
 enum winbindd_result winbindd_list_users(struct winbindd_cli_state *state)
 {
        struct winbindd_domain *domain;
-       WINBIND_DISPINFO *info;
+       WINBIND_USERINFO *info;
        uint32 num_entries = 0, total_entries = 0;
        char *ted, *extra_data = NULL;
        int extra_data_len = 0;
@@ -636,7 +636,7 @@ enum winbindd_result winbindd_list_users(struct winbindd_cli_state *state)
                do {
                        int i;
 
-                       status = methods->query_dispinfo(domain, mem_ctx, &start_ndx, 
+                       status = methods->query_user_list(domain, mem_ctx, &start_ndx, 
                                                         &num_entries, &info);
 
                        if (num_entries == 0)