[dovecot-cvs] dovecot/src/auth db-passwd-file.c,1.25.2.2,1.25.2.3
cras at dovecot.org
cras at dovecot.org
Sat Jul 1 22:42:28 EEST 2006
Update of /var/lib/cvs/dovecot/src/auth
In directory talvi:/tmp/cvs-serv5462
Modified Files:
Tag: branch_1_0
db-passwd-file.c
Log Message:
Don't require valid uid/gid fields if passwd-file isn't being 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.25.2.2
retrieving revision 1.25.2.3
diff -u -d -r1.25.2.2 -r1.25.2.3
--- db-passwd-file.c 17 Jun 2006 21:02:35 -0000 1.25.2.2
+++ db-passwd-file.c 1 Jul 2006 19:42:25 -0000 1.25.2.3
@@ -68,8 +68,9 @@
}
if (*args != NULL && **args != '\0') {
- pu->uid = userdb_parse_uid(NULL, *args);
- if (pu->uid == 0 || pu->uid == (uid_t)-1) {
+ pu->uid = !pw->db->userdb ? (uid_t)-1 :
+ userdb_parse_uid(NULL, *args);
+ if ((pu->uid == 0 || pu->uid == (uid_t)-1) && pw->db->userdb) {
i_error("passwd-file %s: User %s has invalid UID %s",
pw->path, username, *args);
return;
@@ -79,8 +80,9 @@
args++;
if (*args != NULL && **args != '\0') {
- pu->gid = userdb_parse_gid(NULL, *args);
- if (pu->gid == 0 || pu->gid == (gid_t)-1) {
+ pu->gid = !pw->db->userdb ? (gid_t)-1 :
+ userdb_parse_gid(NULL, *args);
+ if ((pu->gid == 0 || pu->gid == (gid_t)-1) && pw->db->userdb) {
i_error("passwd-file %s: User %s has invalid GID %s",
pw->path, username, *args);
return;
More information about the dovecot-cvs
mailing list