[PC-BSD Commits] r19337 - pcbsd/current/src-sh/pc-adctl/scripts

svn at pcbsd.org svn at pcbsd.org
Tue Sep 18 19:29:12 PDT 2012


Author: johnh
Date: 2012-09-19 02:29:12 +0000 (Wed, 19 Sep 2012)
New Revision: 19337

Modified:
   pcbsd/current/src-sh/pc-adctl/scripts/pc-samba
Log:
chmod smb.conf to something reasonable.



Modified: pcbsd/current/src-sh/pc-adctl/scripts/pc-samba
===================================================================
--- pcbsd/current/src-sh/pc-adctl/scripts/pc-samba	2012-09-18 23:24:54 UTC (rev 19336)
+++ pcbsd/current/src-sh/pc-adctl/scripts/pc-samba	2012-09-19 02:29:12 UTC (rev 19337)
@@ -85,8 +85,12 @@
 		eval "${cmdstr}"
 		if [ "$?" = "0" -a -s "${tmp}" ]
 		then
+			local res=0
 			mv "${tmp}" "${SMB_CONF}"
-			return $?
+			res=$?
+
+			chmod 644 "${SMB_CONF}"
+			return ${res}
 		fi
 
 		return 1
@@ -135,10 +139,14 @@
 
 		if [ "$?" = "0" -a -s "${tmp}" ]
 		then
+			local res=0
 			local rootbindpw=$(ldap_get rootbindpw)
 
 			mv "${tmp}" "${SMB_CONF}"
-			if [ "$?" != "0" ]
+			res=$?
+
+			chmod 644 "${SMB_CONF}"
+			if [ "${res}" != "0" ]
 			then
 				return 1
 			fi



More information about the Commits mailing list