mirror of git://anongit.mindrot.org/openssh.git
- stevesk@cvs.openbsd.org 2002/11/26 02:38:54
[canohost.c] KNF, comment and error message repair; ok markus@
This commit is contained in:
parent
9394d2fc0a
commit
acaac975ca
|
@ -33,6 +33,9 @@
|
||||||
- stevesk@cvs.openbsd.org 2002/11/26 02:35:30
|
- stevesk@cvs.openbsd.org 2002/11/26 02:35:30
|
||||||
[ssh-keygen.1]
|
[ssh-keygen.1]
|
||||||
remove outdated statement; ok markus@ deraadt@
|
remove outdated statement; ok markus@ deraadt@
|
||||||
|
- stevesk@cvs.openbsd.org 2002/11/26 02:38:54
|
||||||
|
[canohost.c]
|
||||||
|
KNF, comment and error message repair; ok markus@
|
||||||
|
|
||||||
20021205
|
20021205
|
||||||
- (djm) PERL-free fixpaths from stuge-openssh-unix-dev@cdy.org
|
- (djm) PERL-free fixpaths from stuge-openssh-unix-dev@cdy.org
|
||||||
|
@ -868,4 +871,4 @@
|
||||||
save auth method before monitor_reset_key_state(); bugzilla bug #284;
|
save auth method before monitor_reset_key_state(); bugzilla bug #284;
|
||||||
ok provos@
|
ok provos@
|
||||||
|
|
||||||
$Id: ChangeLog,v 1.2524 2002/12/23 02:11:54 mouring Exp $
|
$Id: ChangeLog,v 1.2525 2002/12/23 02:13:37 mouring Exp $
|
||||||
|
|
12
canohost.c
12
canohost.c
|
@ -12,7 +12,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
RCSID("$OpenBSD: canohost.c,v 1.34 2002/09/23 20:46:27 stevesk Exp $");
|
RCSID("$OpenBSD: canohost.c,v 1.35 2002/11/26 02:38:54 stevesk Exp $");
|
||||||
|
|
||||||
#include "packet.h"
|
#include "packet.h"
|
||||||
#include "xmalloc.h"
|
#include "xmalloc.h"
|
||||||
|
@ -38,7 +38,7 @@ get_remote_hostname(int socket, int verify_reverse_mapping)
|
||||||
/* Get IP address of client. */
|
/* Get IP address of client. */
|
||||||
fromlen = sizeof(from);
|
fromlen = sizeof(from);
|
||||||
memset(&from, 0, sizeof(from));
|
memset(&from, 0, sizeof(from));
|
||||||
if (getpeername(socket, (struct sockaddr *) &from, &fromlen) < 0) {
|
if (getpeername(socket, (struct sockaddr *)&from, &fromlen) < 0) {
|
||||||
debug("getpeername failed: %.100s", strerror(errno));
|
debug("getpeername failed: %.100s", strerror(errno));
|
||||||
fatal_cleanup();
|
fatal_cleanup();
|
||||||
}
|
}
|
||||||
|
@ -202,8 +202,8 @@ get_canonical_hostname(int verify_reverse_mapping)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Returns the remote IP-address of socket as a string. The returned
|
* Returns the local/remote IP-address/hostname of socket as a string.
|
||||||
* string must be freed.
|
* The returned string must be freed.
|
||||||
*/
|
*/
|
||||||
static char *
|
static char *
|
||||||
get_socket_address(int socket, int remote, int flags)
|
get_socket_address(int socket, int remote, int flags)
|
||||||
|
@ -228,7 +228,7 @@ get_socket_address(int socket, int remote, int flags)
|
||||||
/* Get the address in ascii. */
|
/* Get the address in ascii. */
|
||||||
if (getnameinfo((struct sockaddr *)&addr, addrlen, ntop, sizeof(ntop),
|
if (getnameinfo((struct sockaddr *)&addr, addrlen, ntop, sizeof(ntop),
|
||||||
NULL, 0, flags) != 0) {
|
NULL, 0, flags) != 0) {
|
||||||
error("get_socket_ipaddr: getnameinfo %d failed", flags);
|
error("get_socket_address: getnameinfo %d failed", flags);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
return xstrdup(ntop);
|
return xstrdup(ntop);
|
||||||
|
@ -314,7 +314,7 @@ get_sock_port(int sock, int local)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (getpeername(sock, (struct sockaddr *) & from, &fromlen) < 0) {
|
if (getpeername(sock, (struct sockaddr *)&from, &fromlen) < 0) {
|
||||||
debug("getpeername failed: %.100s", strerror(errno));
|
debug("getpeername failed: %.100s", strerror(errno));
|
||||||
fatal_cleanup();
|
fatal_cleanup();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue