public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH] sssd/sssd-lib.sh: fix the permission of sssd.conf
@ 2015-11-26 16:16 Xiao Yang
  2016-01-28 15:02 ` Cyril Hrubis
  0 siblings, 1 reply; 2+ messages in thread
From: Xiao Yang @ 2015-11-26 16:16 UTC (permalink / raw)
  To: ltp

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

Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
---
 testcases/commands/sssd/sssd-lib.sh | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/testcases/commands/sssd/sssd-lib.sh b/testcases/commands/sssd/sssd-lib.sh
index 9c84729..ab16fd4 100755
--- a/testcases/commands/sssd/sssd-lib.sh
+++ b/testcases/commands/sssd/sssd-lib.sh
@@ -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
 }
 
-- 
1.8.3.1




^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [LTP] [PATCH] sssd/sssd-lib.sh: fix the permission of sssd.conf
  2015-11-26 16:16 [LTP] [PATCH] sssd/sssd-lib.sh: fix the permission of sssd.conf Xiao Yang
@ 2016-01-28 15:02 ` Cyril Hrubis
  0 siblings, 0 replies; 2+ messages in thread
From: Cyril Hrubis @ 2016-01-28 15:02 UTC (permalink / raw)
  To: ltp

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

Pushed, thanks.

-- 
Cyril Hrubis
chrubis@suse.cz

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-01-28 15:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-26 16:16 [LTP] [PATCH] sssd/sssd-lib.sh: fix the permission of sssd.conf Xiao Yang
2016-01-28 15:02 ` Cyril Hrubis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox