mirror of
https://github.com/samba-team/samba.git
synced 2025-01-17 02:05:21 +03:00
r6483: fix anonymous connections, '-U %' or '-U ""%""' can be used for this
metze
This commit is contained in:
parent
ebe7071b2e
commit
d31b4d7df3
@ -197,7 +197,7 @@ static void popt_common_credentials_callback(poptContext con,
|
||||
|
||||
cli_credentials_parse_string(cmdline_credentials, arg, CRED_SPECIFIED);
|
||||
|
||||
if ((lp=strchr_m(arg,'%'))) {
|
||||
if (cmdline_credentials->password && (lp=strchr_m(arg,'%'))) {
|
||||
memset(lp,0,strlen(cmdline_credentials->password));
|
||||
}
|
||||
}
|
||||
|
@ -363,6 +363,11 @@ void cli_credentials_parse_string(struct cli_credentials *credentials, const cha
|
||||
{
|
||||
char *uname, *p;
|
||||
|
||||
if (strcmp("%",data) == 0) {
|
||||
cli_credentials_set_anonymous(credentials);
|
||||
return;
|
||||
}
|
||||
|
||||
uname = talloc_strdup(credentials, data);
|
||||
if ((p = strchr_m(uname,'%'))) {
|
||||
*p = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user