зеркало из https://github.com/Azure/sonic-openssh.git
- markus@cvs.openbsd.org 2002/03/21 10:21:20
[ssh-add.c] ignore errors for nonexisting default keys in ssh-add, fixes http://bugzilla.mindrot.org/show_bug.cgi?id=158 Last patch was SUPPOSE to be: - stevesk@cvs.openbsd.org 2002/03/20 21:08:08 [sshd.c] strerror() on chdir() fail; ok provos@ But it got co-mingled. <sigh> Flog me at will.
This commit is contained in:
Родитель
1ee9ec32a3
Коммит
58b391b1bd
|
@ -104,6 +104,9 @@
|
||||||
[servconf.c servconf.h ssh.h sshd.c]
|
[servconf.c servconf.h ssh.h sshd.c]
|
||||||
for unprivileged user, group do:
|
for unprivileged user, group do:
|
||||||
pw=getpwnam(SSH_PRIVSEP_USER); do_setusercontext(pw). ok provos@
|
pw=getpwnam(SSH_PRIVSEP_USER); do_setusercontext(pw). ok provos@
|
||||||
|
- stevesk@cvs.openbsd.org 2002/03/20 21:08:08
|
||||||
|
[sshd.c]
|
||||||
|
strerror() on chdir() fail; ok provos@
|
||||||
- markus@cvs.openbsd.org 2002/03/21 10:21:20
|
- markus@cvs.openbsd.org 2002/03/21 10:21:20
|
||||||
[ssh-add.c]
|
[ssh-add.c]
|
||||||
ignore errors for nonexisting default keys in ssh-add,
|
ignore errors for nonexisting default keys in ssh-add,
|
||||||
|
@ -7954,4 +7957,4 @@
|
||||||
- Wrote replacements for strlcpy and mkdtemp
|
- Wrote replacements for strlcpy and mkdtemp
|
||||||
- Released 1.0pre1
|
- Released 1.0pre1
|
||||||
|
|
||||||
$Id: ChangeLog,v 1.1955 2002/03/22 03:14:45 mouring Exp $
|
$Id: ChangeLog,v 1.1956 2002/03/22 03:21:16 mouring Exp $
|
||||||
|
|
10
ssh-add.c
10
ssh-add.c
|
@ -35,7 +35,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
RCSID("$OpenBSD: ssh-add.c,v 1.51 2002/03/19 10:49:35 markus Exp $");
|
RCSID("$OpenBSD: ssh-add.c,v 1.52 2002/03/21 10:21:20 markus Exp $");
|
||||||
|
|
||||||
#include <openssl/evp.h>
|
#include <openssl/evp.h>
|
||||||
|
|
||||||
|
@ -310,6 +310,8 @@ main(int argc, char **argv)
|
||||||
if (argc == 0) {
|
if (argc == 0) {
|
||||||
char buf[MAXPATHLEN];
|
char buf[MAXPATHLEN];
|
||||||
struct passwd *pw;
|
struct passwd *pw;
|
||||||
|
struct stat st;
|
||||||
|
int count = 0;
|
||||||
|
|
||||||
if ((pw = getpwuid(getuid())) == NULL) {
|
if ((pw = getpwuid(getuid())) == NULL) {
|
||||||
fprintf(stderr, "No user found with uid %u\n",
|
fprintf(stderr, "No user found with uid %u\n",
|
||||||
|
@ -321,9 +323,15 @@ main(int argc, char **argv)
|
||||||
for(i = 0; default_files[i]; i++) {
|
for(i = 0; default_files[i]; i++) {
|
||||||
snprintf(buf, sizeof(buf), "%s/%s", pw->pw_dir,
|
snprintf(buf, sizeof(buf), "%s/%s", pw->pw_dir,
|
||||||
default_files[i]);
|
default_files[i]);
|
||||||
|
if (stat(buf, &st) < 0)
|
||||||
|
continue;
|
||||||
if (do_file(ac, deleting, buf) == -1)
|
if (do_file(ac, deleting, buf) == -1)
|
||||||
ret = 1;
|
ret = 1;
|
||||||
|
else
|
||||||
|
count++;
|
||||||
}
|
}
|
||||||
|
if (count == 0)
|
||||||
|
ret = 1;
|
||||||
} else {
|
} else {
|
||||||
for(i = 0; i < argc; i++) {
|
for(i = 0; i < argc; i++) {
|
||||||
if (do_file(ac, deleting, argv[i]) == -1)
|
if (do_file(ac, deleting, argv[i]) == -1)
|
||||||
|
|
Загрузка…
Ссылка в новой задаче