summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/tests
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2005-08-27 15:13:15 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:34:41 -0500
commit7e3838dd2d8647e9c621a08c61a2a22ef1d94bb2 (patch)
tree221d336d855546df8be8ececffb2e4aea013131c /source4/lib/ldb/tests
parente3dcc92deef81972a6f38bdbab75256d3d038357 (diff)
downloadsamba-7e3838dd2d8647e9c621a08c61a2a22ef1d94bb2.tar.gz
samba-7e3838dd2d8647e9c621a08c61a2a22ef1d94bb2.tar.bz2
samba-7e3838dd2d8647e9c621a08c61a2a22ef1d94bb2.zip
r9685: Add tests for samba3sam mapping module
Fix a couple of bugs Move samba3sam backend to lib/ldb/ Remove some more unused parameters (This used to be commit 7f864d446d6af7cfd9fb8dbc496a29b36ec57ce9)
Diffstat (limited to 'source4/lib/ldb/tests')
-rw-r--r--source4/lib/ldb/tests/samba3.ldif203
-rwxr-xr-xsource4/lib/ldb/tests/test-samba3sam.sh8
2 files changed, 211 insertions, 0 deletions
diff --git a/source4/lib/ldb/tests/samba3.ldif b/source4/lib/ldb/tests/samba3.ldif
new file mode 100644
index 0000000000..fb0a1386d4
--- /dev/null
+++ b/source4/lib/ldb/tests/samba3.ldif
@@ -0,0 +1,203 @@
+dn: dc=idealx,dc=org
+objectClass: dcObject
+objectclass: organization
+o: idealx
+dc: idealx
+
+dn: ou=Users,dc=idealx,dc=org
+objectClass: organizationalUnit
+ou: Users
+
+dn: ou=Groups,dc=idealx,dc=org
+objectClass: organizationalUnit
+ou: Groups
+
+dn: ou=Computers,dc=idealx,dc=org
+objectClass: organizationalUnit
+ou: Computers
+dn: uid=Administrator,ou=Users,dc=idealx,dc=org
+cn: Administrator
+sn: Administrator
+objectClass: inetOrgPerson
+objectClass: sambaSAMAccount
+objectClass: posixAccount
+objectClass: shadowAccount
+gidNumber: 512
+uid: Administrator
+uidNumber: 0
+homeDirectory: /home/%U
+sambaPwdLastSet: 0
+sambaLogonTime: 0
+sambaLogoffTime: 2147483647
+sambaKickoffTime: 2147483647
+sambaPwdCanChange: 0
+sambaPwdMustChange: 2147483647
+sambaHomePath: \\PDC-SMB3\home\%U
+sambaHomeDrive: H:
+sambaProfilePath: \\PDC-SMB3\profiles\%U\Administrator
+sambaPrimaryGroupSID: S-1-5-21-4231626423-2410014848-2360679739-512
+sambaLMPassword: XXX
+sambaNTPassword: XXX
+sambaAcctFlags: [U ]
+sambaSID: S-1-5-21-4231626423-2410014848-2360679739-2996
+loginShell: /bin/false
+gecos: Netbios Domain Administrator
+
+dn: uid=nobody,ou=Users,dc=idealx,dc=org
+cn: nobody
+sn: nobody
+objectClass: inetOrgPerson
+objectClass: sambaSAMAccount
+objectClass: posixAccount
+objectClass: shadowAccount
+gidNumber: 514
+uid: nobody
+uidNumber: 999
+homeDirectory: /dev/null
+sambaPwdLastSet: 0
+sambaLogonTime: 0
+sambaLogoffTime: 2147483647
+sambaKickoffTime: 2147483647
+sambaPwdCanChange: 0
+sambaPwdMustChange: 2147483647
+sambaHomePath: \\PDC-SMB3\home\%U
+sambaHomeDrive: H:
+sambaProfilePath: \\PDC-SMB3\profiles\%U\nobody
+sambaPrimaryGroupSID: S-1-5-21-4231626423-2410014848-2360679739-514
+sambaLMPassword: NO PASSWORDXXXXXXXXXXXXXXXXXXXXX
+sambaNTPassword: NO PASSWORDXXXXXXXXXXXXXXXXXXXXX
+sambaAcctFlags: [NU ]
+sambaSID: S-1-5-21-4231626423-2410014848-2360679739-2998
+loginShell: /bin/false
+
+dn: cn=Domain Admins,ou=Groups,dc=idealx,dc=org
+objectClass: posixGroup
+objectClass: sambaGroupMapping
+gidNumber: 512
+cn: Domain Admins
+memberUid: Administrator
+description: Netbios Domain Administrators
+sambaSID: S-1-5-21-4231626423-2410014848-2360679739-512
+sambaGroupType: 2
+displayName: Domain Admins
+
+dn: cn=Domain Users,ou=Groups,dc=idealx,dc=org
+objectClass: posixGroup
+objectClass: sambaGroupMapping
+gidNumber: 513
+cn: Domain Users
+description: Netbios Domain Users
+sambaSID: S-1-5-21-4231626423-2410014848-2360679739-513
+sambaGroupType: 2
+displayName: Domain Users
+
+dn: cn=Domain Guests,ou=Groups,dc=idealx,dc=org
+objectClass: posixGroup
+objectClass: sambaGroupMapping
+gidNumber: 514
+cn: Domain Guests
+description: Netbios Domain Guests Users
+sambaSID: S-1-5-21-4231626423-2410014848-2360679739-514
+sambaGroupType: 2
+displayName: Domain Guests
+
+dn: cn=Print Operators,ou=Groups,dc=idealx,dc=org
+objectClass: posixGroup
+objectClass: sambaGroupMapping
+gidNumber: 550
+cn: Print Operators
+description: Netbios Domain Print Operators
+sambaSID: S-1-5-21-4231626423-2410014848-2360679739-550
+sambaGroupType: 2
+displayName: Print Operators
+
+dn: cn=Backup Operators,ou=Groups,dc=idealx,dc=org
+objectClass: posixGroup
+objectClass: sambaGroupMapping
+gidNumber: 551
+cn: Backup Operators
+description: Netbios Domain Members can bypass file security to back up files
+sambaSID: S-1-5-21-4231626423-2410014848-2360679739-551
+sambaGroupType: 2
+displayName: Backup Operators
+
+dn: cn=Replicator,ou=Groups,dc=idealx,dc=org
+objectClass: posixGroup
+objectClass: sambaGroupMapping
+gidNumber: 552
+cn: Replicator
+description: Netbios Domain Supports file replication in a sambaDomainName
+sambaSID: S-1-5-21-4231626423-2410014848-2360679739-552
+sambaGroupType: 2
+displayName: Replicator
+
+dn: cn=Domain Computers,ou=Groups,dc=idealx,dc=org
+objectClass: posixGroup
+objectClass: sambaGroupMapping
+gidNumber: 553
+cn: Domain Computers
+description: Netbios Domain Computers accounts
+sambaSID: S-1-5-21-4231626423-2410014848-2360679739-553
+sambaGroupType: 2
+displayName: Domain Computers
+
+dn: cn=Administrators,ou=Groups,dc=idealx,dc=org
+objectClass: posixGroup
+objectClass: sambaGroupMapping
+gidNumber: 544
+cn: Administrators
+description: Netbios Domain Members can fully administer the computer/sambaDomainName
+sambaSID: S-1-5-21-4231626423-2410014848-2360679739-544
+sambaGroupType: 2
+displayName: Administrators
+
+dn: cn=Users,ou=Groups,dc=idealx,dc=org
+objectClass: posixGroup
+objectClass: sambaGroupMapping
+gidNumber: 545
+cn: Users
+description: Netbios Domain Ordinary users
+sambaSID: S-1-5-21-4231626423-2410014848-2360679739-545
+sambaGroupType: 2
+displayName: users
+
+dn: cn=Guests,ou=Groups,dc=idealx,dc=org
+objectClass: posixGroup
+objectClass: sambaGroupMapping
+gidNumber: 546
+cn: Guests
+memberUid: nobody
+description: Netbios Domain Users granted guest access to the computer/sambaDomainName
+sambaSID: S-1-5-21-4231626423-2410014848-2360679739-546
+sambaGroupType: 2
+displayName: Guests
+
+dn: cn=Power Users,ou=Groups,dc=idealx,dc=org
+objectClass: posixGroup
+objectClass: sambaGroupMapping
+gidNumber: 547
+cn: Power Users
+description: Netbios Domain Members can share directories and printers
+sambaSID: S-1-5-21-4231626423-2410014848-2360679739-547
+sambaGroupType: 2
+displayName: Power Users
+
+dn: cn=Account Operators,ou=Groups,dc=idealx,dc=org
+objectClass: posixGroup
+objectClass: sambaGroupMapping
+gidNumber: 548
+cn: Account Operators
+description: Netbios Domain Users to manipulate users accounts
+sambaSID: S-1-5-21-4231626423-2410014848-2360679739-548
+sambaGroupType: 2
+displayName: Account Operators
+
+dn: cn=Server Operators,ou=Groups,dc=idealx,dc=org
+objectClass: posixGroup
+objectClass: sambaGroupMapping
+gidNumber: 549
+cn: Server Operators
+description: Netbios Domain Server Operators
+sambaSID: S-1-5-21-4231626423-2410014848-2360679739-549
+sambaGroupType: 2
+displayName: Server Operators
diff --git a/source4/lib/ldb/tests/test-samba3sam.sh b/source4/lib/ldb/tests/test-samba3sam.sh
new file mode 100755
index 0000000000..60d429e3b1
--- /dev/null
+++ b/source4/lib/ldb/tests/test-samba3sam.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+rm -f samba3.ldb
+
+$VALGRIND ldbadd -H tdb://samba3.ldb < samba3.ldif
+
+OPT="-o modules:samba3sam -H tdb://samba3.ldb "
+$VALGRIND ldbsearch $OPT "(cn=Administrator)"