- markus@cvs.openbsd.org 2001/07/10 21:49:12
[readpass.c] don't panic if fork or pipe fail (just return an empty passwd).
This commit is contained in:
parent
efb1edfc7f
commit
07ab49ef71
|
@ -31,6 +31,9 @@
|
|||
- deraadt@cvs.openbsd.org 2001/07/09 07:04:53
|
||||
[session.c sftp-int.c]
|
||||
correct type on last arg to execl(); nordin@cse.ogi.edu
|
||||
- markus@cvs.openbsd.org 2001/07/10 21:49:12
|
||||
[readpass.c]
|
||||
don't panic if fork or pipe fail (just return an empty passwd).
|
||||
|
||||
20010711
|
||||
- (djm) dirname(3) may modify its argument on glibc and other systems.
|
||||
|
@ -6006,4 +6009,4 @@
|
|||
- Wrote replacements for strlcpy and mkdtemp
|
||||
- Released 1.0pre1
|
||||
|
||||
$Id: ChangeLog,v 1.1394 2001/07/14 02:19:36 djm Exp $
|
||||
$Id: ChangeLog,v 1.1395 2001/07/14 02:19:56 djm Exp $
|
||||
|
|
14
readpass.c
14
readpass.c
|
@ -32,7 +32,7 @@
|
|||
*/
|
||||
|
||||
#include "includes.h"
|
||||
RCSID("$OpenBSD: readpass.c,v 1.20 2001/07/02 22:29:20 markus Exp $");
|
||||
RCSID("$OpenBSD: readpass.c,v 1.21 2001/07/10 21:49:12 markus Exp $");
|
||||
|
||||
#include "xmalloc.h"
|
||||
#include "readpass.h"
|
||||
|
@ -54,10 +54,14 @@ ssh_askpass(char *askpass, const char *msg)
|
|||
error("ssh_askpass: fflush: %s", strerror(errno));
|
||||
if (askpass == NULL)
|
||||
fatal("internal error: askpass undefined");
|
||||
if (pipe(p) < 0)
|
||||
fatal("ssh_askpass: pipe: %s", strerror(errno));
|
||||
if ((pid = fork()) < 0)
|
||||
fatal("ssh_askpass: fork: %s", strerror(errno));
|
||||
if (pipe(p) < 0) {
|
||||
error("ssh_askpass: pipe: %s", strerror(errno));
|
||||
return xstrdup("");
|
||||
}
|
||||
if ((pid = fork()) < 0) {
|
||||
error("ssh_askpass: fork: %s", strerror(errno));
|
||||
return xstrdup("");
|
||||
}
|
||||
if (pid == 0) {
|
||||
seteuid(getuid());
|
||||
setuid(getuid());
|
||||
|
|
Loading…
Reference in New Issue