2 Unix SMB/CIFS implementation.
4 Winbind ADS backend functions
6 Copyright (C) Andrew Tridgell 2001
7 Copyright (C) Andrew Bartlett <abartlet@samba.org> 2003
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2 of the License, or
12 (at your option) any later version.
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
29 #define DBGC_CLASS DBGC_WINBIND
31 /* the realm of our primary LDAP server */
32 static char *primary_realm;
36 return our ads connections structure for a domain. We keep the connection
37 open to make things faster
39 static ADS_STRUCT *ads_cached_connection(struct winbindd_domain *domain)
44 if (domain->private) {
45 return (ADS_STRUCT *)domain->private;
48 /* we don't want this to affect the users ccache */
49 setenv("KRB5CCNAME", "MEMORY:winbind_ccache", 1);
51 ads = ads_init(domain->alt_name, domain->name, NULL);
53 DEBUG(1,("ads_init for domain %s failed\n", domain->name));
57 /* the machine acct password might have change - fetch it every time */
58 SAFE_FREE(ads->auth.password);
59 ads->auth.password = secrets_fetch_machine_password(lp_workgroup(), NULL, NULL);
62 SAFE_FREE(ads->auth.realm);
63 ads->auth.realm = strdup(primary_realm);
66 status = ads_connect(ads);
67 if (!ADS_ERR_OK(status) || !ads->config.realm) {
68 extern struct winbindd_methods msrpc_methods, cache_methods;
69 DEBUG(1,("ads_connect for domain %s failed: %s\n",
70 domain->name, ads_errstr(status)));
73 /* if we get ECONNREFUSED then it might be a NT4
74 server, fall back to MSRPC */
75 if (status.error_type == ADS_ERROR_SYSTEM &&
76 status.err.rc == ECONNREFUSED) {
77 DEBUG(1,("Trying MSRPC methods\n"));
78 if (domain->methods == &cache_methods) {
79 domain->backend = &msrpc_methods;
81 domain->methods = &msrpc_methods;
87 /* remember our primary realm for trusted domain support */
89 primary_realm = strdup(ads->config.realm);
92 domain->private = (void *)ads;
97 /* Query display info for a realm. This is the basic user list fn */
98 static NTSTATUS query_user_list(struct winbindd_domain *domain,
101 WINBIND_USERINFO **info)
103 ADS_STRUCT *ads = NULL;
104 const char *attrs[] = {"userPrincipalName",
106 "name", "objectSid", "primaryGroupID",
107 "sAMAccountType", NULL};
112 NTSTATUS status = NT_STATUS_UNSUCCESSFUL;
116 DEBUG(3,("ads: query_user_list\n"));
118 ads = ads_cached_connection(domain);
121 domain->last_status = NT_STATUS_SERVER_DISABLED;
125 rc = ads_search_retry(ads, &res, "(objectCategory=user)", attrs);
126 if (!ADS_ERR_OK(rc)) {
127 DEBUG(1,("query_user_list ads_search: %s\n", ads_errstr(rc)));
131 count = ads_count_replies(ads, res);
133 DEBUG(1,("query_user_list: No users found\n"));
137 (*info) = talloc_zero(mem_ctx, count * sizeof(**info));
139 status = NT_STATUS_NO_MEMORY;
145 for (msg = ads_first_entry(ads, res); msg; msg = ads_next_entry(ads, msg)) {
153 if (!ads_pull_uint32(ads, msg, "sAMAccountType", &atype) ||
154 ads_atype_map(atype) != SID_NAME_USER) {
155 DEBUG(1,("Not a user account? atype=0x%x\n", atype));
159 name = ads_pull_username(ads, mem_ctx, msg);
160 gecos = ads_pull_string(ads, mem_ctx, msg, "name");
161 if (!ads_pull_sid(ads, msg, "objectSid", &sid)) {
162 DEBUG(1,("No sid for %s !?\n", name));
165 if (!ads_pull_uint32(ads, msg, "primaryGroupID", &group)) {
166 DEBUG(1,("No primary group for %s !?\n", name));
170 sid2 = talloc(mem_ctx, sizeof(*sid2));
172 status = NT_STATUS_NO_MEMORY;
176 sid_copy(sid2, &sid);
178 group_sid = rid_to_talloced_sid(domain, mem_ctx, group);
180 (*info)[i].acct_name = name;
181 (*info)[i].full_name = gecos;
182 (*info)[i].user_sid = sid2;
183 (*info)[i].group_sid = group_sid;
188 status = NT_STATUS_OK;
190 DEBUG(3,("ads query_user_list gave %d entries\n", (*num_entries)));
193 if (res) ads_msgfree(ads, res);
198 /* list all domain groups */
199 static NTSTATUS enum_dom_groups(struct winbindd_domain *domain,
202 struct acct_info **info)
204 ADS_STRUCT *ads = NULL;
205 const char *attrs[] = {"userPrincipalName", "sAMAccountName",
207 "sAMAccountType", NULL};
212 NTSTATUS status = NT_STATUS_UNSUCCESSFUL;
217 DEBUG(3,("ads: enum_dom_groups\n"));
219 ads = ads_cached_connection(domain);
222 domain->last_status = NT_STATUS_SERVER_DISABLED;
226 rc = ads_search_retry(ads, &res, "(objectCategory=group)", attrs);
227 if (!ADS_ERR_OK(rc)) {
228 DEBUG(1,("enum_dom_groups ads_search: %s\n", ads_errstr(rc)));
232 count = ads_count_replies(ads, res);
234 DEBUG(1,("enum_dom_groups: No groups found\n"));
238 (*info) = talloc_zero(mem_ctx, count * sizeof(**info));
240 status = NT_STATUS_NO_MEMORY;
246 group_flags = ATYPE_GLOBAL_GROUP;
248 /* only grab domain local groups for our domain */
249 if ( domain->native_mode && strequal(lp_realm(), domain->alt_name) )
250 group_flags |= ATYPE_LOCAL_GROUP;
252 for (msg = ads_first_entry(ads, res); msg; msg = ads_next_entry(ads, msg)) {
258 if (!ads_pull_uint32(ads, msg, "sAMAccountType", &account_type) || !(account_type & group_flags) )
261 name = ads_pull_username(ads, mem_ctx, msg);
262 gecos = ads_pull_string(ads, mem_ctx, msg, "name");
263 if (!ads_pull_sid(ads, msg, "objectSid", &sid)) {
264 DEBUG(1,("No sid for %s !?\n", name));
268 if (!sid_peek_check_rid(&domain->sid, &sid, &rid)) {
269 DEBUG(1,("No rid for %s !?\n", name));
273 fstrcpy((*info)[i].acct_name, name);
274 fstrcpy((*info)[i].acct_desc, gecos);
275 (*info)[i].rid = rid;
281 status = NT_STATUS_OK;
283 DEBUG(3,("ads enum_dom_groups gave %d entries\n", (*num_entries)));
286 if (res) ads_msgfree(ads, res);
291 /* list all domain local groups */
292 static NTSTATUS enum_local_groups(struct winbindd_domain *domain,
295 struct acct_info **info)
298 * This is a stub function only as we returned the domain
299 * local groups in enum_dom_groups() if the domain->native field
300 * was true. This is a simple performance optimization when
303 * if we ever need to enumerate domain local groups separately,
304 * then this the optimization in enum_dom_groups() will need
312 /* convert a single name to a sid in a domain */
313 static NTSTATUS name_to_sid(struct winbindd_domain *domain,
317 enum SID_NAME_USE *type)
321 DEBUG(3,("ads: name_to_sid\n"));
323 ads = ads_cached_connection(domain);
326 domain->last_status = NT_STATUS_SERVER_DISABLED;
327 return NT_STATUS_UNSUCCESSFUL;
330 return ads_name_to_sid(ads, name, sid, type);
333 /* convert a sid to a user or group name */
334 static NTSTATUS sid_to_name(struct winbindd_domain *domain,
338 enum SID_NAME_USE *type)
340 ADS_STRUCT *ads = NULL;
341 DEBUG(3,("ads: sid_to_name\n"));
343 ads = ads_cached_connection(domain);
346 domain->last_status = NT_STATUS_SERVER_DISABLED;
347 return NT_STATUS_UNSUCCESSFUL;
350 return ads_sid_to_name(ads, mem_ctx, sid, name, type);
354 /* convert a DN to a name, SID and name type
355 this might become a major speed bottleneck if groups have
356 lots of users, in which case we could cache the results
358 static BOOL dn_lookup(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx,
360 char **name, uint32 *name_type, DOM_SID *sid)
364 const char *attrs[] = {"userPrincipalName", "sAMAccountName",
365 "objectSid", "sAMAccountType", NULL};
368 char *escaped_dn = escape_ldap_string_alloc(dn);
370 DEBUG(3,("ads: dn_lookup\n"));
376 asprintf(&ldap_exp, "(distinguishedName=%s)", dn);
377 rc = ads_search_retry(ads, &res, ldap_exp, attrs);
379 SAFE_FREE(escaped_dn);
381 if (!ADS_ERR_OK(rc)) {
385 (*name) = ads_pull_username(ads, mem_ctx, res);
387 if (!ads_pull_uint32(ads, res, "sAMAccountType", &atype)) {
390 (*name_type) = ads_atype_map(atype);
392 if (!ads_pull_sid(ads, res, "objectSid", sid)) {
396 if (res) ads_msgfree(ads, res);
400 if (res) ads_msgfree(ads, res);
404 /* Lookup user information from a rid */
405 static NTSTATUS query_user(struct winbindd_domain *domain,
408 WINBIND_USERINFO *info)
410 ADS_STRUCT *ads = NULL;
411 const char *attrs[] = {"userPrincipalName",
414 "primaryGroupID", NULL};
421 NTSTATUS status = NT_STATUS_UNSUCCESSFUL;
425 DEBUG(3,("ads: query_user\n"));
427 ads = ads_cached_connection(domain);
430 domain->last_status = NT_STATUS_SERVER_DISABLED;
434 sidstr = sid_binstring(sid);
435 asprintf(&ldap_exp, "(objectSid=%s)", sidstr);
436 rc = ads_search_retry(ads, &msg, ldap_exp, attrs);
439 if (!ADS_ERR_OK(rc)) {
440 DEBUG(1,("query_user(sid=%s) ads_search: %s\n", sid_to_string(sid_string, sid), ads_errstr(rc)));
444 count = ads_count_replies(ads, msg);
446 DEBUG(1,("query_user(sid=%s): Not found\n", sid_to_string(sid_string, sid)));
450 info->acct_name = ads_pull_username(ads, mem_ctx, msg);
451 info->full_name = ads_pull_string(ads, mem_ctx, msg, "name");
453 if (!ads_pull_uint32(ads, msg, "primaryGroupID", &group_rid)) {
454 DEBUG(1,("No primary group for %s !?\n", sid_to_string(sid_string, sid)));
458 sid2 = talloc(mem_ctx, sizeof(*sid2));
460 status = NT_STATUS_NO_MEMORY;
465 info->user_sid = sid2;
467 info->group_sid = rid_to_talloced_sid(domain, mem_ctx, group_rid);
469 status = NT_STATUS_OK;
471 DEBUG(3,("ads query_user gave %s\n", info->acct_name));
473 if (msg) ads_msgfree(ads, msg);
478 /* Lookup groups a user is a member of - alternate method, for when
479 tokenGroups are not available. */
480 static NTSTATUS lookup_usergroups_alt(struct winbindd_domain *domain,
483 DOM_SID *primary_group,
484 uint32 *num_groups, DOM_SID ***user_gids)
487 NTSTATUS status = NT_STATUS_UNSUCCESSFUL;
493 const char *group_attrs[] = {"objectSid", NULL};
495 DEBUG(3,("ads: lookup_usergroups_alt\n"));
497 ads = ads_cached_connection(domain);
500 domain->last_status = NT_STATUS_SERVER_DISABLED;
504 /* buggy server, no tokenGroups. Instead lookup what groups this user
505 is a member of by DN search on member*/
506 if (asprintf(&ldap_exp, "(&(member=%s)(objectClass=group))", user_dn) == -1) {
507 DEBUG(1,("lookup_usergroups(dn=%s) asprintf failed!\n", user_dn));
508 return NT_STATUS_NO_MEMORY;
511 rc = ads_search_retry(ads, &res, ldap_exp, group_attrs);
514 if (!ADS_ERR_OK(rc)) {
515 DEBUG(1,("lookup_usergroups ads_search member=%s: %s\n", user_dn, ads_errstr(rc)));
516 return ads_ntstatus(rc);
519 count = ads_count_replies(ads, res);
521 DEBUG(5,("lookup_usergroups: No supp groups found\n"));
523 status = ads_ntstatus(rc);
527 (*user_gids) = talloc_zero(mem_ctx, sizeof(**user_gids) * (count + 1));
528 (*user_gids)[0] = primary_group;
532 for (msg = ads_first_entry(ads, res); msg; msg = ads_next_entry(ads, msg)) {
535 if (!ads_pull_sid(ads, msg, "objectSid", &group_sid)) {
536 DEBUG(1,("No sid for this group ?!?\n"));
540 if (sid_equal(&group_sid, primary_group)) continue;
542 (*user_gids)[*num_groups] = talloc(mem_ctx, sizeof(***user_gids));
543 if (!(*user_gids)[*num_groups]) {
544 status = NT_STATUS_NO_MEMORY;
548 sid_copy((*user_gids)[*num_groups], &group_sid);
554 status = NT_STATUS_OK;
556 DEBUG(3,("ads lookup_usergroups (alt) for dn=%s\n", user_dn));
558 if (res) ads_msgfree(ads, res);
559 if (msg) ads_msgfree(ads, msg);
564 /* Lookup groups a user is a member of. */
565 static NTSTATUS lookup_usergroups(struct winbindd_domain *domain,
568 uint32 *num_groups, DOM_SID ***user_gids)
570 ADS_STRUCT *ads = NULL;
571 const char *attrs[] = {"distinguishedName", NULL};
572 const char *attrs2[] = {"tokenGroups", "primaryGroupID", NULL};
580 DOM_SID *primary_group;
581 uint32 primary_group_rid;
584 NTSTATUS status = NT_STATUS_UNSUCCESSFUL;
586 DEBUG(3,("ads: lookup_usergroups\n"));
589 ads = ads_cached_connection(domain);
592 domain->last_status = NT_STATUS_SERVER_DISABLED;
596 if (!(sidstr = sid_binstring(sid))) {
597 DEBUG(1,("lookup_usergroups(sid=%s) sid_binstring returned NULL\n", sid_to_string(sid_string, sid)));
598 status = NT_STATUS_NO_MEMORY;
601 if (asprintf(&ldap_exp, "(objectSid=%s)", sidstr) == -1) {
603 DEBUG(1,("lookup_usergroups(sid=%s) asprintf failed!\n", sid_to_string(sid_string, sid)));
604 status = NT_STATUS_NO_MEMORY;
608 rc = ads_search_retry(ads, &msg, ldap_exp, attrs);
612 if (!ADS_ERR_OK(rc)) {
613 DEBUG(1,("lookup_usergroups(sid=%s) ads_search: %s\n", sid_to_string(sid_string, sid), ads_errstr(rc)));
617 user_dn = ads_pull_string(ads, mem_ctx, msg, "distinguishedName");
619 DEBUG(1,("lookup_usergroups(sid=%s) ads_search did not return a a distinguishedName!\n", sid_to_string(sid_string, sid)));
620 if (msg) ads_msgfree(ads, msg);
624 if (msg) ads_msgfree(ads, msg);
626 rc = ads_search_retry_dn(ads, &msg, user_dn, attrs2);
627 if (!ADS_ERR_OK(rc)) {
628 DEBUG(1,("lookup_usergroups(sid=%s) ads_search tokenGroups: %s\n", sid_to_string(sid_string, sid), ads_errstr(rc)));
632 if (!ads_pull_uint32(ads, msg, "primaryGroupID", &primary_group_rid)) {
633 DEBUG(1,("%s: No primary group for sid=%s !?\n", domain->name, sid_to_string(sid_string, sid)));
637 primary_group = rid_to_talloced_sid(domain, mem_ctx, primary_group_rid);
639 count = ads_pull_sids(ads, mem_ctx, msg, "tokenGroups", &sids);
641 if (msg) ads_msgfree(ads, msg);
643 /* there must always be at least one group in the token,
644 unless we are talking to a buggy Win2k server */
646 return lookup_usergroups_alt(domain, mem_ctx, user_dn,
648 num_groups, user_gids);
651 (*user_gids) = talloc_zero(mem_ctx, sizeof(**user_gids) * (count + 1));
652 (*user_gids)[0] = primary_group;
656 for (i=0;i<count;i++) {
657 if (sid_equal(&sids[i], primary_group)) continue;
659 (*user_gids)[*num_groups] = talloc(mem_ctx, sizeof(***user_gids));
660 if (!(*user_gids)[*num_groups]) {
661 status = NT_STATUS_NO_MEMORY;
665 sid_copy((*user_gids)[*num_groups], &sids[i]);
669 status = NT_STATUS_OK;
670 DEBUG(3,("ads lookup_usergroups for sid=%s\n", sid_to_string(sid_string, sid)));
676 find the members of a group, given a group rid and domain
678 static NTSTATUS lookup_groupmem(struct winbindd_domain *domain,
680 DOM_SID *group_sid, uint32 *num_names,
681 DOM_SID ***sid_mem, char ***names,
687 ADS_STRUCT *ads = NULL;
689 NTSTATUS status = NT_STATUS_UNSUCCESSFUL;
691 const char *attrs[] = {"member", NULL};
696 DEBUG(10,("ads: lookup_groupmem %s sid=%s\n", domain->name, sid_string_static(group_sid)));
700 ads = ads_cached_connection(domain);
703 domain->last_status = NT_STATUS_SERVER_DISABLED;
707 sidstr = sid_binstring(group_sid);
709 /* search for all members of the group */
710 asprintf(&ldap_exp, "(objectSid=%s)",sidstr);
711 rc = ads_search_retry(ads, &res, ldap_exp, attrs);
715 if (!ADS_ERR_OK(rc)) {
716 DEBUG(1,("query_user_list ads_search: %s\n", ads_errstr(rc)));
720 count = ads_count_replies(ads, res);
722 status = NT_STATUS_OK;
726 members = ads_pull_strings(ads, mem_ctx, res, "member");
728 /* no members? ok ... */
729 status = NT_STATUS_OK;
733 /* now we need to turn a list of members into rids, names and name types
734 the problem is that the members are in the form of distinguised names
736 for (i=0;members[i];i++) /* noop */ ;
739 (*sid_mem) = talloc_zero(mem_ctx, sizeof(**sid_mem) * num_members);
740 (*name_types) = talloc_zero(mem_ctx, sizeof(**name_types) * num_members);
741 (*names) = talloc_zero(mem_ctx, sizeof(**names) * num_members);
743 for (i=0;i<num_members;i++) {
748 if (dn_lookup(ads, mem_ctx, members[i], &name, &name_type, &sid)) {
749 (*names)[*num_names] = name;
750 (*name_types)[*num_names] = name_type;
751 (*sid_mem)[*num_names] = talloc(mem_ctx, sizeof(***sid_mem));
752 if (!(*sid_mem)[*num_names]) {
753 status = NT_STATUS_NO_MEMORY;
756 sid_copy((*sid_mem)[*num_names], &sid);
761 status = NT_STATUS_OK;
762 DEBUG(3,("ads lookup_groupmem for sid=%s\n", sid_to_string(sid_string, group_sid)));
764 if (res) ads_msgfree(ads, res);
770 /* find the sequence number for a domain */
771 static NTSTATUS sequence_number(struct winbindd_domain *domain, uint32 *seq)
773 ADS_STRUCT *ads = NULL;
776 DEBUG(3,("ads: fetch sequence_number for %s\n", domain->name));
778 *seq = DOM_SEQUENCE_NONE;
780 ads = ads_cached_connection(domain);
783 domain->last_status = NT_STATUS_SERVER_DISABLED;
784 return NT_STATUS_UNSUCCESSFUL;
787 rc = ads_USN(ads, seq);
788 if (!ADS_ERR_OK(rc)) {
789 /* its a dead connection */
791 domain->private = NULL;
793 return ads_ntstatus(rc);
796 /* get a list of trusted domains */
797 static NTSTATUS trusted_domains(struct winbindd_domain *domain,
804 NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
805 DS_DOMAIN_TRUSTS *domains = NULL;
808 struct cli_state *cli = NULL;
809 /* i think we only need our forest and downlevel trusted domains */
810 uint32 flags = DS_DOMAIN_IN_FOREST | DS_DOMAIN_DIRECT_OUTBOUND;
812 DEBUG(3,("ads: trusted_domains\n"));
819 if ( !NT_STATUS_IS_OK(result = cm_fresh_connection(domain->name, PI_NETLOGON, &cli)) ) {
820 DEBUG(5, ("trusted_domains: Could not open a connection to %s for PIPE_NETLOGON (%s)\n",
821 domain->name, nt_errstr(result)));
822 return NT_STATUS_UNSUCCESSFUL;
825 if ( NT_STATUS_IS_OK(result) )
826 result = cli_ds_enum_domain_trusts( cli, mem_ctx, cli->desthost, flags, &domains, &count );
828 if ( NT_STATUS_IS_OK(result) && count) {
830 /* Allocate memory for trusted domain names and sids */
832 if ( !(*names = (char **)talloc(mem_ctx, sizeof(char *) * count)) ) {
833 DEBUG(0, ("trusted_domains: out of memory\n"));
834 result = NT_STATUS_NO_MEMORY;
838 if ( !(*alt_names = (char **)talloc(mem_ctx, sizeof(char *) * count)) ) {
839 DEBUG(0, ("trusted_domains: out of memory\n"));
840 result = NT_STATUS_NO_MEMORY;
844 if ( !(*dom_sids = (DOM_SID *)talloc(mem_ctx, sizeof(DOM_SID) * count)) ) {
845 DEBUG(0, ("trusted_domains: out of memory\n"));
846 result = NT_STATUS_NO_MEMORY;
850 /* Copy across names and sids */
852 for (i = 0; i < count; i++) {
857 (*alt_names)[i] = NULL;
858 ZERO_STRUCT( (*dom_sids)[i] );
860 if ( domains[i].netbios_ptr ) {
861 unistr2_to_ascii(tmp, &domains[i].netbios_domain, sizeof(tmp) - 1);
862 (*names)[i] = talloc_strdup(mem_ctx, tmp);
865 if ( domains[i].dns_ptr ) {
866 unistr2_to_ascii(tmp2, &domains[i].dns_domain, sizeof(tmp2) - 1);
867 (*alt_names)[i] = talloc_strdup(mem_ctx, tmp2);
870 /* sometimes we will get back a NULL SID from this call */
872 if ( domains[i].sid_ptr )
873 sid_copy(&(*dom_sids)[i], &domains[i].sid.sid);
876 *num_domains = count;
881 SAFE_FREE( domains );
883 /* remove connection; This is a special case to the \NETLOGON pipe */
891 /* find the domain sid for a domain */
892 static NTSTATUS domain_sid(struct winbindd_domain *domain, DOM_SID *sid)
897 DEBUG(3,("ads: domain_sid\n"));
899 ads = ads_cached_connection(domain);
902 domain->last_status = NT_STATUS_SERVER_DISABLED;
903 return NT_STATUS_UNSUCCESSFUL;
906 rc = ads_domain_sid(ads, sid);
908 if (!ADS_ERR_OK(rc)) {
909 /* its a dead connection */
911 domain->private = NULL;
914 return ads_ntstatus(rc);
918 /* find alternate names list for the domain - for ADS this is the
920 static NTSTATUS alternate_name(struct winbindd_domain *domain)
927 DEBUG(3,("ads: alternate_name\n"));
929 ads = ads_cached_connection(domain);
932 domain->last_status = NT_STATUS_SERVER_DISABLED;
933 return NT_STATUS_UNSUCCESSFUL;
936 if (!(ctx = talloc_init("alternate_name"))) {
937 return NT_STATUS_NO_MEMORY;
940 rc = ads_workgroup_name(ads, ctx, &workgroup);
942 if (ADS_ERR_OK(rc)) {
943 fstrcpy(domain->name, workgroup);
944 fstrcpy(domain->alt_name, ads->config.realm);
945 strupper_m(domain->alt_name);
946 strupper_m(domain->name);
951 return ads_ntstatus(rc);
954 /* the ADS backend methods are exposed via this structure */
955 struct winbindd_methods ads_methods = {