diff options
author | Stefan Metzmacher <metze@samba.org> | 2011-04-24 00:00:40 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2011-04-24 10:44:53 +0200 |
commit | f7bc84409a7a6736ec2cf1110dd7200a954e3b7e (patch) | |
tree | 06957e31b9ff2507842260c7cc969cd2645c1029 /source3/winbindd/winbindd_pam.c | |
parent | e7cf7204e60552b45952325f343ea894fda21346 (diff) | |
download | samba-f7bc84409a7a6736ec2cf1110dd7200a954e3b7e.tar.gz samba-f7bc84409a7a6736ec2cf1110dd7200a954e3b7e.tar.bz2 samba-f7bc84409a7a6736ec2cf1110dd7200a954e3b7e.zip |
s3:rpc_client: map fault codes to NTSTATUS with dcerpc_fault_to_nt_status()
Most fault codes have a NTSTATUS representation, so use that.
This brings the fault handling in common with the source4/librpc/rpc code,
which make it possible to share more highlevel code, between source3 and
source4 as the error checking can be the same now.
metze
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Sun Apr 24 10:44:53 CEST 2011 on sn-devel-104
Diffstat (limited to 'source3/winbindd/winbindd_pam.c')
-rw-r--r-- | source3/winbindd/winbindd_pam.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source3/winbindd/winbindd_pam.c b/source3/winbindd/winbindd_pam.c index 76e06d3735..6b086c8c0f 100644 --- a/source3/winbindd/winbindd_pam.c +++ b/source3/winbindd/winbindd_pam.c @@ -1248,7 +1248,7 @@ static NTSTATUS winbind_samlogon_retry_loop(struct winbindd_domain *domain, info3); } - if ((NT_STATUS_V(result) == DCERPC_FAULT_OP_RNG_ERROR) + if (NT_STATUS_EQUAL(result, NT_STATUS_RPC_PROCNUM_OUT_OF_RANGE) && domain->can_do_samlogon_ex) { DEBUG(3, ("Got a DC that can not do NetSamLogonEx, " "retrying with NetSamLogon\n")); @@ -1938,10 +1938,10 @@ enum winbindd_result winbindd_dual_pam_chauthtok(struct winbindd_domain *contact * short to comply with the samr_ChangePasswordUser3 idl - gd */ /* only fallback when the chgpasswd_user3 call is not supported */ - if ((NT_STATUS_EQUAL(result, NT_STATUS(DCERPC_FAULT_OP_RNG_ERROR))) || - (NT_STATUS_EQUAL(result, NT_STATUS_NOT_SUPPORTED)) || - (NT_STATUS_EQUAL(result, NT_STATUS_BUFFER_TOO_SMALL)) || - (NT_STATUS_EQUAL(result, NT_STATUS_NOT_IMPLEMENTED))) { + if (NT_STATUS_EQUAL(result, NT_STATUS_RPC_PROCNUM_OUT_OF_RANGE) || + NT_STATUS_EQUAL(result, NT_STATUS_NOT_SUPPORTED) || + NT_STATUS_EQUAL(result, NT_STATUS_BUFFER_TOO_SMALL) || + NT_STATUS_EQUAL(result, NT_STATUS_NOT_IMPLEMENTED)) { DEBUG(10,("Password change with chgpasswd_user3 failed with: %s, retrying chgpasswd_user2\n", nt_errstr(result))); |