diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2009-03-01 16:39:35 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2009-03-01 16:39:35 +0100 |
commit | 09ac816b36e45fd537af2f7fe7c57a11f5c744f5 (patch) | |
tree | 4d5d44c27a2395a39efc62359f6e4b6976f2ba2e /source3/libsmb/ntlmssp.c | |
parent | 235244f4cc707130dd130afce88bde49606bd501 (diff) | |
parent | 54bc27e9374742d37b1ed9012d1cfe8f5ace6d40 (diff) | |
download | samba-09ac816b36e45fd537af2f7fe7c57a11f5c744f5.tar.gz samba-09ac816b36e45fd537af2f7fe7c57a11f5c744f5.tar.bz2 samba-09ac816b36e45fd537af2f7fe7c57a11f5c744f5.zip |
Merge branch 'master' of git://git.samba.org/samba into teventfix
Conflicts:
lib/tevent/pytevent.c
Diffstat (limited to 'source3/libsmb/ntlmssp.c')
-rw-r--r-- | source3/libsmb/ntlmssp.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/source3/libsmb/ntlmssp.c b/source3/libsmb/ntlmssp.c index cc13476935..0764f97d85 100644 --- a/source3/libsmb/ntlmssp.c +++ b/source3/libsmb/ntlmssp.c @@ -110,12 +110,10 @@ void debug_ntlmssp_flags(uint32 neg_flags) * */ -static const uint8 *get_challenge(const struct ntlmssp_state *ntlmssp_state) +static void get_challenge(const struct ntlmssp_state *ntlmssp_state, + uint8_t chal[8]) { - static uchar chal[8]; - generate_random_buffer(chal, sizeof(chal)); - - return chal; + generate_random_buffer(chal, 8); } /** @@ -517,7 +515,7 @@ static NTSTATUS ntlmssp_server_negotiate(struct ntlmssp_state *ntlmssp_state, char *dnsdomname = NULL; uint32 neg_flags = 0; uint32 ntlmssp_command, chal_flags; - const uint8 *cryptkey; + uint8_t cryptkey[8]; const char *target_name; /* parse the NTLMSSP packet */ @@ -541,7 +539,7 @@ static NTSTATUS ntlmssp_server_negotiate(struct ntlmssp_state *ntlmssp_state, ntlmssp_handle_neg_flags(ntlmssp_state, neg_flags, lp_lanman_auth()); /* Ask our caller what challenge they would like in the packet */ - cryptkey = ntlmssp_state->get_challenge(ntlmssp_state); + ntlmssp_state->get_challenge(ntlmssp_state, cryptkey); /* Check if we may set the challenge */ if (!ntlmssp_state->may_set_challenge(ntlmssp_state)) { |