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.
30 #define DBGC_CLASS DBGC_WINBIND
33 return our ads connections structure for a domain. We keep the connection
34 open to make things faster
36 static ADS_STRUCT *ads_cached_connection(struct winbindd_domain *domain)
41 if (domain->private) {
42 return (ADS_STRUCT *)domain->private;
45 /* we don't want this to affect the users ccache */
46 setenv("KRB5CCNAME", "MEMORY:winbind_ccache", 1);
48 ads = ads_init(domain->alt_name, domain->name, NULL);
50 DEBUG(1,("ads_init for domain %s failed\n", domain->name));
54 /* the machine acct password might have change - fetch it every time */
55 SAFE_FREE(ads->auth.password);
56 ads->auth.password = secrets_fetch_machine_password(lp_workgroup(), NULL, NULL);
58 SAFE_FREE(ads->auth.realm);
59 ads->auth.realm = strdup(lp_realm());
61 status = ads_connect(ads);
62 if (!ADS_ERR_OK(status) || !ads->config.realm) {
63 extern struct winbindd_methods msrpc_methods, cache_methods;
64 DEBUG(1,("ads_connect for domain %s failed: %s\n",
65 domain->name, ads_errstr(status)));
68 /* if we get ECONNREFUSED then it might be a NT4
69 server, fall back to MSRPC */
70 if (status.error_type == ADS_ERROR_SYSTEM &&
71 status.err.rc == ECONNREFUSED) {
72 DEBUG(1,("Trying MSRPC methods\n"));
73 if (domain->methods == &cache_methods) {
74 domain->backend = &msrpc_methods;
76 domain->methods = &msrpc_methods;
82 domain->private = (void *)ads;
87 /* Query display info for a realm. This is the basic user list fn */
88 static NTSTATUS query_user_list(struct winbindd_domain *domain,
91 WINBIND_USERINFO **info)
93 ADS_STRUCT *ads = NULL;
94 const char *attrs[] = {"userPrincipalName",
96 "name", "objectSid", "primaryGroupID",
97 "sAMAccountType", NULL};
102 NTSTATUS status = NT_STATUS_UNSUCCESSFUL;
106 DEBUG(3,("ads: query_user_list\n"));
108 ads = ads_cached_connection(domain);
111 domain->last_status = NT_STATUS_SERVER_DISABLED;
115 rc = ads_search_retry(ads, &res, "(objectClass=user)", attrs);
116 if (!ADS_ERR_OK(rc) || !res) {
117 DEBUG(1,("query_user_list ads_search: %s\n", ads_errstr(rc)));
121 count = ads_count_replies(ads, res);
123 DEBUG(1,("query_user_list: No users found\n"));
127 (*info) = talloc_zero(mem_ctx, count * sizeof(**info));
129 status = NT_STATUS_NO_MEMORY;
135 for (msg = ads_first_entry(ads, res); msg; msg = ads_next_entry(ads, msg)) {
143 if (!ads_pull_uint32(ads, msg, "sAMAccountType", &atype) ||
144 ads_atype_map(atype) != SID_NAME_USER) {
145 DEBUG(1,("Not a user account? atype=0x%x\n", atype));
149 name = ads_pull_username(ads, mem_ctx, msg);
150 gecos = ads_pull_string(ads, mem_ctx, msg, "name");
151 if (!ads_pull_sid(ads, msg, "objectSid", &sid)) {
152 DEBUG(1,("No sid for %s !?\n", name));
155 if (!ads_pull_uint32(ads, msg, "primaryGroupID", &group)) {
156 DEBUG(1,("No primary group for %s !?\n", name));
160 sid2 = talloc(mem_ctx, sizeof(*sid2));
162 status = NT_STATUS_NO_MEMORY;
166 sid_copy(sid2, &sid);
168 group_sid = rid_to_talloced_sid(domain, mem_ctx, group);
170 (*info)[i].acct_name = name;
171 (*info)[i].full_name = gecos;
172 (*info)[i].user_sid = sid2;
173 (*info)[i].group_sid = group_sid;
178 status = NT_STATUS_OK;
180 DEBUG(3,("ads query_user_list gave %d entries\n", (*num_entries)));
184 ads_msgfree(ads, res);
189 /* list all domain groups */
190 static NTSTATUS enum_dom_groups(struct winbindd_domain *domain,
193 struct acct_info **info)
195 ADS_STRUCT *ads = NULL;
196 const char *attrs[] = {"userPrincipalName", "sAMAccountName",
198 "sAMAccountType", NULL};
203 NTSTATUS status = NT_STATUS_UNSUCCESSFUL;
208 DEBUG(3,("ads: enum_dom_groups\n"));
210 ads = ads_cached_connection(domain);
213 domain->last_status = NT_STATUS_SERVER_DISABLED;
217 rc = ads_search_retry(ads, &res, "(objectCategory=group)", attrs);
218 if (!ADS_ERR_OK(rc) || !res) {
219 DEBUG(1,("enum_dom_groups ads_search: %s\n", ads_errstr(rc)));
223 count = ads_count_replies(ads, res);
225 DEBUG(1,("enum_dom_groups: No groups found\n"));
229 (*info) = talloc_zero(mem_ctx, count * sizeof(**info));
231 status = NT_STATUS_NO_MEMORY;
237 group_flags = ATYPE_GLOBAL_GROUP;
239 /* only grab domain local groups for our domain */
240 if ( domain->native_mode && strequal(lp_realm(), domain->alt_name) )
241 group_flags |= ATYPE_LOCAL_GROUP;
243 for (msg = ads_first_entry(ads, res); msg; msg = ads_next_entry(ads, msg)) {
249 if (!ads_pull_uint32(ads, msg, "sAMAccountType", &account_type) || !(account_type & group_flags) )
252 name = ads_pull_username(ads, mem_ctx, msg);
253 gecos = ads_pull_string(ads, mem_ctx, msg, "name");
254 if (!ads_pull_sid(ads, msg, "objectSid", &sid)) {
255 DEBUG(1,("No sid for %s !?\n", name));
259 if (!sid_peek_check_rid(&domain->sid, &sid, &rid)) {
260 DEBUG(1,("No rid for %s !?\n", name));
264 fstrcpy((*info)[i].acct_name, name);
265 fstrcpy((*info)[i].acct_desc, gecos);
266 (*info)[i].rid = rid;
272 status = NT_STATUS_OK;
274 DEBUG(3,("ads enum_dom_groups gave %d entries\n", (*num_entries)));
278 ads_msgfree(ads, res);
283 /* list all domain local groups */
284 static NTSTATUS enum_local_groups(struct winbindd_domain *domain,
287 struct acct_info **info)
290 * This is a stub function only as we returned the domain
291 * local groups in enum_dom_groups() if the domain->native field
292 * was true. This is a simple performance optimization when
295 * if we ever need to enumerate domain local groups separately,
296 * then this the optimization in enum_dom_groups() will need
304 /* convert a single name to a sid in a domain */
305 static NTSTATUS name_to_sid(struct winbindd_domain *domain,
309 enum SID_NAME_USE *type)
313 DEBUG(3,("ads: name_to_sid\n"));
315 ads = ads_cached_connection(domain);
318 domain->last_status = NT_STATUS_SERVER_DISABLED;
319 return NT_STATUS_UNSUCCESSFUL;
322 return ads_name_to_sid(ads, name, sid, type);
325 /* convert a sid to a user or group name */
326 static NTSTATUS sid_to_name(struct winbindd_domain *domain,
330 enum SID_NAME_USE *type)
332 ADS_STRUCT *ads = NULL;
333 DEBUG(3,("ads: sid_to_name\n"));
335 ads = ads_cached_connection(domain);
338 domain->last_status = NT_STATUS_SERVER_DISABLED;
339 return NT_STATUS_UNSUCCESSFUL;
342 return ads_sid_to_name(ads, mem_ctx, sid, name, type);
346 /* convert a DN to a name, SID and name type
347 this might become a major speed bottleneck if groups have
348 lots of users, in which case we could cache the results
350 static BOOL dn_lookup(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx,
352 char **name, uint32 *name_type, DOM_SID *sid)
355 const char *attrs[] = {"userPrincipalName", "sAMAccountName",
356 "objectSid", "sAMAccountType", NULL};
359 DEBUG(3,("ads: dn_lookup\n"));
361 rc = ads_search_retry_dn(ads, &res, dn, attrs);
363 if (!ADS_ERR_OK(rc) || !res) {
367 (*name) = ads_pull_username(ads, mem_ctx, res);
369 if (!ads_pull_uint32(ads, res, "sAMAccountType", &atype)) {
372 (*name_type) = ads_atype_map(atype);
374 if (!ads_pull_sid(ads, res, "objectSid", sid)) {
379 ads_msgfree(ads, res);
385 ads_msgfree(ads, res);
390 /* Lookup user information from a rid */
391 static NTSTATUS query_user(struct winbindd_domain *domain,
394 WINBIND_USERINFO *info)
396 ADS_STRUCT *ads = NULL;
397 const char *attrs[] = {"userPrincipalName",
400 "primaryGroupID", NULL};
407 NTSTATUS status = NT_STATUS_UNSUCCESSFUL;
411 DEBUG(3,("ads: query_user\n"));
413 ads = ads_cached_connection(domain);
416 domain->last_status = NT_STATUS_SERVER_DISABLED;
420 sidstr = sid_binstring(sid);
421 asprintf(&ldap_exp, "(objectSid=%s)", sidstr);
422 rc = ads_search_retry(ads, &msg, ldap_exp, attrs);
425 if (!ADS_ERR_OK(rc) || !msg) {
426 DEBUG(1,("query_user(sid=%s) ads_search: %s\n", sid_to_string(sid_string, sid), ads_errstr(rc)));
430 count = ads_count_replies(ads, msg);
432 DEBUG(1,("query_user(sid=%s): Not found\n", sid_to_string(sid_string, sid)));
436 info->acct_name = ads_pull_username(ads, mem_ctx, msg);
437 info->full_name = ads_pull_string(ads, mem_ctx, msg, "name");
439 if (!ads_pull_uint32(ads, msg, "primaryGroupID", &group_rid)) {
440 DEBUG(1,("No primary group for %s !?\n", sid_to_string(sid_string, sid)));
444 sid2 = talloc(mem_ctx, sizeof(*sid2));
446 status = NT_STATUS_NO_MEMORY;
451 info->user_sid = sid2;
453 info->group_sid = rid_to_talloced_sid(domain, mem_ctx, group_rid);
455 status = NT_STATUS_OK;
457 DEBUG(3,("ads query_user gave %s\n", info->acct_name));
460 ads_msgfree(ads, msg);
465 /* Lookup groups a user is a member of - alternate method, for when
466 tokenGroups are not available. */
467 static NTSTATUS lookup_usergroups_alt(struct winbindd_domain *domain,
470 DOM_SID *primary_group,
471 uint32 *num_groups, DOM_SID ***user_gids)
474 NTSTATUS status = NT_STATUS_UNSUCCESSFUL;
480 const char *group_attrs[] = {"objectSid", NULL};
483 DEBUG(3,("ads: lookup_usergroups_alt\n"));
485 ads = ads_cached_connection(domain);
488 domain->last_status = NT_STATUS_SERVER_DISABLED;
492 if (!(escaped_dn = escape_ldap_string_alloc(user_dn))) {
493 status = NT_STATUS_NO_MEMORY;
497 /* buggy server, no tokenGroups. Instead lookup what groups this user
498 is a member of by DN search on member*/
500 if (!(ldap_exp = talloc_asprintf(mem_ctx, "(&(member=%s)(objectClass=group))", escaped_dn))) {
501 DEBUG(1,("lookup_usergroups(dn=%s) asprintf failed!\n", user_dn));
502 SAFE_FREE(escaped_dn);
503 status = NT_STATUS_NO_MEMORY;
507 SAFE_FREE(escaped_dn);
509 rc = ads_search_retry(ads, &res, ldap_exp, group_attrs);
511 if (!ADS_ERR_OK(rc) || !res) {
512 DEBUG(1,("lookup_usergroups ads_search member=%s: %s\n", user_dn, ads_errstr(rc)));
513 return ads_ntstatus(rc);
516 count = ads_count_replies(ads, res);
518 DEBUG(5,("lookup_usergroups: No supp groups found\n"));
520 status = ads_ntstatus(rc);
524 (*user_gids) = talloc_zero(mem_ctx, sizeof(**user_gids) * (count + 1));
525 (*user_gids)[0] = primary_group;
529 for (msg = ads_first_entry(ads, res); msg; msg = ads_next_entry(ads, msg)) {
532 if (!ads_pull_sid(ads, msg, "objectSid", &group_sid)) {
533 DEBUG(1,("No sid for this group ?!?\n"));
537 if (sid_equal(&group_sid, primary_group)) continue;
539 (*user_gids)[*num_groups] = talloc(mem_ctx, sizeof(***user_gids));
540 if (!(*user_gids)[*num_groups]) {
541 status = NT_STATUS_NO_MEMORY;
545 sid_copy((*user_gids)[*num_groups], &group_sid);
551 status = NT_STATUS_OK;
553 DEBUG(3,("ads lookup_usergroups (alt) for dn=%s\n", user_dn));
556 ads_msgfree(ads, res);
561 /* Lookup groups a user is a member of. */
562 static NTSTATUS lookup_usergroups(struct winbindd_domain *domain,
565 uint32 *num_groups, DOM_SID ***user_gids)
567 ADS_STRUCT *ads = NULL;
568 const char *attrs[] = {"tokenGroups", "primaryGroupID", NULL};
571 LDAPMessage *msg = NULL;
575 DOM_SID *primary_group;
576 uint32 primary_group_rid;
578 NTSTATUS status = NT_STATUS_UNSUCCESSFUL;
580 DEBUG(3,("ads: lookup_usergroups\n"));
583 ads = ads_cached_connection(domain);
586 domain->last_status = NT_STATUS_SERVER_DISABLED;
587 status = NT_STATUS_SERVER_DISABLED;
591 rc = ads_sid_to_dn(ads, mem_ctx, sid, &user_dn);
592 if (!ADS_ERR_OK(rc)) {
593 status = ads_ntstatus(rc);
597 rc = ads_search_retry_dn(ads, (void**)&msg, user_dn, attrs);
598 if (!ADS_ERR_OK(rc)) {
599 status = ads_ntstatus(rc);
600 DEBUG(1,("lookup_usergroups(sid=%s) ads_search tokenGroups: %s\n",
601 sid_to_string(sid_string, sid), ads_errstr(rc)));
606 DEBUG(1,("lookup_usergroups(sid=%s) ads_search tokenGroups: NULL msg\n",
607 sid_to_string(sid_string, sid)));
608 status = NT_STATUS_UNSUCCESSFUL;
612 if (!ads_pull_uint32(ads, msg, "primaryGroupID", &primary_group_rid)) {
613 DEBUG(1,("%s: No primary group for sid=%s !?\n",
614 domain->name, sid_to_string(sid_string, sid)));
618 primary_group = rid_to_talloced_sid(domain, mem_ctx, primary_group_rid);
620 count = ads_pull_sids(ads, mem_ctx, msg, "tokenGroups", &sids);
623 ads_msgfree(ads, msg);
625 /* there must always be at least one group in the token,
626 unless we are talking to a buggy Win2k server */
628 return lookup_usergroups_alt(domain, mem_ctx, user_dn,
630 num_groups, user_gids);
633 (*user_gids) = talloc_zero(mem_ctx, sizeof(**user_gids) * (count + 1));
634 (*user_gids)[0] = primary_group;
638 for (i=0;i<count;i++) {
639 if (sid_equal(&sids[i], primary_group)) continue;
641 (*user_gids)[*num_groups] = talloc(mem_ctx, sizeof(***user_gids));
642 if (!(*user_gids)[*num_groups]) {
643 status = NT_STATUS_NO_MEMORY;
647 sid_copy((*user_gids)[*num_groups], &sids[i]);
651 status = NT_STATUS_OK;
652 DEBUG(3,("ads lookup_usergroups for sid=%s\n", sid_to_string(sid_string, sid)));
658 find the members of a group, given a group rid and domain
660 static NTSTATUS lookup_groupmem(struct winbindd_domain *domain,
662 DOM_SID *group_sid, uint32 *num_names,
663 DOM_SID ***sid_mem, char ***names,
669 ADS_STRUCT *ads = NULL;
671 NTSTATUS status = NT_STATUS_UNSUCCESSFUL;
682 DEBUG(10,("ads: lookup_groupmem %s sid=%s\n", domain->name,
683 sid_string_static(group_sid)));
687 ads = ads_cached_connection(domain);
690 domain->last_status = NT_STATUS_SERVER_DISABLED;
694 sidstr = sid_binstring(group_sid);
696 /* search for all members of the group */
697 if (!(ldap_exp = talloc_asprintf(mem_ctx, "(objectSid=%s)",sidstr))) {
699 DEBUG(1, ("ads: lookup_groupmem: tallloc_asprintf for ldap_exp failed!\n"));
700 status = NT_STATUS_NO_MEMORY;
708 attrs = talloc(mem_ctx, 3 * sizeof(*attrs));
709 attrs[1] = talloc_strdup(mem_ctx, "usnChanged");
713 if (num_members == 0)
714 attrs[0] = talloc_strdup(mem_ctx, "member");
716 DEBUG(10, ("Searching for attrs[0] = %s, attrs[1] = %s\n", attrs[0], attrs[1]));
718 rc = ads_search_retry(ads, &res, ldap_exp, attrs);
720 if (!ADS_ERR_OK(rc) || !res) {
721 DEBUG(1,("ads: lookup_groupmem ads_search: %s\n",
723 status = ads_ntstatus(rc);
727 count = ads_count_replies(ads, res);
731 if (num_members == 0) {
732 if (!ads_pull_uint32(ads, res, "usnChanged", &first_usn)) {
733 DEBUG(1, ("ads: lookup_groupmem could not pull usnChanged!\n"));
738 if (!ads_pull_uint32(ads, res, "usnChanged", ¤t_usn)) {
739 DEBUG(1, ("ads: lookup_groupmem could not pull usnChanged!\n"));
743 if (first_usn != current_usn) {
744 DEBUG(5, ("ads: lookup_groupmem USN on this record changed"
745 " - restarting search\n"));
746 if (num_retries < 5) {
751 DEBUG(5, ("ads: lookup_groupmem USN on this record changed"
752 " - restarted search too many times, aborting!\n"));
753 status = NT_STATUS_UNSUCCESSFUL;
758 members = ads_pull_strings_range(ads, mem_ctx, res,
765 if ((members == NULL) || (num_members == 0))
768 } while (more_values);
770 /* now we need to turn a list of members into rids, names and name types
771 the problem is that the members are in the form of distinguised names
774 (*sid_mem) = talloc_zero(mem_ctx, sizeof(**sid_mem) * num_members);
775 (*name_types) = talloc_zero(mem_ctx, sizeof(**name_types) * num_members);
776 (*names) = talloc_zero(mem_ctx, sizeof(**names) * num_members);
778 for (i=0;i<num_members;i++) {
783 if (dn_lookup(ads, mem_ctx, members[i], &name, &name_type, &sid)) {
784 (*names)[*num_names] = name;
785 (*name_types)[*num_names] = name_type;
786 (*sid_mem)[*num_names] = talloc(mem_ctx, sizeof(***sid_mem));
787 if (!(*sid_mem)[*num_names]) {
788 status = NT_STATUS_NO_MEMORY;
791 sid_copy((*sid_mem)[*num_names], &sid);
796 status = NT_STATUS_OK;
797 DEBUG(3,("ads lookup_groupmem for sid=%s\n", sid_to_string(sid_string, group_sid)));
801 ads_msgfree(ads, res);
806 /* find the sequence number for a domain */
807 static NTSTATUS sequence_number(struct winbindd_domain *domain, uint32 *seq)
809 ADS_STRUCT *ads = NULL;
812 DEBUG(3,("ads: fetch sequence_number for %s\n", domain->name));
814 *seq = DOM_SEQUENCE_NONE;
816 ads = ads_cached_connection(domain);
819 domain->last_status = NT_STATUS_SERVER_DISABLED;
820 return NT_STATUS_UNSUCCESSFUL;
823 rc = ads_USN(ads, seq);
825 if (!ADS_ERR_OK(rc)) {
827 /* its a dead connection ; don't destroy it
828 through since ads_USN() has already done
831 domain->private = NULL;
833 return ads_ntstatus(rc);
836 /* get a list of trusted domains */
837 static NTSTATUS trusted_domains(struct winbindd_domain *domain,
844 NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
845 struct ds_domain_trust *domains = NULL;
848 struct cli_state *cli = NULL;
849 /* i think we only need our forest and downlevel trusted domains */
850 uint32 flags = DS_DOMAIN_IN_FOREST | DS_DOMAIN_DIRECT_OUTBOUND;
852 DEBUG(3,("ads: trusted_domains\n"));
859 if ( !NT_STATUS_IS_OK(result = cm_fresh_connection(domain, PI_NETLOGON, &cli)) ) {
860 DEBUG(5, ("trusted_domains: Could not open a connection to %s for PIPE_NETLOGON (%s)\n",
861 domain->name, nt_errstr(result)));
862 return NT_STATUS_UNSUCCESSFUL;
865 if ( NT_STATUS_IS_OK(result) )
866 result = cli_ds_enum_domain_trusts( cli, mem_ctx, cli->desthost,
867 flags, &domains, (unsigned int *)&count );
869 if ( NT_STATUS_IS_OK(result) && count) {
871 /* Allocate memory for trusted domain names and sids */
873 if ( !(*names = (char **)talloc(mem_ctx, sizeof(char *) * count)) ) {
874 DEBUG(0, ("trusted_domains: out of memory\n"));
875 result = NT_STATUS_NO_MEMORY;
879 if ( !(*alt_names = (char **)talloc(mem_ctx, sizeof(char *) * count)) ) {
880 DEBUG(0, ("trusted_domains: out of memory\n"));
881 result = NT_STATUS_NO_MEMORY;
885 if ( !(*dom_sids = (DOM_SID *)talloc(mem_ctx, sizeof(DOM_SID) * count)) ) {
886 DEBUG(0, ("trusted_domains: out of memory\n"));
887 result = NT_STATUS_NO_MEMORY;
891 /* Copy across names and sids */
893 for (i = 0; i < count; i++) {
894 (*names)[i] = domains[i].netbios_domain;
895 (*alt_names)[i] = domains[i].dns_domain;
897 sid_copy(&(*dom_sids)[i], &domains[i].sid);
900 *num_domains = count;
905 /* remove connection; This is a special case to the \NETLOGON pipe */
913 /* find the domain sid for a domain */
914 static NTSTATUS domain_sid(struct winbindd_domain *domain, DOM_SID *sid)
919 DEBUG(3,("ads: domain_sid\n"));
921 ads = ads_cached_connection(domain);
924 domain->last_status = NT_STATUS_SERVER_DISABLED;
925 return NT_STATUS_UNSUCCESSFUL;
928 rc = ads_domain_sid(ads, sid);
930 if (!ADS_ERR_OK(rc)) {
932 /* its a dead connection; don't destroy it though
933 since that has already been done indirectly
934 by ads_domain_sid() */
936 domain->private = NULL;
939 return ads_ntstatus(rc);
943 /* find alternate names list for the domain - for ADS this is the
945 static NTSTATUS alternate_name(struct winbindd_domain *domain)
950 const char *workgroup;
952 DEBUG(3,("ads: alternate_name\n"));
954 ads = ads_cached_connection(domain);
957 domain->last_status = NT_STATUS_SERVER_DISABLED;
958 return NT_STATUS_UNSUCCESSFUL;
961 if (!(ctx = talloc_init("alternate_name"))) {
962 return NT_STATUS_NO_MEMORY;
965 rc = ads_workgroup_name(ads, ctx, &workgroup);
967 if (ADS_ERR_OK(rc)) {
968 fstrcpy(domain->name, workgroup);
969 fstrcpy(domain->alt_name, ads->config.realm);
970 strupper_m(domain->alt_name);
971 strupper_m(domain->name);
976 return ads_ntstatus(rc);
979 /* the ADS backend methods are exposed via this structure */
980 struct winbindd_methods ads_methods = {