Univention Bugzilla – Bug 46020
Invalid values are simply ignored and don't raise an error
Last modified: 2020-06-22 11:13:13 CEST
When I create an object and give one invalid value for a multivalue property that invalid values is simply ignored and the command succeeds. root@master120:~# udm users/user create --position cn=users,dc=dev,dc=local --set username=zfspaej32b --set firstname=xxri1myaop --set lastname=hdunguux3i --append sambaPrivileges=SeMachineAccountPrivilege --append sambaPrivileges=foobar --set password=univention E: Invalid Syntax: sambaPrivileges: Object created: uid=zfspaej32b,cn=users,dc=dev,dc=local root@master120:~# echo $? 0 root@master120:~# univention-ldapsearch -b uid=zfspaej32b,cn=users,dc=dev,dc=local -LLL univentionSambaPrivilegeList dn: uid=zfspaej32b,cn=users,dc=dev,dc=local univentionSambaPrivilegeList: SeMachineAccountPrivilege I think it would be better to not create the object in that case or at least change the exit code?
If there is only one (invalid) value given the command fails: root@master120:~# udm users/user create --position cn=users,dc=dev,dc=local --set username=zfspaej32b --set firstname=xxri1myaop --set lastname=hdunguux3i --append sambaPrivileges=foobar --set password=univention E: Invalid Syntax: sambaPrivileges: root@master120:~# echo $? 3 If one valid value is part of the list, it ist just ignored.