mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
r821: prompt user for password if not given by -U user%pass
and not as torture:password in smb.conf metze
This commit is contained in:
parent
d4cc4b3d68
commit
9de377a914
@ -4128,7 +4128,7 @@ static BOOL run_test(const char *name)
|
||||
*/
|
||||
static void parse_user(const char *user)
|
||||
{
|
||||
char *username, *password, *p;
|
||||
char *username, *password = NULL, *p;
|
||||
|
||||
username = strdup(user);
|
||||
p = strchr_m(username,'%');
|
||||
@ -4138,9 +4138,17 @@ static void parse_user(const char *user)
|
||||
}
|
||||
|
||||
lp_set_cmdline("torture:username", username);
|
||||
|
||||
if (password) {
|
||||
lp_set_cmdline("torture:password", password);
|
||||
}
|
||||
|
||||
if (!lp_parm_string(-1,"torture","password")) {
|
||||
password = getpass("password:");
|
||||
|
||||
lp_set_cmdline("torture:password", password);
|
||||
}
|
||||
}
|
||||
|
||||
static void usage(void)
|
||||
{
|
||||
@ -4310,6 +4318,10 @@ static void usage(void)
|
||||
}
|
||||
}
|
||||
|
||||
if (!lp_parm_string(-1,"torture","password")) {
|
||||
lp_set_cmdline("torture:password", "");
|
||||
}
|
||||
|
||||
if (argc == optind) {
|
||||
printf("You must specify a test to run, or 'ALL'\n");
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user