diff options
author | Simo Sorce <idra@samba.org> | 2012-03-31 01:27:02 -0400 |
---|---|---|
committer | Andreas Schneider <asn@samba.org> | 2012-04-12 12:06:42 +0200 |
commit | aedbd6bf8e4029c2089652d0f0a80777bc856f89 (patch) | |
tree | 367c6f6e68f5b331af3f0422cb98ca50dd03280f /source4/auth/kerberos/kerberos_util.c | |
parent | 6de578a8f7a4ed2defeb778c089bdff0b8cef6cd (diff) | |
download | samba-aedbd6bf8e4029c2089652d0f0a80777bc856f89.tar.gz samba-aedbd6bf8e4029c2089652d0f0a80777bc856f89.tar.bz2 samba-aedbd6bf8e4029c2089652d0f0a80777bc856f89.zip |
s4-auth-krb: Simplify salt_princ handling.
This allows us to make parse_principal static in kerbeors_util again and
avoid a silly game where we alloc containers and set destrcutors only to
release the whole thing at the end of the function.
Signed-off-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'source4/auth/kerberos/kerberos_util.c')
-rw-r--r-- | source4/auth/kerberos/kerberos_util.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/source4/auth/kerberos/kerberos_util.c b/source4/auth/kerberos/kerberos_util.c index f38bc17212..0d2d19c78d 100644 --- a/source4/auth/kerberos/kerberos_util.c +++ b/source4/auth/kerberos/kerberos_util.c @@ -29,7 +29,13 @@ #include "auth/kerberos/kerberos_credentials.h" #include "auth/kerberos/kerberos_util.h" -krb5_error_code free_principal(struct principal_container *pc) +struct principal_container { + struct smb_krb5_context *smb_krb5_context; + krb5_principal principal; + const char *string_form; /* Optional */ +}; + +static krb5_error_code free_principal(struct principal_container *pc) { /* current heimdal - 0.6.3, which we need anyway, fixes segfaults here */ krb5_free_principal(pc->smb_krb5_context->krb5_context, pc->principal); @@ -38,7 +44,7 @@ krb5_error_code free_principal(struct principal_container *pc) } -krb5_error_code parse_principal(TALLOC_CTX *parent_ctx, +static krb5_error_code parse_principal(TALLOC_CTX *parent_ctx, const char *princ_string, struct smb_krb5_context *smb_krb5_context, krb5_principal *princ, |