diff options
author | Kai Blin <kai@samba.org> | 2011-07-08 12:56:21 +0200 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2011-07-26 20:47:44 +0200 |
commit | 2c46845dee2dfcb90cf04951d6348b93210acc4f (patch) | |
tree | 9f6bd11fa21858ea6b24f38cc5c4a8b4c04d3ba7 | |
parent | de91a834def9726cdf24007f18e028b761b57e83 (diff) | |
download | samba-2c46845dee2dfcb90cf04951d6348b93210acc4f.tar.gz |
s3 swat: Allow getting the user's HTTP auth password
Signed-off-by: Kai Blin <kai@samba.org>
(cherry picked from commit dffaf0ed0bb7f38c23f15b0b128a5eb39a55a813)
-rw-r--r-- | source3/web/cgi.c | 9 | ||||
-rw-r--r-- | source3/web/swat_proto.h | 1 |
2 files changed, 10 insertions, 0 deletions
diff --git a/source3/web/cgi.c b/source3/web/cgi.c index dd0aadb7868..8eef0b3b501 100644 --- a/source3/web/cgi.c +++ b/source3/web/cgi.c @@ -42,6 +42,7 @@ static char *query_string; static const char *baseurl; static char *pathinfo; static char *C_user; +static char *C_pass; static bool inetd_server; static bool got_request; @@ -388,6 +389,7 @@ static bool cgi_handle_authorization(char *line) /* Save the users name */ C_user = SMB_STRDUP(user); + C_pass = SMB_STRDUP(user_pass); TALLOC_FREE(pass); return True; } @@ -422,6 +424,13 @@ char *cgi_user_name(void) return(C_user); } +/*************************************************************************** +return a ptr to the users password + ***************************************************************************/ +char *cgi_user_pass(void) +{ + return(C_pass); +} /*************************************************************************** handle a file download diff --git a/source3/web/swat_proto.h b/source3/web/swat_proto.h index 0f84e4f4ce4..76f9c3c68f1 100644 --- a/source3/web/swat_proto.h +++ b/source3/web/swat_proto.h @@ -31,6 +31,7 @@ const char *cgi_variable(const char *name); const char *cgi_variable_nonull(const char *name); bool am_root(void); char *cgi_user_name(void); +char *cgi_user_pass(void); void cgi_setup(const char *rootdir, int auth_required); const char *cgi_baseurl(void); const char *cgi_pathinfo(void); |