[PC-BSD Commits] r18254 - in pcbsd/current/src-sh/pc-adctl: conf rc scripts

svn at pcbsd.org svn at pcbsd.org
Mon Aug 6 10:57:25 PDT 2012


Author: johnh
Date: 2012-08-06 17:57:25 +0000 (Mon, 06 Aug 2012)
New Revision: 18254

Added:
   pcbsd/current/src-sh/pc-adctl/conf/pc-activedirectory.conf
Removed:
   pcbsd/current/src-sh/pc-adctl/conf/pc-ad.conf
Modified:
   pcbsd/current/src-sh/pc-adctl/conf/Makefile
   pcbsd/current/src-sh/pc-adctl/rc/rc.activedirectory
   pcbsd/current/src-sh/pc-adctl/scripts/pc-ldap
   pcbsd/current/src-sh/pc-adctl/scripts/pc-samba
Log:
One more name change.



Modified: pcbsd/current/src-sh/pc-adctl/conf/Makefile
===================================================================
--- pcbsd/current/src-sh/pc-adctl/conf/Makefile	2012-08-06 17:55:15 UTC (rev 18253)
+++ pcbsd/current/src-sh/pc-adctl/conf/Makefile	2012-08-06 17:57:25 UTC (rev 18254)
@@ -1,4 +1,4 @@
-FILES=pc-ad.conf pc-ldap.conf
+FILES=pc-activedirectory.conf pc-ldap.conf
 
 FILESMODE=0444
 FILESDIR=/usr/local/etc/

Modified: pcbsd/current/src-sh/pc-adctl/rc/rc.activedirectory
===================================================================
--- pcbsd/current/src-sh/pc-adctl/rc/rc.activedirectory	2012-08-06 17:55:15 UTC (rev 18253)
+++ pcbsd/current/src-sh/pc-adctl/rc/rc.activedirectory	2012-08-06 17:57:25 UTC (rev 18254)
@@ -29,7 +29,7 @@
 #
 #	Active Directory config
 #
-: ${AD_CONF:="/usr/local/etc/pc-ad.conf"}
+: ${AD_CONF:="/usr/local/etc/pc-activedirectory.conf"}
 
 
 #

Modified: pcbsd/current/src-sh/pc-adctl/scripts/pc-ldap
===================================================================
--- pcbsd/current/src-sh/pc-adctl/scripts/pc-ldap	2012-08-06 17:55:15 UTC (rev 18253)
+++ pcbsd/current/src-sh/pc-adctl/scripts/pc-ldap	2012-08-06 17:57:25 UTC (rev 18254)
@@ -3,7 +3,7 @@
 # $FreeBSD$
 #
 
-# PROVIDE: ix-ldap
+# PROVIDE: pc-ldap
 # REQUIRE: root
 # BEFORE: NETWORK
 
@@ -11,9 +11,13 @@
     
 : ${NSS_LDAP_CONF:="/usr/local/etc/nss_ldap.conf"}
 : ${NSS_LDAP_SECRET:="/usr/local/etc/nss_ldap.secret"}
-: ${LDAP_CONF:="/usr/local/etc/openldap/ldap.conf"}
+: ${OPENLDAP_CONF:="/usr/local/etc/openldap/ldap.conf"}
+
 : ${CERT_FILE:="/usr/local/etc/certs/cacert.crt"}
 
+: ${LDAPCONF:="/usr/local/bin/ldapconf"}
+: ${NSSLDAPCONF:="/usr/local/bin/nssldapconf"}
+
 save_certificate()
 {
 	local ldap_id="${1}"
@@ -277,15 +281,28 @@
 	fi
 }
 
-expire_cache()
+ldap_start()
 {
-        /usr/local/www/freenasUI/tools/cachetool.py expire
+	if checkyesno ldapclient_enable 2>/dev/null
+	then
+		generate_openldap_conf
+		generate_nss_ldap_conf
+	fi
 }
 
-name="ix-ldap"
-start_cmd='generate_ldap_config'
+ldap_stop()
+{
+	if  checkyesno ldapclient_enable 2>/dev/null
+	then
+		:
+	fi
+}
+
+
+name="pc-ldap"
+start_cmd='ldap_start'
 status_cmd='ldap_status'
-stop_cmd='expire_cache'
+stop_cmd='ldap_stop'
             
 load_rc_config $name
 run_rc_command "$1"

Modified: pcbsd/current/src-sh/pc-adctl/scripts/pc-samba
===================================================================
--- pcbsd/current/src-sh/pc-adctl/scripts/pc-samba	2012-08-06 17:55:15 UTC (rev 18253)
+++ pcbsd/current/src-sh/pc-adctl/scripts/pc-samba	2012-08-06 17:57:25 UTC (rev 18254)
@@ -21,6 +21,12 @@
 		local tmp=$(mktemp /tmp/samba.XXXXXX)
 
 		AD_init
+		local td=$(AD_get ad_allow_trusted_doms)
+		if [ -z "${td}" ]
+		then
+			td="no"
+		fi
+
 		cp "${SMB_CONF}" "${SMB_CONF}.orig"
 		${SAMBACONF} -f ${SMB_CONF} \
 			-w -m "+global:security=ADS" \
@@ -49,7 +55,7 @@
 			-w -m "+global:winbind nested groups=yes" \
 			-w -m "+global:winbind use default domain=yes" \
 			-w -m "+global:winbind refresh tickets=yes" \
-			-w -m "+global:allow trusted domains=yes" \
+			-w -m "+global:allow trusted domains=${td}" \
 			-w -m "+global:template shell=/bin/sh" \
 			-w -m "+global: template homedir=/home/%U" \
 			-o "${tmp}"



More information about the Commits mailing list