[Evolvis-commits] r277: More testing and some adds for ldap support↵

mirabilos at evolvis.org mirabilos at evolvis.org
Thu Feb 25 14:13:51 CET 2010


Author: mirabilos
Date: 2010-02-25 13:13:50 +0000 (Thu, 25 Feb 2010)
New Revision: 277

Modified:
   trunk/gforge_base/evolvisforge/
   trunk/gforge_base/evolvisforge/gforge/deb-specific/install-ldap.sh
   trunk/gforge_base/evolvisforge/gforge/debian/changelog
   trunk/gforge_base/evolvisforge/gforge/utils/sql2ldif.pl
Log:
More testing and some adds for ldap support



Property changes on: trunk/gforge_base/evolvisforge
___________________________________________________________________
Name: bzr:revision-info
   - timestamp: 2001-09-04 23:08:20.000000000 +0000
committer: cbayle

   + timestamp: 2001-09-04 23:09:34.000000000 +0000
committer: cbayle

Name: bzr:file-ids
   - gforge/deb-specific/local.inc.template	7 at 9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk%2Fgforge%2Fdeb-specific%2Flocal.inc.template
gforge/debian/sourceforge.postinst	7 at 9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk%2Fgforge%2Fdebian%2Fsourceforge.postinst

   + gforge/deb-specific/install-ldap.sh	7 at 9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk%2Fgforge%2Fdeb-specific%2Finstall-ldap.sh
gforge/debian/changelog	7 at 9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk%2Fgforge%2Fdebian%2Fchangelog
gforge/utils/sql2ldif.pl	2 at 9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk%2Fgforge%2Futils%2Fsql2ldif.pl

Name: bzr:revision-id:v4
   - 1 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:1
2 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:2
3 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:7
4 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:9
5 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:10
6 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:11
7 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:12
8 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:13
9 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:14
10 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:15
11 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:16
12 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:17
13 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:18
14 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:19
15 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:20
16 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:21
17 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:22
18 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:23
19 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:24
20 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:25
21 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:26
22 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:27
23 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:28
24 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:29
25 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:30
26 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:31
27 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:32
28 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:33
29 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:34
30 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:35
31 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:36
32 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:37
33 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:38
34 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:39
35 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:40
36 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:41
37 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:42
38 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:43
39 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:44
40 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:45
41 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:46
42 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:47

   + 1 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:1
2 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:2
3 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:7
4 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:9
5 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:10
6 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:11
7 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:12
8 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:13
9 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:14
10 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:15
11 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:16
12 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:17
13 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:18
14 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:19
15 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:20
16 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:21
17 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:22
18 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:23
19 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:24
20 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:25
21 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:26
22 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:27
23 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:28
24 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:29
25 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:30
26 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:31
27 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:32
28 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:33
29 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:34
30 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:35
31 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:36
32 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:37
33 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:38
34 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:39
35 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:40
36 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:41
37 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:42
38 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:43
39 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:44
40 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:45
41 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:46
42 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:47
43 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:48

Name: bzr:text-parents
   - gforge/deb-specific/local.inc.template	svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:7
gforge/debian/sourceforge.postinst	svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:13

   + gforge/deb-specific/install-ldap.sh	svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:7
gforge/debian/changelog	svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:46
gforge/utils/sql2ldif.pl	svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:7


Modified: trunk/gforge_base/evolvisforge/gforge/deb-specific/install-ldap.sh
===================================================================
--- trunk/gforge_base/evolvisforge/gforge/deb-specific/install-ldap.sh	2010-02-25 13:13:48 UTC (rev 276)
+++ trunk/gforge_base/evolvisforge/gforge/deb-specific/install-ldap.sh	2010-02-25 13:13:50 UTC (rev 277)
@@ -33,9 +33,9 @@
 	perl -pi -e "s/^#SF#.*\n//g" /etc/libnss-ldap.conf
 }
 
-# Modify /etc/lapd/slapd.conf
+# Modify /etc/ldap/slapd.conf
 modify_slapd(){
-
+	dn=$1
 	# Maybe should comment referral line too
 	echo "WARNING: Please check referal line in /etc/ldap/slapd.conf"
 	
@@ -61,6 +61,16 @@
 		done
 		cat /etc/ldap/slapd.conf >>/etc/ldap/slapd.conf.sourceforge
 		mv /etc/ldap/slapd.conf.sourceforge /etc/ldap/slapd.conf
+
+		# Then write access for SF_robot
+		perl -pi -e "s/access to \*/# Next lines added by Sourceforge install
+access to dn=\".*,ou=People,$dn\"		
+	by dn=\"cn=admin,ou=People,$dn\" write	
+	by dn=\"cn=SF_robot,$dn\" write		
+	by * read				
+# End of sourceforge add
+access to */" /etc/ldap/slapd.conf
+
 		/etc/init.d/slapd restart
 	fi	
 }
