diff options
author | Andreas Schneider <asn@samba.org> | 2016-08-26 16:44:05 +0200 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2016-08-31 20:59:17 +0200 |
commit | e135a13478408985f534e04585919d79c4aa391a (patch) | |
tree | 8e40f6641eb3804e73bc9a3065396b46c769c60a /source3/libads | |
parent | 381ebd4af5b21e5c76e5cd0916b195360a447756 (diff) | |
download | samba-e135a13478408985f534e04585919d79c4aa391a.tar.gz |
s3-libads: Rename smb_krb5_get_ntstatus_from_krb5_error_init_creds_opt()
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source3/libads')
-rw-r--r-- | source3/libads/kerberos.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/source3/libads/kerberos.c b/source3/libads/kerberos.c index d2e9fa4fed5..6c60c6f8ff8 100644 --- a/source3/libads/kerberos.c +++ b/source3/libads/kerberos.c @@ -198,9 +198,9 @@ static bool unwrap_edata_ntstatus(TALLOC_CTX *mem_ctx, return True; } - static bool smb_krb5_get_ntstatus_from_krb5_error_init_creds_opt(krb5_context ctx, - krb5_get_init_creds_opt *opt, - NTSTATUS *nt_status) +static bool smb_krb5_get_ntstatus_from_init_creds(krb5_context ctx, + krb5_get_init_creds_opt *opt, + NTSTATUS *nt_status) { bool ret = False; krb5_error *error = NULL; @@ -344,9 +344,16 @@ int kerberos_kinit_password_ext(const char *principal, /* try to get ntstatus code out of krb5_error when we have it * inside the krb5_get_init_creds_opt - gd */ - if (opt && smb_krb5_get_ntstatus_from_krb5_error_init_creds_opt(ctx, opt, &status)) { - *ntstatus = status; - goto cleanup; + if (opt != NULL) { + bool ok; + + ok = smb_krb5_get_ntstatus_from_init_creds(ctx, + opt, + &status); + if (ok) { + *ntstatus = status; + goto cleanup; + } } /* fall back to self-made-mapping */ |