Skip to contentSkip to conversation

sssd/sssd-lib.sh: fix the permission of sssd.conf

PATCH New Xiao Yang 2 participants 2 messages Nov 26, 2015 – Jan 28, 2016

lore
Share & tools
lore

Xiao Yang

author
#0 lore raw

PATCH 1/1 sssd/sssd-lib.sh: fix the permission of sssd.conf

In order to restart sssd service successfully, the permission of sssd.conf should be set to 0600.

---
 testcases/commands/sssd/sssd-lib.sh | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
testcases/commands/sssd/sssd-lib.sh +6 -1
index 9c84729..ab16fd4 100755
@@ -114,7 +114,12 @@ setup()
 				$NSS_CONFIG_FILE
 		fi
 	else
-		tst_brkm TBROK NULL "$CONFIG_FILE not found!"
+		tst_resm TWARN "$CONFIG_FILE not found!"
+		touch $CONFIG_FILE
+	fi
+	chmod 0600 $CONFIG_FILE
+	if [ $? -ne 0 ]; then
+		tst_brkm TBROK NULL "fail to modify the permission of $CONFIG_FILE"
 	fi
 }
 
Signature · 1 line
1.8.3.1
#1 lore raw

PATCH 1/1 sssd/sssd-lib.sh: fix the permission of sssd.conf

Hi!

Quoted 2 lines

In order to restart sssd service successfully, the permission of sssd.conf should be set to 0600.

Pushed, thanks.

Signature · 2 lines
Cyril Hrubis
[email protected]