inn/authprogs/ckpasswd.c
Igor Timkin
ivt at gamma.ru
Tue Nov 28 15:01:21 UTC 2000
1. Addition to previous patch: don't ignore rest of passwd file
in case of error line (without ":").
2. Reflect number sign (`#') in man page.
--- inn/authprogs/ckpasswd.c.ORIG Mon Nov 27 20:42:03 2000
+++ inn/authprogs/ckpasswd.c Tue Nov 28 17:48:08 2000
@@ -62,13 +62,11 @@
while ((!found) && fgets(buf, sizeof(buf), pwfile)) {
if (*buf != '#') { /* ignore comment lines */
buf[strlen(buf)-1] = 0; /* clean off the \n */
- if (!(colon = strchr(buf, ':'))) {
- fclose(pwfile);
- return(0);
+ if ((colon = strchr(buf, ':'))) { /* correct format */
+ *colon = 0;
+ if (!strcmp(buf, name))
+ found = 1;
}
- *colon = 0;
- if (!strcmp(buf, name))
- found = 1;
}
}
fclose(pwfile);
--- inn-CURRENT-20001128/doc/man/ckpasswd.1.ORIG Tue Nov 28 13:00:27 2000
+++ inn-CURRENT-20001128/doc/man/ckpasswd.1 Tue Nov 28 17:54:32 2000
@@ -208,7 +208,8 @@
\& username:pdIh9NCNslkq6
.Ve
(and each line may have an additional colon after the encrypted password
-and additional data; that data will be ignored by \fBckpasswd\fR). \s-1INN\s0 does
+and additional data; that data will be ignored by \fBckpasswd\fR). Lines
+starting with a number sign (`#') are ignored. \s-1INN\s0 does
not come with a utility to create the encrypted passwords, but it's a
quick job with Perl (see the example script under \fB\-d\fR).
.Ip "\fB\-s\fR" 4
More information about the inn-patches
mailing list