File tree Expand file tree Collapse file tree 3 files changed +23
-2
lines changed Expand file tree Collapse file tree 3 files changed +23
-2
lines changed Original file line number Diff line number Diff line change 1
1
This file documents the major additions and syntax changes between releases.
2
2
3
- 2.4.5 2023-05-15
3
+ 2.4.5 2023-05-31
4
4
FIXES
5
5
check_dns: Fix buffer overflow on Ubuntu 22.04 (#699)
6
6
check_sensors: Use grep instead of deprecated egrep (#697)
7
7
check_tcp: Add --sni as an alias to -N (#701)
8
+ check_by_ssh: Prevent users from using ProxyCommand/LocalCommand/PermitLocalCommand (./configure --with-unrestricted-ssh-options=yes to re-enable)
8
9
build: fix bug when using VPATH builds (#700)
9
10
10
11
2.4.4 2023-04-14
Original file line number Diff line number Diff line change @@ -418,6 +418,16 @@ then
418
418
[ path and arguments for invoking 'who'] )
419
419
fi
420
420
421
+ AC_ARG_WITH ( unrestricted_ssh_options ,
422
+ [ AS_HELP_STRING ( [ --with-unrestricted-ssh-options] ,
423
+ [ allow any SSH options to be used with check_by_ssh] ) ] ,
424
+ [ ] ,
425
+ [ unrestricted_ssh_options=no] )
426
+
427
+ if test "x$with_unrestricted_ssh_options" = xyes ; then
428
+ AC_DEFINE ( HAVE_UNRESTRICTED_SSH_OPTIONS ,[ 1] ,[ Allow SSH to use options that run local commands.] )
429
+ fi
430
+
421
431
AC_ARG_WITH ( [ ipv6] ,
422
432
[ AS_HELP_STRING ( [ --with-ipv6] , [ support IPv6 @<:@ default=check@:>@ ] ) ] ,
423
433
[ ] , [ with_ipv6=check] )
Original file line number Diff line number Diff line change 27
27
*****************************************************************************/
28
28
29
29
const char * progname = "check_by_ssh" ;
30
- const char * copyright = "2000-2014 " ;
30
+ const char * copyright = "2000-" ;
31
31
const char * email = "devel@nagios-plugins.org" ;
32
32
33
33
#include "common.h"
@@ -304,6 +304,16 @@ process_arguments (int argc, char **argv)
304
304
skip_stderr = atoi (optarg );
305
305
break ;
306
306
case 'o' : /* Extra options for the ssh command */
307
+
308
+ /* Don't allow the user to run commands local to the nagios server, unless they decide otherwise at compile time. */
309
+ #ifndef HAVE_UNRESTRICTED_SSH_OPTIONS
310
+ if ( strcasestr (optarg , "ProxyCommand" ) != NULL
311
+ || strcasestr (optarg , "PermitLocalCommand" ) != NULL
312
+ || strcasestr (optarg , "LocalCommand" ) != NULL ) {
313
+ break ;
314
+ }
315
+ #endif
316
+
307
317
comm_append ("-o" );
308
318
comm_append (optarg );
309
319
break ;
You can’t perform that action at this time.
0 commit comments