summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/tests
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/ldb/tests')
-rw-r--r--source4/lib/ldb/tests/samba3.ldif41
-rwxr-xr-xsource4/lib/ldb/tests/test-samba3sam.sh17
2 files changed, 37 insertions, 21 deletions
diff --git a/source4/lib/ldb/tests/samba3.ldif b/source4/lib/ldb/tests/samba3.ldif
index 02103b65b6..035eb1c516 100644
--- a/source4/lib/ldb/tests/samba3.ldif
+++ b/source4/lib/ldb/tests/samba3.ldif
@@ -1,4 +1,12 @@
-dn: uid=nobody,ou=Users,dc=test,dc=vernstok,dc=nl
+dn: ou=Users,ou=Tests,dc=vernstok,dc=nl
+objectClass: organizationalUnit
+ou: Users
+
+dn: ou=Groups,ou=Tests,dc=vernstok,dc=nl
+objectClass: organizationalUnit
+ou: Groups
+
+dn: uid=nobody,ou=Users,ou=Tests,dc=vernstok,dc=nl
cn: nobody
sn: nobody
objectClass: inetOrgPerson
@@ -25,7 +33,7 @@ sambaAcctFlags: [NU ]
sambaSID: S-1-5-21-4231626423-2410014848-2360679739-2998
loginShell: /bin/false
-dn: cn=Domain Admins,ou=Groups,dc=test,dc=vernstok,dc=nl
+dn: cn=Domain Admins,ou=Groups,ou=Tests,dc=vernstok,dc=nl
objectClass: posixGroup
objectClass: sambaGroupMapping
gidNumber: 512
@@ -36,7 +44,7 @@ sambaSID: S-1-5-21-4231626423-2410014848-2360679739-512
sambaGroupType: 2
displayName: Domain Admins
-dn: cn=Domain Users,ou=Groups,dc=test,dc=vernstok,dc=nl
+dn: cn=Domain Users,ou=Groups,ou=Tests,dc=vernstok,dc=nl
objectClass: posixGroup
objectClass: sambaGroupMapping
gidNumber: 513
@@ -46,7 +54,7 @@ sambaSID: S-1-5-21-4231626423-2410014848-2360679739-513
sambaGroupType: 2
displayName: Domain Users
-dn: cn=Domain Guests,ou=Groups,dc=test,dc=vernstok,dc=nl
+dn: cn=Domain Guests,ou=Groups,ou=Tests,dc=vernstok,dc=nl
objectClass: posixGroup
objectClass: sambaGroupMapping
gidNumber: 514
@@ -56,7 +64,7 @@ sambaSID: S-1-5-21-4231626423-2410014848-2360679739-514
sambaGroupType: 2
displayName: Domain Guests
-dn: cn=Print Operators,ou=Groups,dc=test,dc=vernstok,dc=nl
+dn: cn=Print Operators,ou=Groups,ou=Tests,dc=vernstok,dc=nl
objectClass: posixGroup
objectClass: sambaGroupMapping
gidNumber: 550
@@ -66,7 +74,7 @@ sambaSID: S-1-5-21-4231626423-2410014848-2360679739-550
sambaGroupType: 2
displayName: Print Operators
-dn: cn=Backup Operators,ou=Groups,dc=test,dc=vernstok,dc=nl
+dn: cn=Backup Operators,ou=Groups,ou=Tests,dc=vernstok,dc=nl
objectClass: posixGroup
objectClass: sambaGroupMapping
gidNumber: 551
@@ -76,7 +84,7 @@ sambaSID: S-1-5-21-4231626423-2410014848-2360679739-551
sambaGroupType: 2
displayName: Backup Operators
-dn: cn=Replicator,ou=Groups,dc=test,dc=vernstok,dc=nl
+dn: cn=Replicator,ou=Groups,ou=Tests,dc=vernstok,dc=nl
objectClass: posixGroup
objectClass: sambaGroupMapping
gidNumber: 552
@@ -86,7 +94,7 @@ sambaSID: S-1-5-21-4231626423-2410014848-2360679739-552
sambaGroupType: 2
displayName: Replicator
-dn: cn=Domain Computers,ou=Groups,dc=test,dc=vernstok,dc=nl
+dn: cn=Domain Computers,ou=Groups,ou=Tests,dc=vernstok,dc=nl
objectClass: posixGroup
objectClass: sambaGroupMapping
gidNumber: 553
@@ -96,7 +104,7 @@ sambaSID: S-1-5-21-4231626423-2410014848-2360679739-553
sambaGroupType: 2
displayName: Domain Computers
-dn: cn=Administrators,ou=Groups,dc=test,dc=vernstok,dc=nl
+dn: cn=Administrators,ou=Groups,ou=Tests,dc=vernstok,dc=nl
objectClass: posixGroup
objectClass: sambaGroupMapping
gidNumber: 544
@@ -106,7 +114,7 @@ sambaSID: S-1-5-21-4231626423-2410014848-2360679739-544
sambaGroupType: 2
displayName: Administrators
-dn: cn=Users,ou=Groups,dc=test,dc=vernstok,dc=nl
+dn: cn=Users,ou=Groups,ou=Tests,dc=vernstok,dc=nl
objectClass: posixGroup
objectClass: sambaGroupMapping
gidNumber: 545
@@ -116,7 +124,7 @@ sambaSID: S-1-5-21-4231626423-2410014848-2360679739-545
sambaGroupType: 2
displayName: users
-dn: cn=Guests,ou=Groups,dc=test,dc=vernstok,dc=nl
+dn: cn=Guests,ou=Groups,ou=Tests,dc=vernstok,dc=nl
objectClass: posixGroup
objectClass: sambaGroupMapping
gidNumber: 546
@@ -127,7 +135,7 @@ sambaSID: S-1-5-21-4231626423-2410014848-2360679739-546
sambaGroupType: 2
displayName: Guests
-dn: cn=Power Users,ou=Groups,dc=test,dc=vernstok,dc=nl
+dn: cn=Power Users,ou=Groups,ou=Tests,dc=vernstok,dc=nl
objectClass: posixGroup
objectClass: sambaGroupMapping
gidNumber: 547
@@ -137,7 +145,7 @@ sambaSID: S-1-5-21-4231626423-2410014848-2360679739-547
sambaGroupType: 2
displayName: Power Users
-dn: cn=Account Operators,ou=Groups,dc=test,dc=vernstok,dc=nl
+dn: cn=Account Operators,ou=Groups,ou=Tests,dc=vernstok,dc=nl
objectClass: posixGroup
objectClass: sambaGroupMapping
gidNumber: 548
@@ -147,7 +155,7 @@ sambaSID: S-1-5-21-4231626423-2410014848-2360679739-548
sambaGroupType: 2
displayName: Account Operators
-dn: cn=Server Operators,ou=Groups,dc=test,dc=vernstok,dc=nl
+dn: cn=Server Operators,ou=Groups,ou=Tests,dc=vernstok,dc=nl
objectClass: posixGroup
objectClass: sambaGroupMapping
gidNumber: 549
@@ -157,10 +165,11 @@ sambaSID: S-1-5-21-4231626423-2410014848-2360679739-549
sambaGroupType: 2
displayName: Server Operators
-dn: ou=Computers,dc=test,dc=vernstok,dc=nl
+dn: ou=Computers,ou=Tests,dc=vernstok,dc=nl
objectClass: organizationalUnit
ou: Computers
-dn: uid=Administrator,ou=Users,dc=test,dc=vernstok,dc=nl
+
+dn: uid=Administrator,ou=Users,ou=Tests,dc=vernstok,dc=nl
cn: Administrator
sn: Administrator
objectClass: inetOrgPerson
diff --git a/source4/lib/ldb/tests/test-samba3sam.sh b/source4/lib/ldb/tests/test-samba3sam.sh
index 995a513d54..5baf0bf77a 100755
--- a/source4/lib/ldb/tests/test-samba3sam.sh
+++ b/source4/lib/ldb/tests/test-samba3sam.sh
@@ -1,17 +1,24 @@
#!/bin/sh
-rm -f samba3.ldb samba4.ldb
+S3URL=$1
-echo "Adding samba3 LDIF..."
-$VALGRIND ldbadd -H tdb://samba3.ldb < samba3.ldif || exit 1
+if [ -z "$S3URL" ];
+then
+ rm -f samba3.ldb
+ S3URL="tdb://samba3.ldb"
+ echo "Adding samba3 LDIF..."
+ $VALGRIND ldbadd -H tdb://samba3.ldb < samba3.ldif || exit 1
+fi
-echo "Adding samba4 LDIF..."
+rm -f samba4.ldb
+
+echo "Initial samba4 LDIF..."
$VALGRIND ldbadd -H tdb://samba4.ldb <<EOF
dn: @MODULES
@LIST: samba3sam
dn: @MAP=samba3sam
-@MAP_URL: tdb://samba3.ldb
+@MAP_URL: $S3URL
EOF