~ubuntu-branches/ubuntu/edgy/dovecot/edgy-security

« 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-06-30 15:13:37 UTC
  • mfrom: (1.10.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20060630151337-l772crcoe5hfd4hw
Tags: 1.0.rc1-1ubuntu1
Merge from debian unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
101
101
 
102
102
        /* home */
103
103
        if (*args != NULL) {
104
 
                pu->home = p_strdup_empty(pw->pool, *args);
 
104
                if (pw->db->userdb)
 
105
                        pu->home = p_strdup_empty(pw->pool, *args);
105
106
                args++;
106
107
        }
107
108
 
113
114
                /* old format, this field is empty and next field may
114
115
                   contain MAIL */
115
116
                args++;
116
 
                if (*args != NULL && **args != '\0') {
 
117
                if (*args != NULL && **args != '\0' && pw->db->userdb) {
117
118
                        extra_fields =
118
119
                                t_strconcat("userdb_mail=",
119
120
                                            t_strarray_join(args, ":"), NULL);
185
186
                args = t_strsplit(line, ":");
186
187
                if (args[1] != NULL) {
187
188
                        /* at least username+password */
188
 
                        passwd_file_add(pw, args[0], args[1],
189
 
                                        pw->db->userdb ? args+2 : &no_args);
 
189
                        passwd_file_add(pw, args[0], args[1], args+2);
190
190
                } else {
191
191
                        /* only username */
192
192
                        passwd_file_add(pw, args[0], NULL, &no_args);