s3 swat: Create random nonce in CGI mode
commit21d43b8594f9ea1eb204f2716bdd34581bb01ccf
authorKai Blin <kai@samba.org>
Tue, 12 Jul 2011 06:08:24 +0000 (12 08:08 +0200)
committerKarolin Seeger <kseeger@samba.org>
Tue, 26 Jul 2011 19:55:25 +0000 (26 21:55 +0200)
tree3e5466760a54830b5487fb0694b4b907cf464788
parentdc63c218b730fa62e3257f5a91b7146c02c42cf3
s3 swat: Create random nonce in CGI mode

In CGI mode, we don't get access to the user's password, which would
reduce the hash used so far to parameters an attacker can easily guess.
To work around this, read the nonce from secrets.tdb or generate one if
it's not there.
Also populate the C_user field so we can use that for token creation.

Signed-off-by: Kai Blin <kai@samba.org>
(cherry picked from commit 589bc35590aebfdd20fe786c08005bb43ef47d94)
source3/web/cgi.c