@@ -69,6 +79,16 @@
 purge_slapd(){
 	perl -pi -e "s/^.*#Added by Sourceforge install\n//" /etc/ldap/slapd.conf
 	perl -pi -e "s/#Comment by Sourceforge install#//" /etc/ldap/slapd.conf
+	ex /etc/ldap/slapd.conf <<-FIN
+/# Next lines added by Sourceforge install
+:ma a
+/# End of sourceforge add
+:ma b
+:'a,'bd
+:w
+:x
+FIN
+
 }
 
 # Modify /etc/nsswitch.conf
@@ -178,7 +198,7 @@
 				[ -f /etc/ldap.secret ] || secret=""
 
 				echo "Modifying /etc/ldap/slapd.conf"
-				modify_slapd
+				modify_slapd $dn
 				echo "Modifying /etc/libnss-ldap.conf"
 				modify_libnss_ldap $dn
 				echo "Modifying /etc/nsswitch.conf"
@@ -229,7 +249,24 @@
 				/etc/init.d/slapd restart
 				$0 default
 				;;
-				
+			test)	
+				naming_context=$(ldapsearch -x -b '' -s base '(objectclass=*)' namingContexts | grep "namingContexts:" | cut -d" " -f2)
+				[ -f /etc/ldap.secret ] && secret=$(cat /etc/ldap.secret) && cryptedpasswd=`slappasswd -s $secret -h {CRYPT}`
+				ldapmodify -v -c -D "cn=admin,ou=People,$naming_context" -x -w$secret <<-FIN
+dn: cn=SF_robot,$naming_context
+changetype: modify
+replace: userPassword
+userPassword: $cryptedpasswd
+-
+FIN
+				ldapmodify -v -c -D "cn=SF_robot,$naming_context" -x -w$secret <<-FIN
+dn: uid=dummy,ou=People,$naming_context
+changetype: modify
+replace: cn
+cn: toto Dummy User
+-
+FIN
+				;;
 		esac
 	fi
 fi
@@ -266,3 +303,12 @@
 ##echo "============ Checking the database =========="
 ##ldapsearch -x -b "$naming_context" '(objectclass=*)'
 
+##Un ACL exemple pour la partie web
+#access to dn=".*,ou=People,dc=dragoninc,dc=on,dc=ca" 
+#attr=userpassword,ntpassword,lmpassword 
+#        by dn="uid=root,ou=People,dc=dragoninc,dc=on,dc=ca" write 
+#        by * none 
+#
+#access to dn=".*,ou=Group,dc=dragoninc,dc=on,dc=ca" attr=userpassword 
+#        by dn="uid=root,ou=People,dc=dragoninc,dc=on,dc=ca" write 
+#        by * none

Modified: trunk/gforge_base/evolvisforge/gforge/debian/changelog
===================================================================
--- trunk/gforge_base/evolvisforge/gforge/debian/changelog	2010-02-25 13:13:48 UTC (rev 276)
+++ trunk/gforge_base/evolvisforge/gforge/debian/changelog	2010-02-25 13:13:50 UTC (rev 277)
@@ -1,3 +1,10 @@
+sourceforge (2.5-10+9) unstable; urgency=low
+
+  * Added SF_robot and Replicator entry in sql2ldif script
+  * Made ldap_add_password template var work 
+
+ -- Christian Bayle <bayle at aist.enst.fr>  Wed,  5 Sep 2001 00:53:29 +0200
+
 sourceforge (2.5-10+8) unstable; urgency=low
 
   * Fixed /etc/aliases entry for sourceforge user.  Really, this time.

Modified: trunk/gforge_base/evolvisforge/gforge/utils/sql2ldif.pl
===================================================================
--- trunk/gforge_base/evolvisforge/gforge/utils/sql2ldif.pl	2010-02-25 13:13:48 UTC (rev 276)
+++ trunk/gforge_base/evolvisforge/gforge/utils/sql2ldif.pl	2010-02-25 13:13:50 UTC (rev 277)
@@ -206,6 +206,22 @@
 objectClass: domainRelatedObject
 associatedDomain: $sys_default_domain
 
+dn: cn=Replicator,$sys_ldap_base_dn
+cn: Replicator
+sn: Replicator the Robot
+description: empty
+objectClass: top
+objectClass: person
+userPassword: {crypt}x
+
+dn: cn=SF_robot,$sys_ldap_base_dn
+cn: SF_robot
+sn: SF the Robot
+description: empty
+objectClass: top
+objectClass: person
+userPassword: {crypt}x
+
 dn: uid=dummy,ou=People,$sys_ldap_base_dn
 uid: dummy
 cn: Dummy User




More information about the evolvis-commits mailing list