[dovecot-cvs] dovecot/src/auth db-passwd-file.c,1.26,1.27
cras at dovecot.org
cras at dovecot.org
Sun Jun 18 00:02:40 EEST 2006
Update of /var/lib/cvs/dovecot/src/auth
In directory talvi:/tmp/cvs-serv6117
Modified Files:
db-passwd-file.c
Log Message:
extra_args field was ignored if the passwd-file wasn't also used as a
userdb.
Index: db-passwd-file.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/db-passwd-file.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- db-passwd-file.c 31 May 2006 11:03:53 -0000 1.26
+++ db-passwd-file.c 17 Jun 2006 21:02:36 -0000 1.27
@@ -101,7 +101,8 @@
/* home */
if (*args != NULL) {
- pu->home = p_strdup_empty(pw->pool, *args);
+ if (pw->db->userdb)
+ pu->home = p_strdup_empty(pw->pool, *args);
args++;
}
@@ -113,7 +114,7 @@
/* old format, this field is empty and next field may
contain MAIL */
args++;
- if (*args != NULL && **args != '\0') {
+ if (*args != NULL && **args != '\0' && pw->db->userdb) {
extra_fields =
t_strconcat("userdb_mail=",
t_strarray_join(args, ":"), NULL);
@@ -185,8 +186,7 @@
args = t_strsplit(line, ":");
if (args[1] != NULL) {
/* at least username+password */
- passwd_file_add(pw, args[0], args[1],
- pw->db->userdb ? args+2 : &no_args);
+ passwd_file_add(pw, args[0], args[1], args+2);
} else {
/* only username */
passwd_file_add(pw, args[0], NULL, &no_args);
More information about the dovecot-cvs
mailing list