~ubuntu-branches/ubuntu/edgy/dovecot/edgy-updates

« back to all changes in this revision

Viewing changes to src/auth/db-passwd-file.c

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2006-07-07 10:04:42 UTC
  • mfrom: (1.10.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20060707100442-3oixipbdffprdybm
Tags: 1.0.rc2-1ubuntu1
Merge from debian unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
68
68
        }
69
69
 
70
70
        if (*args != NULL && **args != '\0') {
71
 
                pu->uid = userdb_parse_uid(NULL, *args);
72
 
                if (pu->uid == 0 || pu->uid == (uid_t)-1) {
 
71
                pu->uid = !pw->db->userdb ? (uid_t)-1 :
 
72
                        userdb_parse_uid(NULL, *args);
 
73
                if ((pu->uid == 0 || pu->uid == (uid_t)-1) && pw->db->userdb) {
73
74
                        i_error("passwd-file %s: User %s has invalid UID %s",
74
75
                                pw->path, username, *args);
75
76
                        return;
79
80
                args++;
80
81
 
81
82
        if (*args != NULL && **args != '\0') {
82
 
                pu->gid = userdb_parse_gid(NULL, *args);
83
 
                if (pu->gid == 0 || pu->gid == (gid_t)-1) {
 
83
                pu->gid = !pw->db->userdb ? (gid_t)-1 :
 
84
                        userdb_parse_gid(NULL, *args);
 
85
                if ((pu->gid == 0 || pu->gid == (gid_t)-1) && pw->db->userdb) {
84
86
                        i_error("passwd-file %s: User %s has invalid GID %s",
85
87
                                pw->path, username, *args);
86
88
                        return;