diff options
author | Günther Deschner <gd@samba.org> | 2009-11-05 19:02:55 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2009-11-06 12:43:03 +0100 |
commit | 17ef153b68795fec681f9ce17c198236aba2b1c2 (patch) | |
tree | c1f555e94b7819973acf989b8115dd47815ad19b /source3/libsmb | |
parent | 2cd507fe144c58a4c856c73ec56b80365dad9f23 (diff) | |
download | samba-17ef153b68795fec681f9ce17c198236aba2b1c2.tar.gz samba-17ef153b68795fec681f9ce17c198236aba2b1c2.tar.bz2 samba-17ef153b68795fec681f9ce17c198236aba2b1c2.zip |
s3-kerberos: add smb_krb5_parse_name_flags().
Guenther
Diffstat (limited to 'source3/libsmb')
-rw-r--r-- | source3/libsmb/clikrb5.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/source3/libsmb/clikrb5.c b/source3/libsmb/clikrb5.c index 145e30beb3..2f68abe961 100644 --- a/source3/libsmb/clikrb5.c +++ b/source3/libsmb/clikrb5.c @@ -65,6 +65,24 @@ static krb5_error_code ads_krb5_get_fwd_ticket( krb5_context context, return ret; } +krb5_error_code smb_krb5_parse_name_flags(krb5_context context, + const char *name, /* in unix charset */ + int flags, + krb5_principal *principal) +{ + krb5_error_code ret; + char *utf8_name; + size_t converted_size; + + if (!push_utf8_talloc(talloc_tos(), &utf8_name, name, &converted_size)) { + return ENOMEM; + } + + ret = krb5_parse_name_flags(context, utf8_name, flags, principal); + TALLOC_FREE(utf8_name); + return ret; +} + #ifdef HAVE_KRB5_PARSE_NAME_NOREALM /************************************************************** krb5_parse_name_norealm that takes a UNIX charset. |