From f6fd2111e7d661e68fb306bb5c43b6ba85c3088e Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 29 Nov 2016 21:49:40 +0000 Subject: [PATCH] Ensure permissions on freedombone commands --- src/freedombone-upgrade | 4 ++++ src/freedombone-utils-setup | 9 ++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/freedombone-upgrade b/src/freedombone-upgrade index 668cbc36..9c1ae575 100755 --- a/src/freedombone-upgrade +++ b/src/freedombone-upgrade @@ -85,6 +85,10 @@ if [ -d $PROJECT_DIR ]; then git_pull $PROJECT_REPO origin/$DEVELOPMENT_BRANCH fi make install + if [ -d /usr/share/${PROJECT_NAME} ]; then + chown -R root:root /usr/share/${PROJECT_NAME} + chmod -R +r /usr/share/${PROJECT_NAME} + fi ${PROJECT_NAME} -c $CONFIGURATION_FILE fi fi diff --git a/src/freedombone-utils-setup b/src/freedombone-utils-setup index 718c4339..9956b5ed 100755 --- a/src/freedombone-utils-setup +++ b/src/freedombone-utils-setup @@ -435,7 +435,10 @@ function set_command_file_permissions { if [ -d /usr/local/sbin ]; then chown root:root /usr/local/sbin/* fi - chmod 4755 /usr/bin/sudo + if [ -d /usr/share/${PROJECT_NAME} ]; then + chown -R root:root /usr/share/${PROJECT_NAME} + chmod -R +r /usr/share/${PROJECT_NAME} + fi if [ -d /lib ]; then chown -R root:root /lib/* @@ -449,6 +452,10 @@ function set_command_file_permissions { if [ -d /usr/lib64 ]; then chown -R root:root /usr/lib64/* fi + + chmod 4755 /usr/bin/sudo + chmod 4755 /usr/lib/sudo/sudoers.so + chown root:root /etc/sudoers } function setup_firewall {