From 4dbba52a5b7e97d55ea7c4f957f594204350b9b2 Mon Sep 17 00:00:00 2001 From: An-Cheng Huang Date: Tue, 4 Dec 2007 18:53:56 -0800 Subject: * restrict "users" level sudo permissions to the "sudo-users" directory. * add wrappers for show commands requiring sudo and put them in "sudo-users" directory. --- scripts/vyatta-ethtool-wrapper | 4 ++++ scripts/vyatta-show-log | 4 ++++ scripts/vyatta-show-log-file | 8 ++++++++ 3 files changed, 16 insertions(+) create mode 100755 scripts/vyatta-ethtool-wrapper create mode 100755 scripts/vyatta-show-log create mode 100755 scripts/vyatta-show-log-file (limited to 'scripts') diff --git a/scripts/vyatta-ethtool-wrapper b/scripts/vyatta-ethtool-wrapper new file mode 100755 index 0000000..8753bd6 --- /dev/null +++ b/scripts/vyatta-ethtool-wrapper @@ -0,0 +1,4 @@ +#!/bin/bash + +ethtool "$@" + diff --git a/scripts/vyatta-show-log b/scripts/vyatta-show-log new file mode 100755 index 0000000..10e46e5 --- /dev/null +++ b/scripts/vyatta-show-log @@ -0,0 +1,4 @@ +#!/bin/bash + +cat /var/log/messages + diff --git a/scripts/vyatta-show-log-file b/scripts/vyatta-show-log-file new file mode 100755 index 0000000..1f8a0ef --- /dev/null +++ b/scripts/vyatta-show-log-file @@ -0,0 +1,8 @@ +#!/bin/bash + +if [ -f /var/log/user/$1 ]; then + cat /var/log/user/$1 +else + echo "No such log file" +fi + -- cgit v1.2.3