[dovecot-cvs] dovecot/src/auth db-passwd-file.c,1.13,1.14
cras at dovecot.org
cras at dovecot.org
Sat Sep 24 15:51:28 EEST 2005
Update of /var/lib/cvs/dovecot/src/auth
In directory talvi:/tmp/cvs-serv5034
Modified Files:
db-passwd-file.c
Log Message:
Read also users without password.
Index: db-passwd-file.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/db-passwd-file.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- db-passwd-file.c 22 Jul 2005 12:42:57 -0000 1.13
+++ db-passwd-file.c 24 Sep 2005 12:51:25 -0000 1.14
@@ -137,6 +137,7 @@
static int passwd_file_open(struct passwd_file *pw)
{
+ const char *no_args = NULL;
struct istream *input;
const char *const *args;
const char *line;
@@ -170,10 +171,12 @@
t_push();
args = t_strsplit(line, ":");
if (args[1] != NULL) {
- /* at least two fields */
- const char *no_args = NULL;
+ /* at least username+password */
passwd_file_add(pw, args[0], args[1],
pw->db->userdb ? args+2 : &no_args);
+ } else {
+ /* only username */
+ passwd_file_add(pw, args[0], NULL, &no_args);
}
t_pop();
}
More information about the dovecot-cvs
mailing list