summaryrefslogtreecommitdiffstats
path: root/sshd.c
diff options
context:
space:
mode:
Diffstat (limited to 'sshd.c')
-rw-r--r--sshd.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/sshd.c b/sshd.c
index ed54fc6..df76dc7 100644
--- a/sshd.c
+++ b/sshd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshd.c,v 1.609 2024/06/27 23:01:15 djm Exp $ */
+/* $OpenBSD: sshd.c,v 1.612 2024/09/15 01:11:26 djm Exp $ */
/*
* Copyright (c) 2000, 2001, 2002 Markus Friedl. All rights reserved.
* Copyright (c) 2002 Niels Provos. All rights reserved.
@@ -262,7 +262,7 @@ child_register(int pipefd, int sockfd)
} else {
laddr = get_local_ipaddr(sockfd);
raddr = get_peer_ipaddr(sockfd);
- xasprintf(&child->id, "connection from %s to %s", laddr, raddr);
+ xasprintf(&child->id, "connection from %s to %s", raddr, laddr);
}
free(laddr);
free(raddr);
@@ -381,6 +381,13 @@ child_reap(struct early_child *child)
(long)child->pid, child->id,
child->early ? " (early)" : "");
break;
+ case EXIT_CONFIG_REFUSED:
+ penalty_type = SRCLIMIT_PENALTY_REFUSECONNECTION;
+ debug_f("preauth child %ld for %s prohibited by"
+ "RefuseConnection %s",
+ (long)child->pid, child->id,
+ child->early ? " (early)" : "");
+ break;
default:
penalty_type = SRCLIMIT_PENALTY_NOAUTH;
debug_f("preauth child %ld for %s exited "
@@ -1341,7 +1348,7 @@ main(int ac, char **av)
break;
}
}
- if (!test_flag && !do_dump_cfg && !path_absolute(av[0]))
+ if (!test_flag && !inetd_flag && !do_dump_cfg && !path_absolute(av[0]))
fatal("sshd requires execution with an absolute path");
closefrom(STDERR_FILENO + 1);