Bug 16966 - Löschen einer Richtlinie entfernt Referenz an Benutzerobjekt nicht
Löschen einer Richtlinie entfernt Referenz an Benutzerobjekt nicht
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC - Policies
UCS 5.0
Other Linux
: P5 normal with 1 vote (vote)
: UCS 5.0-1-errata
Assigned To: Florian Best
Christian Castens
https://git.knut.univention.de/univen...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-12-14 14:01 CET by Sönke Schwardt-Krummrich
Modified: 2022-03-23 14:14 CET (History)
7 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 3: Simply Wrong: The implementation doesn't match the docu
Who will be affected by this bug?: 2: Will only affect a few installed domains
How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.069
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:
best: Patch_Available+


Attachments
patch (branch fbest/16966-remove-referencing-policy-entries) (1.36 KB, patch)
2017-10-18 15:30 CEST, Florian Best
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sönke Schwardt-Krummrich univentionstaff 2009-12-14 14:01:55 CET
Es wurde eine UDM-Ansicht-Policy im UDM gelöscht, die mit einem Benutzer verknüpft war. Nach dem Löschen war die Referenz weiterhin am Benutzerobjekt vorhanden.
Eine Fehlermeldung/Warnung ist im UDM nicht erschienen.
Comment 1 Sönke Schwardt-Krummrich univentionstaff 2009-12-14 14:05:19 CET
univention-policy-result und den WebUDM scheint dies nicht zu stören.
Comment 2 Jan Christoph Ebersbach univentionstaff 2011-03-11 11:44:33 CET
Das gleiche Verhalten habe ich an einem OU-Objekt beobachtet, an dem bereits eine UCR-Richtlinie verknüpft war und an das zusätzlich eine LDAP-Server-Richtlinie verknüpft wurde. Beim späteren Löschen der LDAP-Server-Richtlinie wurde diese nicht vom OU-Objekt entfernt.
Comment 3 Stefan Gohmann univentionstaff 2013-02-14 22:07:59 CET
Es gibt dadurch aber kein echtes Problem, oder?
Comment 4 Jan Christoph Ebersbach univentionstaff 2013-02-15 09:19:14 CET
Ich habe bisher keine Probleme feststellen können, es ist nur verwirrend, dass es so ist.
Comment 5 Philipp Hahn univentionstaff 2013-08-09 10:49:01 CEST
(In reply to Stefan Gohmann from comment #3)
> Es gibt dadurch aber kein echtes Problem, oder?

Legt man danach eine Policy mit gleichen Namen erneut an, ist diese dann auch automatisch wieder aktiviert!

Ticket#: 2013061221001009 UCS Training video
Comment 6 Florian Best univentionstaff 2017-10-18 15:30:13 CEST
Created attachment 9255 [details]
patch (branch fbest/16966-remove-referencing-policy-entries)

Nothing simpler than that. The patch removes all univentionPolicyReference which match the DN of the removed policy.

As all policies cannot be moved or renamed no action is required for these operations.
Comment 7 Valentin Heidelberger univentionstaff 2018-03-02 15:24:12 CET
Just encountered the problem in a 4.2 customer system.
UDM and univention-ldapsearch show the reference to a non-existing policy, UMC does not.
Please consider Florians patch
Comment 8 Florian Best univentionstaff 2022-02-09 09:56:18 CET
We can probably alternatively also solve this via the refint LDAP overlay module.
Comment 9 Florian Best univentionstaff 2022-03-10 12:24:00 CET
Policy references are now removed when removing a policy.

univention-directory-manager-modules.yaml
5d516cb8c501 | Bug #16966: Merge branch 'fbest/16966-remove-referencing-policy-entries' into 5.0-1
f329c34bdb7d | Bug #16966: remove referencing policy entries when removing policy

univention-directory-manager-modules (15.0.11-36)
5d516cb8c501 | Bug #16966: Merge branch 'fbest/16966-remove-referencing-policy-entries' into 5.0-1
f329c34bdb7d | Bug #16966: remove referencing policy entries when removing policy
Comment 10 Florian Best univentionstaff 2022-03-10 13:00:29 CET
# udm policies/pwhistory create --set name=pwhistory
WARNING: The object is not going to be created underneath of its default containers.
Object created: cn=pwhistory,dc=ucs,dc=intranet
# udm users/user create --set username=foo --set password=univention --set lastname=foo --policy-reference cn=pwhistory,dc=ucs,dc=intranet
WARNING: The object is not going to be created underneath of its default containers.
Object created: uid=foo,dc=ucs,dc=intranet
# univention-ldapsearch -LLLb uid=foo,dc=ucs,dc=intranet univentionPolicyReference
dn: uid=foo,dc=ucs,dc=intranet
univentionPolicyReference: cn=pwhistory,dc=ucs,dc=intranet

# udm policies/pwhistory remove --dn cn=pwhistory,dc=ucs,dc=intranet
Object removed: cn=pwhistory,dc=ucs,dc=intranet
# univention-ldapsearch -LLLb uid=foo,dc=ucs,dc=intranet univentionPolicyReference
dn: uid=foo,dc=ucs,dc=intranet
Comment 11 Christian Castens univentionstaff 2022-03-10 13:55:05 CET
Functionality tested:
- created policy
- attached policy to a container object
- deleted policy
- checked for policy entry on container object

OK

code review OK
yaml, changelog OK
log files OK