git.samba.org
/
metze
/
samba
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8afd775
)
auth: Do not set emtpy passwords for credentials
author
Andreas Schneider
<asn@samba.org>
Mon, 19 Sep 2016 13:56:01 +0000
(15:56 +0200)
committer
Stefan Metzmacher
<metze@samba.org>
Mon, 18 Feb 2019 12:39:20 +0000
(13:39 +0100)
Signed-off-by: Andreas Schneider <asn@samba.org>
auth/credentials/credentials.c
patch
|
blob
|
history
diff --git
a/auth/credentials/credentials.c
b/auth/credentials/credentials.c
index 4663185c979a9f29e90258f14b6498c0afd1263c..d5ab80636169396ae7d29555b99a8b8a0d016991 100644
(file)
--- a/
auth/credentials/credentials.c
+++ b/
auth/credentials/credentials.c
@@
-796,8
+796,15
@@
_PUBLIC_ void cli_credentials_parse_string(struct cli_credentials *credentials,
uname = talloc_strdup(credentials, data);
if ((p = strchr_m(uname,'%'))) {
- *p = 0;
- cli_credentials_set_password(credentials, p+1, obtained);
+ const char *password;
+
+ *p = '\0';
+ password = p + 1;
+ if (password[0] != '\0') {
+ cli_credentials_set_password(credentials,
+ password,
+ obtained);
+ }
}
if ((p = strchr_m(uname,'@'))) {