summaryrefslogtreecommitdiff
path: root/testprogs/ejs
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2007-07-07 04:34:36 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:59:09 -0500
commitb0db52b63aaf2278d72c5e0bafbbdb6582b85112 (patch)
treeb81ed754b3c0c701d514d573adfacf459b22b32f /testprogs/ejs
parent4f2fe8e947819f5178c2853c2a26ac9eff64f5ad (diff)
downloadsamba-b0db52b63aaf2278d72c5e0bafbbdb6582b85112.tar.gz
samba-b0db52b63aaf2278d72c5e0bafbbdb6582b85112.tar.bz2
samba-b0db52b63aaf2278d72c5e0bafbbdb6582b85112.zip
r23737: Validate that we object to duplicate values in an add or replace.
We can't ever allow duplicates, even if the client sends them Andrew Bartlett (This used to be commit 10277f27246b9e16ed36fb72eb4c318b43cb9395)
Diffstat (limited to 'testprogs/ejs')
-rwxr-xr-xtestprogs/ejs/ldap.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/testprogs/ejs/ldap.js b/testprogs/ejs/ldap.js
index 6cb7f2ce7f..72d8c9acf8 100755
--- a/testprogs/ejs/ldap.js
+++ b/testprogs/ejs/ldap.js
@@ -101,6 +101,21 @@ userAccountControl: 4096
}
}
+ ok = ldb.modify("
+dn: cn=ldaptest2computer,cn=computers," + base_dn + "
+changetype: modify
+replace: servicePrincipalName
+servicePrincipalName: host/ldaptest2computer
+servicePrincipalName: host/ldaptest2computer
+servicePrincipalName: cifs/ldaptest2computer
+");
+
+//LDB_ERR_ATTRIBUTE_OR_VALUE_EXISTS
+ if (ok.error != 20) {
+ println("Expected error LDB_ERR_ATTRIBUTE_OR_VALUE_EXISTS, got :" + ok.errstr);
+ assert(ok.error == 20);
+ }
+
ok = ldb.add("
dn: cn=ldaptestuser2,cn=users," + base_dn + "
objectClass: person