X-Git-Url: https://git.enpas.org/?a=blobdiff_plain;f=package%2Fdropbear%2Fpatches%2F100-pubkey_path.patch;h=9346cc60f45d7d462e6026a21f2285df33f4d999;hb=6b6ce9f831d61226252d18961b47ccda7561cb3d;hp=cbe525bcc31203d8102c73515bd717750a103b98;hpb=f52d66ff00b24111f87c274d3d7085ef2e1d27b1;p=openwrt.git diff --git a/package/dropbear/patches/100-pubkey_path.patch b/package/dropbear/patches/100-pubkey_path.patch index cbe525bcc3..9346cc60f4 100644 --- a/package/dropbear/patches/100-pubkey_path.patch +++ b/package/dropbear/patches/100-pubkey_path.patch @@ -1,15 +1,17 @@ ---- dropbear.old/svr-authpubkey.c.orig 2006-06-03 14:54:43.000000000 +0000 -+++ dropbear.dev/svr-authpubkey.c 2006-06-03 15:03:19.000000000 +0000 -@@ -176,6 +176,8 @@ +Index: dropbear-0.52/svr-authpubkey.c +=================================================================== +--- dropbear-0.52.orig/svr-authpubkey.c 2008-04-22 17:29:49.000000000 -0700 ++++ dropbear-0.52/svr-authpubkey.c 2008-04-22 17:29:49.000000000 -0700 +@@ -209,6 +209,8 @@ goto out; } -+ if (ses.authstate.pw->pw_uid != 0) { ++ if (ses.authstate.pw_uid != 0) { + /* we don't need to check pw and pw_dir for validity, since * its been done in checkpubkeyperms. */ - len = strlen(ses.authstate.pw->pw_dir); -@@ -187,6 +189,9 @@ + len = strlen(ses.authstate.pw_dir); +@@ -220,6 +222,9 @@ /* open the file */ authfile = fopen(filename, "r"); @@ -19,16 +21,16 @@ if (authfile == NULL) { goto out; } -@@ -274,6 +279,8 @@ +@@ -372,6 +377,8 @@ goto out; } -+ if (ses.authstate.pw->pw_uid != 0) { ++ if (ses.authstate.pw_uid != 0) { + /* allocate max required pathname storage, * = path + "/.ssh/authorized_keys" + '\0' = pathlen + 22 */ filename = m_malloc(len + 22); -@@ -295,6 +302,14 @@ +@@ -381,6 +388,14 @@ if (checkfileperm(filename) != DROPBEAR_SUCCESS) { goto out; } @@ -41,5 +43,5 @@ + } + } - /* file looks ok, return success */ - ret = DROPBEAR_SUCCESS; + /* check ~/.ssh */ + strncat(filename, "/.ssh", 5); /* strlen("/.ssh") == 5 */