diff options
author | Jeremy Allison <jra@samba.org> | 2003-07-16 19:17:33 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2003-07-16 19:17:33 +0000 |
commit | 8c38bb75b74ef7a4f40a5490102c77ab7d5fa0ac (patch) | |
tree | de78a06216b0b89f4bc32c322e4faccbcebe4f93 /source3/libsmb | |
parent | 1eff0523002319b2606466d3624e3a4612dbab6d (diff) | |
download | samba-8c38bb75b74ef7a4f40a5490102c77ab7d5fa0ac.tar.gz samba-8c38bb75b74ef7a4f40a5490102c77ab7d5fa0ac.tar.bz2 samba-8c38bb75b74ef7a4f40a5490102c77ab7d5fa0ac.zip |
Add krb5_princ_component to Heimdal. Remove cli_ from mark packet signed.
Jeremy.
(This used to be commit dd46f8b22d6e8411081a1279e1cd32929e40370b)
Diffstat (limited to 'source3/libsmb')
-rw-r--r-- | source3/libsmb/clikrb5.c | 13 | ||||
-rw-r--r-- | source3/libsmb/smb_signing.c | 10 |
2 files changed, 18 insertions, 5 deletions
diff --git a/source3/libsmb/clikrb5.c b/source3/libsmb/clikrb5.c index fd5dd91325..ba8ba11368 100644 --- a/source3/libsmb/clikrb5.c +++ b/source3/libsmb/clikrb5.c @@ -388,6 +388,19 @@ failed: return ret; } + + +#if defined(HAVE_KRB5_PRINCIPAL_GET_COMP_STRING) && !defined(HAVE_KRB5_PRINC_COMPONENT) + const krb5_data *krb5_princ_component(krb5_context context, krb5_principal principal, int i ) +{ + static krb5_data kdata; + + kdata.data = krb5_principal_get_comp_string(context, principal, i); + kdata.length = strlen(kdata.data); + return &kdata; +} +#endif + #else /* HAVE_KRB5 */ /* this saves a few linking headaches */ DATA_BLOB cli_krb5_get_ticket(const char *principal, time_t time_offset) diff --git a/source3/libsmb/smb_signing.c b/source3/libsmb/smb_signing.c index df17362f08..f4ee6c00e0 100644 --- a/source3/libsmb/smb_signing.c +++ b/source3/libsmb/smb_signing.c @@ -106,12 +106,12 @@ static BOOL cli_set_smb_signing_real_common(struct cli_state *cli) return True; } -static void cli_mark_packet_signed(struct cli_state *cli) +static void mark_packet_signed(char *outbuf) { uint16 flags2; - flags2 = SVAL(cli->outbuf,smb_flg2); + flags2 = SVAL(outbuf,smb_flg2); flags2 |= FLAGS2_SMB_SECURITY_SIGNATURES; - SSVAL(cli->outbuf,smb_flg2, flags2); + SSVAL(outbuf,smb_flg2, flags2); } static BOOL cli_signing_good(struct cli_state *cli, BOOL good) @@ -194,7 +194,7 @@ static void cli_simple_sign_outgoing_message(struct cli_state *cli) struct smb_basic_signing_context *data = cli->sign_info.signing_context; /* mark the packet as signed - BEFORE we sign it...*/ - cli_mark_packet_signed(cli); + mark_packet_signed(cli->outbuf); simple_packet_signature(data, cli->outbuf, data->send_seq_num, calc_md5_mac); @@ -365,7 +365,7 @@ BOOL cli_null_set_signing(struct cli_state *cli) static void cli_temp_sign_outgoing_message(struct cli_state *cli) { /* mark the packet as signed - BEFORE we sign it...*/ - cli_mark_packet_signed(cli); + mark_packet_signed(cli->outbuf); /* I wonder what BSRSPYL stands for - but this is what MS actually sends! */ |