summaryrefslogtreecommitdiff
path: root/source4/kdc
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2014-05-15 09:05:25 +0200
committerAndrew Bartlett <abartlet@samba.org>2016-03-17 04:32:28 +0100
commit1b6a085b7f417c0a5d7593858715f070b4d0aa50 (patch)
treed29d55f83683f1b7f4143537aa4902376dfe5ce2 /source4/kdc
parentade958e20b561b702e2fec86a28659144dbe4a9e (diff)
downloadsamba-1b6a085b7f417c0a5d7593858715f070b4d0aa50.tar.gz
mit-kdb: Do not overwrite the error code in failure case.
Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Sumit Bose <sbose@redhat.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/kdc')
-rw-r--r--source4/kdc/mit-kdb/kdb_samba_policies.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/source4/kdc/mit-kdb/kdb_samba_policies.c b/source4/kdc/mit-kdb/kdb_samba_policies.c
index 75c8c837a27..2e9f9ef0c5a 100644
--- a/source4/kdc/mit-kdb/kdb_samba_policies.c
+++ b/source4/kdc/mit-kdb/kdb_samba_policies.c
@@ -127,17 +127,19 @@ krb5_error_code kdb_samba_db_check_policy_as(krb5_context context,
netbios_name,
password_change,
&int_data);
- if (code) {
- goto done;
- }
- d = ks_make_data(int_data.data, int_data.length);
+ if (int_data.length && int_data.data) {
- code = decode_krb5_padata_sequence(&d, &e_data);
- if (code == 0) {
- *e_data_out = e_data;
- }
+ /* make sure the mapped return code is returned - gd */
+ int code_tmp;
+ d = ks_make_data(int_data.data, int_data.length);
+
+ code_tmp = decode_krb5_padata_sequence(&d, &e_data);
+ if (code_tmp == 0) {
+ *e_data_out = e_data;
+ }
+ }
done:
free(realm);
free(server_name);