diff options
author | rcritten <> | 2007-01-10 20:56:00 +0000 |
---|---|---|
committer | rcritten <> | 2007-01-10 20:56:00 +0000 |
commit | c6f1107dac6935dae497c08f3afbdaf503d693f5 (patch) | |
tree | cdeaedf72766c7a6efd2c65b7991e05d91295d96 /nss_pcache.c | |
parent | ff38e91d0bfa650b5ab77378f583243cabcddf0d (diff) | |
download | mod_nss-c6f1107dac6935dae497c08f3afbdaf503d693f5.tar.gz mod_nss-c6f1107dac6935dae497c08f3afbdaf503d693f5.tar.xz mod_nss-c6f1107dac6935dae497c08f3afbdaf503d693f5.zip |
222173
Stop processing tokens when a login fails so we can correctly report
the failure.
Fix an off-by-one error in nss_pcache that prevented 1 character
passwords (not a huge problem but a bug none-the-less).
Diffstat (limited to 'nss_pcache.c')
-rw-r--r-- | nss_pcache.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/nss_pcache.c b/nss_pcache.c index 65a7a02..8e0f70f 100644 --- a/nss_pcache.c +++ b/nss_pcache.c @@ -445,12 +445,13 @@ char * getstr(const char * cmd, int el) { work = strdup(cmd); s = t = work; + r = NULL; peek = s; if (peek) peek++; while (*s) { - if (*s == '\t' || *peek == '\0') { + if (*s == '\t' || *s == '\0') { if (i == el) { if (*peek != '\0') *s = '\0'; @@ -468,8 +469,9 @@ char * getstr(const char * cmd, int el) { peek++; } + if (t) r = strdup(t); free(work); - return NULL; + return r; } /* |