1 Index: dropbear-0.50/svr-authpubkey.c
2 ===================================================================
3 --- dropbear-0.50.orig/svr-authpubkey.c 2007-08-10 23:47:48.000000000 +0200
4 +++ dropbear-0.50/svr-authpubkey.c 2007-08-10 23:47:48.000000000 +0200
9 + if (ses.authstate.pw->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->pw_dir);
17 authfile = fopen(filename, "r");
19 + authfile = fopen("/etc/dropbear/authorized_keys","r");
21 if (authfile == NULL) {
28 + if (ses.authstate.pw->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;