diff options
author | Andrew Bartlett <abartlet@samba.org> | 2004-01-06 00:27:34 +0000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2004-01-06 00:27:34 +0000 |
commit | 523a4ddd5fb851d86b50238ca4d22b98c2159c50 (patch) | |
tree | e60f26488ff311677a85209f9da2a6e129e8f6ec /source3 | |
parent | eb1aa6a2cc0331cbbbc5ea466e5695e4df39e6ee (diff) | |
download | samba-523a4ddd5fb851d86b50238ca4d22b98c2159c50.tar.gz samba-523a4ddd5fb851d86b50238ca4d22b98c2159c50.tar.bz2 samba-523a4ddd5fb851d86b50238ca4d22b98c2159c50.zip |
(merge from 3.0)
Try to keep vl happy - shorten some of these lines.
--
Grumble... grumble... fix the build...
--
Show the sid type in name->sid translatons in a way that can be easily
understood by humans.
Andrew Bartlett
(This used to be commit c5d1e2112baa7d87cd6b9f0855c2fd8b006af01d)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/libads/ldap.c | 18 | ||||
-rw-r--r-- | source3/nsswitch/wbinfo.c | 2 | ||||
-rw-r--r-- | source3/nsswitch/winbindd_ads.c | 21 | ||||
-rw-r--r-- | source3/nsswitch/winbindd_pam.c | 12 |
4 files changed, 34 insertions, 19 deletions
diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c index 8aaca01bbf..79f267a6a8 100644 --- a/source3/libads/ldap.c +++ b/source3/libads/ldap.c @@ -1668,7 +1668,8 @@ char **ads_pull_strings_range(ADS_STRUCT *ads, &range_start) == 1) { *more_strings = False; } else { - DEBUG(1, ("ads_pull_strings_range: Cannot parse Range attriubte (%s)\n", range_attr)); + DEBUG(1, ("ads_pull_strings_range: Cannot parse Range attriubte (%s)\n", + range_attr)); ldap_memfree(range_attr); *more_strings = False; return NULL; @@ -1676,7 +1677,8 @@ char **ads_pull_strings_range(ADS_STRUCT *ads, } if ((*num_strings) != range_start) { - DEBUG(1, ("ads_pull_strings_range: Range attribute (%s) doesn't start at %u, but at %lu - aborting range retreival\n", + DEBUG(1, ("ads_pull_strings_range: Range attribute (%s) doesn't start at %u, but at %lu" + " - aborting range retreival\n", range_attr, *num_strings + 1, range_start)); ldap_memfree(range_attr); *more_strings = False; @@ -1686,8 +1688,10 @@ char **ads_pull_strings_range(ADS_STRUCT *ads, new_strings = ads_pull_strings(ads, mem_ctx, msg, range_attr, &num_new_strings); if (*more_strings && ((*num_strings + num_new_strings) != (range_end + 1))) { - DEBUG(1, ("ads_pull_strings_range: Range attribute (%s) tells us we have %lu strings in this bunch, but we only got %lu - aborting range retreival\n", - range_attr, (unsigned long int)range_end - range_start + 1, (unsigned long int)num_new_strings)); + DEBUG(1, ("ads_pull_strings_range: Range attribute (%s) tells us we have %lu " + "strings in this bunch, but we only got %lu - aborting range retreival\n", + range_attr, (unsigned long int)range_end - range_start + 1, + (unsigned long int)num_new_strings)); ldap_memfree(range_attr); *more_strings = False; return NULL; @@ -1992,7 +1996,8 @@ ADS_STATUS ads_server_info(ADS_STRUCT *ads) p = strchr(value, ':'); if (!p) { talloc_destroy(ctx); - DEBUG(1, ("ads_server_info: returned ldap server name did not contain a ':' so was deemed invalid\n")); + DEBUG(1, ("ads_server_info: returned ldap server name did not contain a ':' " + "so was deemed invalid\n")); return ADS_ERROR(LDAP_DECODING_ERROR); } @@ -2002,7 +2007,8 @@ ADS_STATUS ads_server_info(ADS_STRUCT *ads) p = strchr(ads->config.ldap_server_name, '$'); if (!p || p[1] != '@') { talloc_destroy(ctx); - DEBUG(1, ("ads_server_info: returned ldap server name (%s) does not contain '$@' so was deemed invalid\n", ads->config.ldap_server_name)); + DEBUG(1, ("ads_server_info: returned ldap server name (%s) does not contain '$@'" + " so was deemed invalid\n", ads->config.ldap_server_name)); SAFE_FREE(ads->config.ldap_server_name); return ADS_ERROR(LDAP_DECODING_ERROR); } diff --git a/source3/nsswitch/wbinfo.c b/source3/nsswitch/wbinfo.c index bca1813167..55eeb9fa39 100644 --- a/source3/nsswitch/wbinfo.c +++ b/source3/nsswitch/wbinfo.c @@ -451,7 +451,7 @@ static BOOL wbinfo_lookupname(char *name) /* Display response */ - d_printf("%s %d\n", response.data.sid.sid, response.data.sid.type); + d_printf("%s %s (%d)\n", response.data.sid.sid, sid_type_lookup(response.data.sid.type), response.data.sid.type); return True; } diff --git a/source3/nsswitch/winbindd_ads.c b/source3/nsswitch/winbindd_ads.c index 889f63a42c..f8582aee99 100644 --- a/source3/nsswitch/winbindd_ads.c +++ b/source3/nsswitch/winbindd_ads.c @@ -598,18 +598,21 @@ static NTSTATUS lookup_usergroups(struct winbindd_domain *domain, rc = ads_search_retry_dn(ads, (void**)&msg, user_dn, attrs); if (!ADS_ERR_OK(rc)) { status = ads_ntstatus(rc); - DEBUG(1,("lookup_usergroups(sid=%s) ads_search tokenGroups: %s\n", sid_to_string(sid_string, sid), ads_errstr(rc))); + DEBUG(1,("lookup_usergroups(sid=%s) ads_search tokenGroups: %s\n", + sid_to_string(sid_string, sid), ads_errstr(rc))); goto done; } if (!msg) { - DEBUG(1,("lookup_usergroups(sid=%s) ads_search tokenGroups: NULL msg\n", sid_to_string(sid_string, sid))); + DEBUG(1,("lookup_usergroups(sid=%s) ads_search tokenGroups: NULL msg\n", + sid_to_string(sid_string, sid))); status = NT_STATUS_UNSUCCESSFUL; goto done; } if (!ads_pull_uint32(ads, msg, "primaryGroupID", &primary_group_rid)) { - DEBUG(1,("%s: No primary group for sid=%s !?\n", domain->name, sid_to_string(sid_string, sid))); + DEBUG(1,("%s: No primary group for sid=%s !?\n", + domain->name, sid_to_string(sid_string, sid))); goto done; } @@ -677,7 +680,8 @@ static NTSTATUS lookup_groupmem(struct winbindd_domain *domain, uint32 current_usn; int num_retries = 0; - DEBUG(10,("ads: lookup_groupmem %s sid=%s\n", domain->name, sid_string_static(group_sid))); + DEBUG(10,("ads: lookup_groupmem %s sid=%s\n", domain->name, + sid_string_static(group_sid))); *num_names = 0; @@ -738,13 +742,15 @@ static NTSTATUS lookup_groupmem(struct winbindd_domain *domain, } if (first_usn != current_usn) { - DEBUG(5, ("ads: lookup_groupmem USN on this record changed - restarting search\n")); + DEBUG(5, ("ads: lookup_groupmem USN on this record changed" + " - restarting search\n")); if (num_retries < 5) { num_retries++; num_members = 0; continue; } else { - DEBUG(5, ("ads: lookup_groupmem USN on this record changed - restarted search too many times, aborting!\n")); + DEBUG(5, ("ads: lookup_groupmem USN on this record changed" + " - restarted search too many times, aborting!\n")); status = NT_STATUS_UNSUCCESSFUL; goto done; } @@ -858,7 +864,8 @@ static NTSTATUS trusted_domains(struct winbindd_domain *domain, } if ( NT_STATUS_IS_OK(result) ) - result = cli_ds_enum_domain_trusts( cli, mem_ctx, cli->desthost, flags, &domains, (unsigned int *)&count ); + result = cli_ds_enum_domain_trusts( cli, mem_ctx, cli->desthost, + flags, &domains, (unsigned int *)&count ); if ( NT_STATUS_IS_OK(result) && count) { diff --git a/source3/nsswitch/winbindd_pam.c b/source3/nsswitch/winbindd_pam.c index 801f36df79..dba2fe8ba4 100644 --- a/source3/nsswitch/winbindd_pam.c +++ b/source3/nsswitch/winbindd_pam.c @@ -512,11 +512,13 @@ enum winbindd_result winbindd_pam_chauthtok(struct winbindd_cli_state *state) goto done; } - if (!NT_STATUS_IS_OK(result = cli_samr_chgpasswd_user(hnd->cli, mem_ctx, - user, newpass, oldpass))) { - DEBUG(1, ("password change failed for user %s/%s\n", domain, - user)); - } + if (!cli_oem_change_password(hnd->cli, user, newpass, oldpass)) { + DEBUG(1, ("password change failed for user %s/%s\n", domain, + user)); + result = NT_STATUS_WRONG_PASSWORD; + } else { + result = NT_STATUS_OK; + } done: state->response.data.auth.nt_status = NT_STATUS_V(result); |