From 2d73e504545f05cd7b9a7f561e319d1f21ee8bcc Mon Sep 17 00:00:00 2001 From: slioch Date: Tue, 7 Oct 2008 17:49:01 -0700 Subject: Revert "Change allow-root nodes to boolean" This reverts commit 7232e04d5d021f60e4cf6463328c165f19d56c6c. --- templates/service/ssh/allow-root/node.def | 8 +++----- templates/service/telnet/allow-root/node.def | 10 +++++----- 2 files changed, 8 insertions(+), 10 deletions(-) (limited to 'templates/service') diff --git a/templates/service/ssh/allow-root/node.def b/templates/service/ssh/allow-root/node.def index 058735ed..9aa98826 100644 --- a/templates/service/ssh/allow-root/node.def +++ b/templates/service/ssh/allow-root/node.def @@ -1,6 +1,7 @@ -type: bool +type: txt default: false help: Enable/disable root login over ssh +syntax:expression: $VAR(@) in "true", "false" ; "must be true or false" update: if [ \"$VAR(@)\" == \"true\" ]; then sudo ed - /etc/ssh/sshd_config <<-"EOF" /^PermitRootLogin/s/no/yes/ @@ -12,7 +13,4 @@ update: if [ \"$VAR(@)\" == \"true\" ]; then wq EOF fi -comp_help: possible completions: - true Allow root to login over ssh - false Don't allow root to login over ssh(default) - + /bin/true diff --git a/templates/service/telnet/allow-root/node.def b/templates/service/telnet/allow-root/node.def index e01763b6..347a9476 100644 --- a/templates/service/telnet/allow-root/node.def +++ b/templates/service/telnet/allow-root/node.def @@ -1,7 +1,9 @@ -type: bool +type: txt default: false help: Enable/disable root login +syntax:expression: $VAR(@) in "true", "false" ; "must be true or false" + update: pids=`who -u | awk -F " " '{print $7}'` for i in $pids do @@ -18,6 +20,7 @@ update: pids=`who -u | awk -F " " '{print $7}'` else sudo mv -f /etc/securetty.allow-root /etc/securetty >&/dev/null fi + /bin/true delete: pids=`who -u | awk -F " " '{print $7}'` for i in $pids @@ -30,7 +33,4 @@ delete: pids=`who -u | awk -F " " '{print $7}'` fi done sudo mv -f /etc/securetty.allow-root /etc/securetty >&/dev/null - -comp_help: possible completions: - true Allow root to login via telnet - false Don't allow root to login via telnet(default) + /bin/true -- cgit v1.2.3