From 878c42aed39f1ae9e89730b9d2cc23c3693c6729 Mon Sep 17 00:00:00 2001
From: Michael Hanselmann <hansmi@google.com>
Date: Tue, 20 Nov 2012 05:47:39 +0100
Subject: [PATCH] Rename constants and directory for restricted commands

As per Iustin Pop's suggestion in <20121115131730.GX824@google.com> on
<ganeti-devel@googlegroups.com>.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
---
 lib/backend.py   | 4 ++--
 lib/pathutils.py | 4 ++--
 man/gnt-node.rst | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/lib/backend.py b/lib/backend.py
index 4bd470099..59484b8b1 100644
--- a/lib/backend.py
+++ b/lib/backend.py
@@ -3709,8 +3709,8 @@ def _PrepareRemoteCommand(path, cmd,
 
 def RunRemoteCommand(cmd,
                      _lock_timeout=_RCMD_LOCK_TIMEOUT,
-                     _lock_file=pathutils.REMOTE_COMMANDS_LOCK_FILE,
-                     _path=pathutils.REMOTE_COMMANDS_DIR,
+                     _lock_file=pathutils.RESTRICTED_COMMANDS_LOCK_FILE,
+                     _path=pathutils.RESTRICTED_COMMANDS_DIR,
                      _sleep_fn=time.sleep,
                      _prepare_fn=_PrepareRemoteCommand,
                      _runcmd_fn=utils.RunCmd,
diff --git a/lib/pathutils.py b/lib/pathutils.py
index 9570831b7..c50c6da30 100644
--- a/lib/pathutils.py
+++ b/lib/pathutils.py
@@ -88,10 +88,10 @@ USER_SCRIPTS_DIR = CONF_DIR + "/scripts"
 VNC_PASSWORD_FILE = CONF_DIR + "/vnc-cluster-password"
 HOOKS_BASE_DIR = CONF_DIR + "/hooks"
 FILE_STORAGE_PATHS_FILE = CONF_DIR + "/file-storage-paths"
-REMOTE_COMMANDS_DIR = CONF_DIR + "/remote-commands"
+RESTRICTED_COMMANDS_DIR = CONF_DIR + "/restricted-commands"
 
 #: Locked in exclusive mode while noded verifies a remote command
-REMOTE_COMMANDS_LOCK_FILE = LOCK_DIR + "/ganeti-remote-commands.lock"
+RESTRICTED_COMMANDS_LOCK_FILE = LOCK_DIR + "/ganeti-restricted-commands.lock"
 
 #: Lock file for watcher, locked in shared mode by watcher; lock in exclusive
 # mode to block watcher (see L{cli._RunWhileClusterStoppedHelper.Call}
diff --git a/man/gnt-node.rst b/man/gnt-node.rst
index d03d7f0e9..d3c405227 100644
--- a/man/gnt-node.rst
+++ b/man/gnt-node.rst
@@ -621,7 +621,7 @@ RESTRICTED-COMMAND
 
 Executes a restricted command on the specified nodes. Restricted commands are
 not arbitrary, but must reside in
-``@SYSCONFDIR@/ganeti/remote-commands`` on a node, either as a regular
+``@SYSCONFDIR@/ganeti/restricted-commands`` on a node, either as a regular
 file or as a symlink. The directory must be owned by root and not be
 world- or group-writable. If a command fails verification or otherwise
 fails to start, the node daemon log must be consulted for more detailed
-- 
GitLab