From 1fdeb284f5c9fde710169d20f45ae707a7e48081 Mon Sep 17 00:00:00 2001
From: Michael Hanselmann <hansmi@google.com>
Date: Fri, 16 Nov 2012 18:11:57 +0100
Subject: [PATCH] Rename configure option for restricted commands
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

It is no longer β€œ--enable-remote-commands”, but rather
β€œ--enable-restricted-commands”.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
---
 Makefile.am      |  2 +-
 configure.ac     | 14 +++++++-------
 lib/backend.py   |  2 +-
 lib/constants.py |  2 +-
 4 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index b1e8ee9de..afc106c9a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1283,7 +1283,7 @@ lib/_autoconf.py: Makefile | stamp-directories
 	  echo "ENABLE_CONFD = $(ENABLE_CONFD)"; \
 	  echo "XEN_CMD = '$(XEN_CMD)'"; \
 	  echo "ENABLE_SPLIT_QUERY = $(ENABLE_SPLIT_QUERY)"; \
-	  echo "ENABLE_REMOTE_COMMANDS = $(ENABLE_REMOTE_COMMANDS)"; \
+	  echo "ENABLE_RESTRICTED_COMMANDS = $(ENABLE_RESTRICTED_COMMANDS)"; \
 	} > $@
 
 lib/_vcsversion.py: Makefile vcs-version | stamp-directories
diff --git a/configure.ac b/configure.ac
index 7bf958018..30136d9ca 100644
--- a/configure.ac
+++ b/configure.ac
@@ -311,18 +311,18 @@ then
 fi
 AC_SUBST(SYSLOG_USAGE, $SYSLOG)
 
-AC_ARG_ENABLE([remote-commands],
-  [AS_HELP_STRING([--enable-remote-commands],
-                  m4_normalize([enable remote commands in the node daemon
+AC_ARG_ENABLE([restricted-commands],
+  [AS_HELP_STRING([--enable-restricted-commands],
+                  m4_normalize([enable restricted commands in the node daemon
                                 (default: disabled)]))],
   [[if test "$enableval" = no; then
-      enable_remote_commands=False
+      enable_restricted_commands=False
     else
-      enable_remote_commands=True
+      enable_restricted_commands=True
     fi
   ]],
-  [enable_remote_commands=False])
-AC_SUBST(ENABLE_REMOTE_COMMANDS, $enable_remote_commands)
+  [enable_restricted_commands=False])
+AC_SUBST(ENABLE_RESTRICTED_COMMANDS, $enable_restricted_commands)
 
 # --with-disk-separator=...
 AC_ARG_WITH([disk-separator],
diff --git a/lib/backend.py b/lib/backend.py
index d5c0e928f..4bd470099 100644
--- a/lib/backend.py
+++ b/lib/backend.py
@@ -3714,7 +3714,7 @@ def RunRemoteCommand(cmd,
                      _sleep_fn=time.sleep,
                      _prepare_fn=_PrepareRemoteCommand,
                      _runcmd_fn=utils.RunCmd,
-                     _enabled=constants.ENABLE_REMOTE_COMMANDS):
+                     _enabled=constants.ENABLE_RESTRICTED_COMMANDS):
   """Executes a remote command after performing strict tests.
 
   @type cmd: string
diff --git a/lib/constants.py b/lib/constants.py
index 3f32d5e7d..4f78766c9 100644
--- a/lib/constants.py
+++ b/lib/constants.py
@@ -140,7 +140,7 @@ ENABLE_FILE_STORAGE = _autoconf.ENABLE_FILE_STORAGE
 ENABLE_SHARED_FILE_STORAGE = _autoconf.ENABLE_SHARED_FILE_STORAGE
 ENABLE_CONFD = _autoconf.ENABLE_CONFD
 ENABLE_SPLIT_QUERY = _autoconf.ENABLE_SPLIT_QUERY
-ENABLE_REMOTE_COMMANDS = _autoconf.ENABLE_REMOTE_COMMANDS
+ENABLE_RESTRICTED_COMMANDS = _autoconf.ENABLE_RESTRICTED_COMMANDS
 
 NODED = "ganeti-noded"
 CONFD = "ganeti-confd"
-- 
GitLab