Univention Bugzilla – Attachment 7767 Details for
Bug 38110
UDM does not correctly check object existence when modifying objects
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
38110.patch (text/plain), 2.04 KB, created by
Florian Best
on 2016-06-27 11:24:50 CEST
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Florian Best
Created:
2016-06-27 11:24:50 CEST
Size:
2.04 KB
patch
obsolete
>diff --git b/management/univention-directory-manager-modules/modules/univention/admin/handlers/__init__.py a/management/univention-directory-manager-modules/modules/univention/admin/handlers/__init__.py >index 1a78df5..8169f85 100644 >--- b/management/univention-directory-manager-modules/modules/univention/admin/handlers/__init__.py >+++ a/management/univention-directory-manager-modules/modules/univention/admin/handlers/__init__.py >@@ -569,8 +569,7 @@ def __init__(self, co, lo, position, dn='', superordinate=None, attributes=None) > try: > self.oldattr = self.lo.get(self.dn, required=True) > except ldap.NO_SUCH_OBJECT: >- pass >-# raise univention.admin.uexceptions.noObject(self.dn) >+ raise univention.admin.uexceptions.noObject(self.dn) > > if self.oldattr: > self._exists = True >diff --git a/base/univention-system-setup/umc/python/setup/netconf/modules/LdapNetwork.py b/base/univention-system-setup/umc/python/setup/netconf/modules/LdapNetwork.py >index edb4e88..c5015f2 100644 >--- a/base/univention-system-setup/umc/python/setup/netconf/modules/LdapNetwork.py >+++ b/base/univention-system-setup/umc/python/setup/netconf/modules/LdapNetwork.py >@@ -3,7 +3,7 @@ > import univention.admin.objects > import univention.admin.uldap as uldap > import univention.admin.modules as modules >-from univention.admin.uexceptions import base as UniventionBaseException >+from univention.admin.uexceptions import base as UniventionBaseException, noObject > from ldap import LDAPError > > >@@ -66,8 +66,9 @@ def _remove_old_network(self): > network_dn = "cn=default,cn=networks,%(ldap/base)s" % self.changeset.ucr > network_module = modules.get("networks/network") > modules.init(self.ldap, self.position, network_module) >- network = univention.admin.objects.get(network_module, None, self.ldap, self.position, network_dn) >- if not network.exists(): >+ try: >+ network = univention.admin.objects.get(network_module, None, self.ldap, self.position, network_dn) >+ except noObject: > return > self.logger.info("Removing '%s'...", network_dn) > if not self.changeset.no_act:
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 38110
:
7662
| 7767