~ubuntu-branches/ubuntu/utopic/dropbear/utopic-proposed

« back to all changes in this revision

Viewing changes to svr-auth.c

  • Committer: Bazaar Package Importer
  • Author(s): Gerrit Pape, Matt Johnston, Gerrit Pape
  • Date: 2008-11-19 20:58:59 UTC
  • mfrom: (1.4.2 upstream)
  • mto: This revision was merged to the branch mainline in revision 11.
  • Revision ID: james.westby@ubuntu.com-20081119205859-dmeze0y6b16ia93v
Tags: 0.52-1
[ Matt Johnston ]
* New upstream release.
  * dbclient.1: mention optional 'command' argument (closes: #495823).

[ Gerrit Pape ]
* debian/diff/0001-dbclient.1-dbclient-uses-compression-if...diff:
  new; dbclient.1: dbclient uses compression if compiled with zlib
  support (thx Luca Capello, closes: #495825).
* debian/initramfs/*: new; cryptroot remote unlocking on boot feature
  (thx debian@x.ray.net).
* debian/rules: install debian/initramfs/* (thx debian@x.ray.net).
* debian/control: Suggests: udev (for cryptroot support, thx
  debian@x.ray.net).
* debian/dropbear.postinst: conditionally run update-initramfs -u
  (for cryptroot support, thx debian@x.ray.net. closes: #465903).
* debian/diff/0002-dropbearkey.8-mention-y-option-add-example.diff:
  new; mention -y option, add example (thx debian@x.ray.net).

Show diffs side-by-side

added added

removed removed

Lines of Context:
203
203
        m_free(methodname);
204
204
}
205
205
 
206
 
static int fill_passwd(const char* username) {
207
 
        struct passwd *pw = NULL;
208
 
        if (ses.authstate.pw_name)
209
 
                m_free(ses.authstate.pw_name);
210
 
        if (ses.authstate.pw_dir)
211
 
                m_free(ses.authstate.pw_dir);
212
 
        if (ses.authstate.pw_shell)
213
 
                m_free(ses.authstate.pw_shell);
214
 
        if (ses.authstate.pw_passwd)
215
 
                m_free(ses.authstate.pw_passwd);
216
 
 
217
 
        pw = getpwnam(username);
218
 
        if (!pw) {
219
 
                return;
220
 
        }
221
 
        ses.authstate.pw_uid = pw->pw_uid;
222
 
        ses.authstate.pw_gid = pw->pw_gid;
223
 
        ses.authstate.pw_name = m_strdup(pw->pw_name);
224
 
        ses.authstate.pw_dir = m_strdup(pw->pw_dir);
225
 
        ses.authstate.pw_shell = m_strdup(pw->pw_shell);
226
 
        ses.authstate.pw_passwd = m_strdup(pw->pw_passwd);
227
 
}
228
 
 
229
206
 
230
207
/* Check that the username exists, has a non-empty password, and has a valid
231
208
 * shell.
391
368
        buf_putbyte(ses.writepayload, SSH_MSG_USERAUTH_SUCCESS);
392
369
        encrypt_packet();
393
370
 
 
371
        /* authdone must be set after encrypt_packet() for 
 
372
         * delayed-zlib mode */
394
373
        ses.authstate.authdone = 1;
395
374
        ses.connect_time = 0;
396
375