View | Details | Raw Unified | Return to bug 38094
Collapse All | Expand All

(-)a/branches/ucs-4.0/ucs-4.0-2/base/univention-server/check_connection (-1 / +1 lines)
 Lines 5-11    Link Here 
5
#  connection fails 'ldap' is removed from the list of possible
5
#  connection fails 'ldap' is removed from the list of possible
6
#  authentication methods
6
#  authentication methods
7
#
7
#
8
# Copyright 2004-2014 Univention GmbH
8
# Copyright 2004-2015 Univention GmbH
9
#
9
#
10
# http://www.univention.de/
10
# http://www.univention.de/
11
#
11
#
(-)a/branches/ucs-4.0/ucs-4.0-2/base/univention-server/debian/copyright (-1 / +1 lines)
 Lines 1-4    Link Here 
1
Copyright 2003-2014 Univention GmbH
1
Copyright 2003-2015 Univention GmbH
2
2
3
http://www.univention.de/
3
http://www.univention.de/
4
4
(-)a/branches/ucs-4.0/ucs-4.0-2/base/univention-server/debian/rules (-1 / +1 lines)
 Lines 3-9    Link Here 
3
# Univention Server
3
# Univention Server
4
#  rules file for the debian package
4
#  rules file for the debian package
5
#
5
#
6
# Copyright 2003-2014 Univention GmbH
6
# Copyright 2003-2015 Univention GmbH
7
#
7
#
8
# http://www.univention.de/
8
# http://www.univention.de/
9
#
9
#
(-)a/branches/ucs-4.0/ucs-4.0-2/base/univention-server/debian/univention-role-server-common.postinst (-1 / +1 lines)
 Lines 3-9    Link Here 
3
# Univention Server Common
3
# Univention Server Common
4
#  postinst script for the Debian package
4
#  postinst script for the Debian package
5
#
5
#
6
# Copyright 2014 Univention GmbH
6
# Copyright 2014-2015 Univention GmbH
7
#
7
#
8
# http://www.univention.de/
8
# http://www.univention.de/
9
#
9
#
(-)a/branches/ucs-4.0/ucs-4.0-2/base/univention-server/debian/univention-server-backup.postinst (-1 / +1 lines)
 Lines 3-9    Link Here 
3
# Univention Server Backup
3
# Univention Server Backup
4
#  postinst script for the debian package
4
#  postinst script for the debian package
5
#
5
#
6
# Copyright 2003-2014 Univention GmbH
6
# Copyright 2003-2015 Univention GmbH
7
#
7
#
8
# http://www.univention.de/
8
# http://www.univention.de/
9
#
9
#
(-)a/branches/ucs-4.0/ucs-4.0-2/base/univention-server/debian/univention-server-master.postinst (-1 / +1 lines)
 Lines 3-9    Link Here 
3
# Univention Server Master
3
# Univention Server Master
4
#  postinst script for the debian package
4
#  postinst script for the debian package
5
#
5
#
6
# Copyright 2003-2014 Univention GmbH
6
# Copyright 2003-2015 Univention GmbH
7
#
7
#
8
# http://www.univention.de/
8
# http://www.univention.de/
9
#
9
#
(-)a/branches/ucs-4.0/ucs-4.0-2/base/univention-server/debian/univention-server-master.preinst (-1 / +1 lines)
 Lines 3-9    Link Here 
3
# Univention Server Master
3
# Univention Server Master
4
#  preinst script for the debian package
4
#  preinst script for the debian package
5
#
5
#
6
# Copyright 2003-2014 Univention GmbH
6
# Copyright 2003-2015 Univention GmbH
7
#
7
#
8
# http://www.univention.de/
8
# http://www.univention.de/
9
#
9
#
(-)a/branches/ucs-4.0/ucs-4.0-2/base/univention-server/debian/univention-server-member.postinst (-1 / +1 lines)
 Lines 3-9    Link Here 
3
# Univention Server Memberserver
3
# Univention Server Memberserver
4
#  postinst script for the debian package
4
#  postinst script for the debian package
5
#
5
#
6
# Copyright 2003-2014 Univention GmbH
6
# Copyright 2003-2015 Univention GmbH
7
#
7
#
8
# http://www.univention.de/
8
# http://www.univention.de/
9
#
9
#
(-)a/branches/ucs-4.0/ucs-4.0-2/base/univention-server/debian/univention-server-slave.postinst (-1 / +1 lines)
 Lines 3-9    Link Here 
3
# Univention Server Slave
3
# Univention Server Slave
4
#  postinst script for the debian package
4
#  postinst script for the debian package
5
#
5
#
6
# Copyright 2003-2014 Univention GmbH
6
# Copyright 2003-2015 Univention GmbH
7
#
7
#
8
# http://www.univention.de/
8
# http://www.univention.de/
9
#
9
#
(-)a/branches/ucs-4.0/ucs-4.0-2/base/univention-server/server_password_change (-1 / +1 lines)
 Lines 3-9    Link Here 
3
# Univention Server
3
# Univention Server
4
#  helper script: creates new machine password
4
#  helper script: creates new machine password
5
#
5
#
6
# Copyright 2004-2014 Univention GmbH
6
# Copyright 2004-2015 Univention GmbH
7
#
7
#
8
# http://www.univention.de/
8
# http://www.univention.de/
9
#
9
#
(-)a/branches/ucs-4.0/ucs-4.0-2/base/univention-server/univention-directory-policy/univention-set-ldap-server (-1 / +1 lines)
 Lines 4-10    Link Here 
