=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/authfile.c,v retrieving revision 1.66 retrieving revision 1.67 diff -u -r1.66 -r1.67 --- src/usr.bin/ssh/authfile.c 2006/03/25 13:17:01 1.66 +++ src/usr.bin/ssh/authfile.c 2006/04/25 08:02:27 1.67 @@ -1,4 +1,4 @@ -/* $OpenBSD: authfile.c,v 1.66 2006/03/25 13:17:01 djm Exp $ */ +/* $OpenBSD: authfile.c,v 1.67 2006/04/25 08:02:27 dtucker Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -535,7 +535,7 @@ Key * key_load_private_type(int type, const char *filename, const char *passphrase, - char **commentp) + char **commentp, int *perm_ok) { int fd; @@ -543,10 +543,14 @@ if (fd < 0) return NULL; if (!key_perm_ok(fd, filename)) { + if (perm_ok != NULL) + *perm_ok = 0; error("bad permissions: ignore key: %s", filename); close(fd); return NULL; } + if (perm_ok != NULL) + *perm_ok = 1; switch (type) { case KEY_RSA1: return key_load_private_rsa1(fd, filename, passphrase,