forked from rpms/openssh
Fix segfault on daemon exit caused by API change (#1213423)
This commit is contained in:
parent
c5163162d3
commit
054365b28e
@ -9,7 +9,7 @@ diff -up openssh-6.8p1/canohost.c.set_remote_ipaddr openssh-6.8p1/canohost.c
|
|||||||
+ if (canonical_host_ip != NULL)
|
+ if (canonical_host_ip != NULL)
|
||||||
+ free(canonical_host_ip);
|
+ free(canonical_host_ip);
|
||||||
+
|
+
|
||||||
+ if (packet_connection_is_on_socket()) {
|
+ if (active_state != NULL && packet_connection_is_on_socket()) {
|
||||||
+ canonical_host_ip =
|
+ canonical_host_ip =
|
||||||
+ get_peer_ipaddr(packet_get_connection_in());
|
+ get_peer_ipaddr(packet_get_connection_in());
|
||||||
+ if (canonical_host_ip == NULL)
|
+ if (canonical_host_ip == NULL)
|
||||||
|
@ -456,7 +456,7 @@ diff -up openssh-6.8p1/audit-linux.c.audit openssh-6.8p1/audit-linux.c
|
|||||||
+ }
|
+ }
|
||||||
+ audit_ok = audit_log_user_message(audit_fd, AUDIT_CRYPTO_KEY_USER,
|
+ audit_ok = audit_log_user_message(audit_fd, AUDIT_CRYPTO_KEY_USER,
|
||||||
+ buf, NULL,
|
+ buf, NULL,
|
||||||
+ listening_for_clients() ? get_remote_ipaddr() : NULL,
|
+ listening_for_clients() ? NULL : get_remote_ipaddr(),
|
||||||
+ NULL, 1);
|
+ NULL, 1);
|
||||||
+ audit_close(audit_fd);
|
+ audit_close(audit_fd);
|
||||||
+ /* do not abort if the error is EPERM and sshd is run as non root user */
|
+ /* do not abort if the error is EPERM and sshd is run as non root user */
|
||||||
|
Loading…
Reference in New Issue
Block a user