4
# Univention Server Memberserver
4
# Univention Server Memberserver
5
#  sets LDAP server according to policy
5
#  sets LDAP server according to policy
6
#
6
#
7
# Copyright 2003-2014 Univention GmbH
7
# Copyright 2003-2015 Univention GmbH
8
#
8
#
9
# http://www.univention.de/
9
# http://www.univention.de/
10
#
10
#
(-)a/branches/ucs-4.0/ucs-4.0-2/base/univention-server/univention-ldap-server-available (-3 / +1 lines)
 Lines 3-9    Link Here 
3
# Univention System Role Package
3
# Univention System Role Package
4
#  helper script: checks the connection to the LDAP server.
4
#  helper script: checks the connection to the LDAP server.
5
#
5
#
6
# Copyright 2010-2014 Univention GmbH
6
# Copyright 2010-2015 Univention GmbH
7
#
7
#
8
# http://www.univention.de/
8
# http://www.univention.de/
9
#
9
#
10
- 
11
layer
10
layer
12
--
13
.../base/univention-server/debian/changelog        |  6 +++++
11
.../base/univention-server/debian/changelog        |  6 +++++
14
.../univention-set-ldap-server                     | 28 ++++++++++++----------
12
.../univention-set-ldap-server                     | 28 ++++++++++++----------
15
2 files changed, 22 insertions(+), 12 deletions(-)
13
2 files changed, 22 insertions(+), 12 deletions(-)
(-)a/branches/ucs-4.0/ucs-4.0-2/base/univention-server/debian/changelog (+6 lines)
 Lines 1-3    Link Here 
1
univention-server (10.0.3-2) unstable; urgency=low
2
3
  * Bug #38094: Move ldap/server/additional into LDAP layer
4
5
 -- Philipp Hahn <hahn@univention.de>  Mon, 18 May 2015 11:18:25 +0200
6
1
univention-server (10.0.3-1) unstable; urgency=medium
7
univention-server (10.0.3-1) unstable; urgency=medium
2
8
3
  * Removed lock_expired_passwords lock_expired_accounts cron job
9
  * Removed lock_expired_passwords lock_expired_accounts cron job
(-)a/branches/ucs-4.0/ucs-4.0-2/base/univention-server/univention-directory-policy/univention-set-ldap-server (-13 / +16 lines)
 Lines 31-40    Link Here 
31
# /usr/share/common-licenses/AGPL-3; if not, see
31
# /usr/share/common-licenses/AGPL-3; if not, see
32
# <http://www.gnu.org/licenses/>.
32
# <http://www.gnu.org/licenses/>.
33
33
34
import sys, string, subprocess
34
import sys
35
import univention.config_registry
35
import subprocess
36
from univention.config_registry import ConfigRegistry
37
from univention.config_registry.frontend import ucr_update
36
38
37
configRegistry = univention.config_registry.ConfigRegistry()
39
configRegistry = ConfigRegistry(write_registry=ConfigRegistry.LDAP)
38
configRegistry.load()
40
configRegistry.load()
39
41
40
found=0
42
found=0
 Lines 53-76   if ldap_hostdn: Link Here 
53
				if p1.returncode != 0:
55
				if p1.returncode != 0:
54
					continue
56
					continue
55
57
58
				updates = {}
56
				for line in result.split('\n'):
59
				for line in result.split('\n'):
57
					line=line.strip(' ').strip('\n')
60
					line=line.strip(' ').strip('\n')
58
					if line.startswith('univentionLDAPServer='):
61
					if line.startswith('univentionLDAPServer='):
59
						new_ldap_server=line.replace('univentionLDAPServer=', '').replace('"','')
62
						new_ldap_server=line.replace('univentionLDAPServer=', '').replace('"','')
60
						if not found:
63
						if not found:
61
							ldap_server_name = configRegistry.get('ldap/server/name')
64
							ldap_server_name = configRegistry.get('ldap/server/name')
62
							if not ldap_server_name:
65
							if not ldap_server_name or new_ldap_server != ldap_server_name:
63
								out=univention.config_registry.handler_set(['ldap/server/name=%s' % new_ldap_server])
66
								updates['ldap/server/name'] = new_ldap_server
64
							elif  not new_ldap_server == ldap_server_name:
65
								out=univention.config_registry.handler_set(['ldap/server/name=%s' % new_ldap_server])
66
							found=1
67
							found=1
67
						else:
68
						else:
68
							addition.append(new_ldap_server)
69
							addition.append(new_ldap_server)
69
				if addition:
70
70
					out=univention.config_registry.handler_set(['ldap/server/addition=%s' % string.join(addition,' ')])
71
				old = configRegistry.get('ldap/server/addition', '')
71
				else:
72
				new = ' '.join(addition)
72
					if configRegistry.get( 'ldap/server/addition' ):
73
				if new != old:
73
						out=univention.config_registry.handler_unset(['ldap/server/addition'])
74
					updates['ldap/server/addition'] = new
75
76
				if updates:
77
					ucr_update(configRegistry, updates)
74
78
75
				sys.exit(0)
79
				sys.exit(0)
76
80
77
- 

Return to bug 38094