jjelen pushed to openssh (f22). "Resolve segfault with auditing commands (#1203900)"
notifications at fedoraproject.org
notifications at fedoraproject.org
Thu Mar 26 13:52:58 UTC 2015
>From acf98854cae6ba7d555b89a18ee0cef7bb182068 Mon Sep 17 00:00:00 2001
From: Jakub Jelen <jjelen at redhat.com>
Date: Fri, 20 Mar 2015 15:06:06 +0100
Subject: Resolve segfault with auditing commands (#1203900)
diff --git a/openssh-6.7p1-audit.patch b/openssh-6.7p1-audit.patch
index cb8e778..735c9c7 100644
--- a/openssh-6.7p1-audit.patch
+++ b/openssh-6.7p1-audit.patch
@@ -1895,7 +1895,7 @@ diff -up openssh-6.8p1/session.c.audit openssh-6.8p1/session.c
- PRIVSEP(audit_run_command(shell));
+ s->command = xstrdup(shell);
}
-+ if (s->command != NULL && s->ttyfd == -1)
++ if (s->command != NULL && s->ptyfd == -1)
+ s->command_handle = PRIVSEP(audit_run_command(s->command));
#endif
if (s->ttyfd != -1)
@@ -1940,7 +1940,7 @@ diff -up openssh-6.8p1/session.c.audit openssh-6.8p1/session.c
session_by_tty(char *tty)
{
int i;
-@@ -2532,6 +2561,30 @@ session_exit_message(Session *s, int sta
+@@ -2532,6 +2561,31 @@ session_exit_message(Session *s, int sta
chan_write_failed(c);
}
@@ -1948,8 +1948,9 @@ diff -up openssh-6.8p1/session.c.audit openssh-6.8p1/session.c
+void
+session_end_command2(Session *s)
+{
-+ if (s->command != NULL && s->ttyfd == -1) {
-+ audit_end_command(s->command_handle, s->command);
++ if (s->command != NULL) {
++ if (s->ptyfd == -1)
++ audit_end_command(s->command_handle, s->command);
+ free(s->command);
+ s->command = NULL;
+ s->command_handle = -1;
--
cgit v0.10.2
http://pkgs.fedoraproject.org/cgit/openssh.git/commit/?h=f22&id=acf98854cae6ba7d555b89a18ee0cef7bb182068
More information about the scm-commits
mailing list