s3 swat: Create random nonce in CGI mode
authorKai Blin <kai@samba.org>
Tue, 12 Jul 2011 06:08:24 +0000 (08:08 +0200)
committerJeremy Allison <jra@samba.org>
Tue, 26 Jul 2011 21:33:24 +0000 (23:33 +0200)
commitc79e08fb1bb36a36bb09e01fdf62094a850ec3ed
treeb15690cef0647c36b0f60c3d32fa986b84280c60
parent52d2ba7103ffc10a58c81b472d9d62fca446d09b
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>
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Tue Jul 26 23:33:24 CEST 2011 on sn-devel-104
source3/web/cgi.c