mirror of
https://github.com/samba-team/samba.git
synced 2025-02-26 21:57:41 +03:00
s3 swat: Allow getting the user's HTTP auth password
Signed-off-by: Kai Blin <kai@samba.org>
This commit is contained in:
parent
cc86a11b9e
commit
b7521dc756
@ -46,6 +46,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;
|
||||
|
||||
@ -401,6 +402,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;
|
||||
}
|
||||
@ -435,6 +437,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
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user