projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
17479fc
)
remove duplicate assignments; don't compare twice if first is successfull.
author
Wilfried Goesgens
<dothebart@citadel.org>
Sat, 26 May 2012 13:26:55 +0000
(15:26 +0200)
committer
Wilfried Goesgens
<dothebart@citadel.org>
Sat, 26 May 2012 13:26:55 +0000
(15:26 +0200)
citadel/user_ops.c
patch
|
blob
|
history
diff --git
a/citadel/user_ops.c
b/citadel/user_ops.c
index 2ca3b4220ddfb43c754da98643c37ccbbeacc047..c29a5613b1561fc84be89bf64dcb8c0c23ce3d49 100644
(file)
--- a/
citadel/user_ops.c
+++ b/
citadel/user_ops.c
@@
-945,7
+945,6
@@
int CtdlTryPassword(const char *password, long len)
CONM_syslog(LOG_INFO, "CtdlTryPassword: NULL password string supplied\n");
return pass_wrong_password;
}
CONM_syslog(LOG_INFO, "CtdlTryPassword: NULL password string supplied\n");
return pass_wrong_password;
}
- code = (-1);
if (CCC->is_master) {
code = strcmp(password, config.c_master_pass);
if (CCC->is_master) {
code = strcmp(password, config.c_master_pass);
@@
-1004,9
+1003,11
@@
int CtdlTryPassword(const char *password, long len)
strproc(pw);
strproc(CCC->user.password);
code = strcasecmp(CCC->user.password, pw);
strproc(pw);
strproc(CCC->user.password);
code = strcasecmp(CCC->user.password, pw);
- strproc(pw);
- strproc(CCC->user.password);
- code = strcasecmp(CCC->user.password, pw);
+ if (code != 0) {
+ strproc(pw);
+ strproc(CCC->user.password);
+ code = strcasecmp(CCC->user.password, pw);
+ }
free (pw);
}
free (pw);
}