- djm@cvs.openbsd.org 2004/10/07 10:12:36
[ssh-agent.c] don't unlink agent socket when bind() fails, spotted by rich AT rich-paul.net, ok markus@
This commit is contained in:
parent
636ca90247
commit
1dee8683fb
|
@ -38,6 +38,10 @@
|
|||
- djm@cvs.openbsd.org 2004/10/07 10:10:24
|
||||
[scp.1 sftp.1 ssh.1 ssh_config.5]
|
||||
document KbdInteractiveDevices; ok markus@
|
||||
- djm@cvs.openbsd.org 2004/10/07 10:12:36
|
||||
[ssh-agent.c]
|
||||
don't unlink agent socket when bind() fails, spotted by rich AT
|
||||
rich-paul.net, ok markus@
|
||||
|
||||
20041102
|
||||
- (dtucker) [configure.ac includes.h] Bug #947: Fix compile error on HP-UX
|
||||
|
@ -1817,4 +1821,4 @@
|
|||
- (djm) Trim deprecated options from INSTALL. Mention UsePAM
|
||||
- (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
|
||||
|
||||
$Id: ChangeLog,v 1.3572 2004/11/05 09:22:00 dtucker Exp $
|
||||
$Id: ChangeLog,v 1.3573 2004/11/05 09:26:49 dtucker Exp $
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
|
||||
#include "includes.h"
|
||||
#include "openbsd-compat/sys-queue.h"
|
||||
RCSID("$OpenBSD: ssh-agent.c,v 1.120 2004/08/11 21:43:05 avsm Exp $");
|
||||
RCSID("$OpenBSD: ssh-agent.c,v 1.121 2004/10/07 10:12:36 djm Exp $");
|
||||
|
||||
#include <openssl/evp.h>
|
||||
#include <openssl/md5.h>
|
||||
|
@ -1122,6 +1122,7 @@ main(int ac, char **av)
|
|||
sock = socket(AF_UNIX, SOCK_STREAM, 0);
|
||||
if (sock < 0) {
|
||||
perror("socket");
|
||||
*socket_name = '\0'; /* Don't unlink any existing file */
|
||||
cleanup_exit(1);
|
||||
}
|
||||
memset(&sunaddr, 0, sizeof(sunaddr));
|
||||
|
@ -1130,6 +1131,7 @@ main(int ac, char **av)
|
|||
prev_mask = umask(0177);
|
||||
if (bind(sock, (struct sockaddr *) & sunaddr, sizeof(sunaddr)) < 0) {
|
||||
perror("bind");
|
||||
*socket_name = '\0'; /* Don't unlink any existing file */
|
||||
umask(prev_mask);
|
||||
cleanup_exit(1);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue