1 Index: dropbear-0.51/svr-authpubkey.c
2 ===================================================================
3 --- dropbear-0.51.orig/svr-authpubkey.c 2008-04-22 17:29:49.000000000 -0700
4 +++ dropbear-0.51/svr-authpubkey.c 2008-04-22 17:29:49.000000000 -0700
9 + if (ses.authstate.pw_uid != 0) {
11 /* we don't need to check pw and pw_dir for validity, since
12 * its been done in checkpubkeyperms. */
13 len = strlen(ses.authstate.pw_dir);
17 authfile = fopen(filename, "r");
19 + authfile = fopen("/etc/dropbear/authorized_keys","r");
21 if (authfile == NULL) {
28 + if (ses.authstate.pw_uid != 0) {
30 /* allocate max required pathname storage,
31 * = path + "/.ssh/authorized_keys" + '\0' = pathlen + 22 */
32 filename = m_malloc(len + 22);
34 if (checkfileperm(filename) != DROPBEAR_SUCCESS) {
38 + if (checkfileperm("/etc/dropbear") != DROPBEAR_SUCCESS) {
41 + if (checkfileperm("/etc/dropbear/authorized_keys") != DROPBEAR_SUCCESS) {
46 /* file looks ok, return success */
47 ret = DROPBEAR_SUCCESS;