[dovecot-cvs] dovecot/src/auth db-passwd-file.c,1.27,1.28
cras at dovecot.org
cras at dovecot.org
Sat Jul 1 22:42:30 EEST 2006
Update of /var/lib/cvs/dovecot/src/auth
In directory talvi:/tmp/cvs-serv12228
Modified Files:
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.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- db-passwd-file.c 17 Jun 2006 21:02:36 -0000 1.27
+++ db-passwd-file.c 1 Jul 2006 19:42:27 -0000 1.28
@@ -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