Extra help information should not be printed if stderr is not a TTY

Resolves: RHEL-63061
This commit is contained in:
Dmitry Belyavskiy 2024-10-18 15:45:58 +02:00
parent 84ad70de57
commit ebb51c8cab
2 changed files with 8 additions and 2 deletions

View File

@ -1,17 +1,19 @@
diff -up openssh-8.7p1/ssh.c.xxx openssh-8.7p1/ssh.c
--- openssh-8.7p1/ssh.c.xxx 2024-09-11 14:24:06.711088878 +0200
+++ openssh-8.7p1/ssh.c 2024-09-11 14:35:12.883765718 +0200
@@ -175,6 +175,14 @@ extern int muxserver_sock;
@@ -175,6 +175,16 @@ extern int muxserver_sock;
extern u_int muxclient_command;
/* Prints a help message to the user. This function never returns. */
+static void
+redhat_usage(void)
+{
+ if(isatty(fileno(stderr))) {
+ fprintf(stderr,
+"\nYou can find some explanations for typical errors at this link:\n"
+" https://red.ht/support_rhel_ssh\n"
+ );
+ }
+}
static void

View File

@ -39,7 +39,7 @@
%{?static_openssl:%global static_libcrypto 1}
%global openssh_ver 9.9p1
%global openssh_rel 2
%global openssh_rel 3
Summary: An open source implementation of SSH protocol version 2
Name: openssh
@ -656,6 +656,10 @@ test -f %{sysconfig_anaconda} && \
%attr(0755,root,root) %{_libdir}/sshtest/sk-dummy.so
%changelog
* Fri Oct 18 2024 Dmitry Belyavskiy <dbelyavs@redhat.com> - 9.9p1-2
- Extra help information should not be printed if stderr is not a TTY
Resolves: RHEL-63061
* Tue Oct 15 2024 Dmitry Belyavskiy <dbelyavs@redhat.com> - 9.9p1-2
- Resolve memory management issues after rebase
Related: RHEL-60564