[openssh] Fix auditing when using combination of ForceCommand and PTY

Jakub Jelen jjelen at fedoraproject.org
Thu Mar 12 10:55:17 UTC 2015


commit c8062c4be37ff5adc1b781fb12156f15f808f429
Author: Jakub Jelen <jjelen at redhat.com>
Date:   Tue Mar 10 09:14:44 2015 +0100

    Fix auditing when using combination of ForceCommand and PTY

 openssh-6.7p1-audit.patch | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/openssh-6.7p1-audit.patch b/openssh-6.7p1-audit.patch
index 41401e7..2c1e80d 100644
--- a/openssh-6.7p1-audit.patch
+++ b/openssh-6.7p1-audit.patch
@@ -1947,7 +1947,7 @@ index 40a681e..acd87d5 100644
 -		PRIVSEP(audit_run_command(shell));
 +		s->command = xstrdup(shell);
  	}
-+	if (s->command != NULL)
++	if (s->command != NULL && s->ttyfd == -1)
 +		s->command_handle = PRIVSEP(audit_run_command(s->command));
  #endif
  	if (s->ttyfd != -1)
@@ -2000,7 +2000,7 @@ index 40a681e..acd87d5 100644
 +void
 +session_end_command2(Session *s)
 +{
-+	if (s->command != NULL) {
++	if (s->command != NULL && s->ttyfd == -1) {
 +		audit_end_command(s->command_handle, s->command);
 +		free(s->command);
 +		s->command = NULL;


More information about the scm-commits mailing list