source:
freewrt/package/dropbear/patches/100-pubkey_path.patch@
166beac
| Last change on this file since 166beac was 166beac, checked in by , 17 years ago | |
|---|---|
|
|
| File size: 1.1 KB | |
-
dropbear-0.51/svr-authpubkey.c
old new 176 176 goto out; 177 177 } 178 178 179 if (ses.authstate.pw_uid != 0) { 180 179 181 /* we don't need to check pw and pw_dir for validity, since 180 182 * its been done in checkpubkeyperms. */ 181 183 len = strlen(ses.authstate.pw_dir); … … 187 189 188 190 /* open the file */ 189 191 authfile = fopen(filename, "r"); 192 } else { 193 authfile = fopen("/etc/dropbear/authorized_keys","r"); 194 } 190 195 if (authfile == NULL) { 191 196 goto out; 192 197 } … … 274 279 goto out; 275 280 } 276 281 282 if (ses.authstate.pw_uid != 0) { 283 277 284 /* allocate max required pathname storage, 278 285 * = path + "/.ssh/authorized_keys" + '\0' = pathlen + 22 */ 279 286 filename = m_malloc(len + 22); … … 295 302 if (checkfileperm(filename) != DROPBEAR_SUCCESS) { 296 303 goto out; 297 304 } 305 } else { 306 if (checkfileperm("/etc/dropbear") != DROPBEAR_SUCCESS) { 307 goto out; 308 } 309 if (checkfileperm("/etc/dropbear/authorized_keys") != DROPBEAR_SUCCESS) { 310 goto out; 311 } 312 } 298 313 299 314 /* file looks ok, return success */ 300 315 ret = DROPBEAR_SUCCESS;
Note:
See TracBrowser
for help on using the repository browser.
