~lefteris-nikoltsios/+junk/samba-lp1016895

« back to all changes in this revision

Viewing changes to source3/lib/ldb/tests/test-extended.sh

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2011-12-21 13:18:04 UTC
  • mfrom: (0.39.21 sid)
  • Revision ID: package-import@ubuntu.com-20111221131804-xtlr39wx6njehxxr
Tags: 2:3.6.1-3ubuntu1
* Merge from Debian testing.  Remaining changes:
  + debian/patches/VERSION.patch:
    - set SAMBA_VERSION_SUFFIX to Ubuntu.
  + debian/patches/error-trans.fix-276472:
    - Add the translation of Unix Error code -ENOTSUP to NT Error Code
    - NT_STATUS_NOT_SUPPORTED to prevent the Permission denied error.
  + debian/smb.conf:
    - add "(Samba, Ubuntu)" to server string.
    - comment out the default [homes] share, and add a comment about
      "valid users = %S" to show users how to restrict access to
      \\server\username to only username.
    - Set 'usershare allow guests', so that usershare admins are 
      allowed to create public shares in addition to authenticated
      ones.
    - add map to guest = Bad user, maps bad username to guest access.
  + debian/samba-common.config:
    - Do not change priority to high if dhclient3 is installed.
    - Use priority medium instead of high for the workgroup question.
  + debian/control:
    - Don't build against or suggest ctdb.
    - Add dependency on samba-common-bin to samba.
  + Add ufw integration:
    - Created debian/samba.ufw.profile
    - debian/rules, debian/samba.dirs, debian/samba.files: install
      profile
    - debian/control: have samba suggest ufw
  + Add apport hook:
    - Created debian/source_samba.py.
    - debian/rules, debian/samba.dirs, debian/samba-common-bin.files: install
  + Switch to upstart:
    - Add debian/samba.{nmbd,smbd}.upstart.
  + debian/samba.logrotate, debian/samba-common.dhcp, debian/samba.if-up:
    - Make them upstart compatible
  + debian/samba.postinst: 
    - Avoid scary pdbedit warnings on first import.
  + debian/samba-common.postinst: Add more informative error message for
    the case where smb.conf was manually deleted
  + debian/patches/fix-debuglevel-name-conflict.patch: don't use 'debug_level'
    as a global variable name in an NSS module 
  + Dropped:
    - debian/patches/error-trans.fix-276472
    - debian/patches/fix-debuglevel-name-conflict.patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/sh
2
 
 
3
 
echo "Running extended search tests"
4
 
 
5
 
mv $LDB_URL $LDB_URL.1
6
 
 
7
 
cat <<EOF | bin/ldbadd || exit 1
8
 
dn: cn=testrec1,cn=TEST
9
 
i1: 1
10
 
i2: 0
11
 
i3: 1234
12
 
i4: 0x7003004
13
 
 
14
 
dn: cn=testrec2,cn=TEST
15
 
i1: 0x800000
16
 
 
17
 
dn: cn=testrec3,cn=TEST
18
 
i1: 0x101010101
19
 
i1: 7
20
 
 
21
 
dn: cn=auser1,cn=TEST
22
 
groupType: 2147483648
23
 
samAccountType: 805306368
24
 
 
25
 
dn: cn=auser2,cn=TEST
26
 
groupType: 2147483648
27
 
samAccountType: 805306369
28
 
 
29
 
dn: cn=auser3,cn=TEST
30
 
groupType: 2147483649
31
 
samAccountType: 805306370
32
 
 
33
 
dn: cn=auser4,cn=TEST
34
 
groupType: 2147483649
35
 
samAccountType: 805306369
36
 
EOF
37
 
 
38
 
checkcount() {
39
 
    count=$1
40
 
    expression="$2"
41
 
    n=`bin/ldbsearch "$expression" | grep '^dn' | wc -l`
42
 
    if [ $n != $count ]; then
43
 
        echo "Got $n but expected $count for $expression"
44
 
        bin/ldbsearch "$expression"
45
 
        exit 1
46
 
    fi
47
 
    echo "OK: $count $expression"
48
 
}
49
 
 
50
 
checkcount 1 '(i3=1234)'
51
 
checkcount 0 '(i3=12345)'
52
 
 
53
 
checkcount 2 '(i1:1.2.840.113556.1.4.803:=1)'
54
 
checkcount 1 '(i1:1.2.840.113556.1.4.803:=3)'
55
 
checkcount 1 '(i1:1.2.840.113556.1.4.803:=7)'
56
 
checkcount 0 '(i1:1.2.840.113556.1.4.803:=15)'
57
 
checkcount 1 '(i1:1.2.840.113556.1.4.803:=0x800000)'
58
 
checkcount 1 '(i1:1.2.840.113556.1.4.803:=8388608)'
59
 
 
60
 
checkcount 2 '(i1:1.2.840.113556.1.4.804:=1)'
61
 
checkcount 2 '(i1:1.2.840.113556.1.4.804:=3)'
62
 
checkcount 2 '(i1:1.2.840.113556.1.4.804:=7)'
63
 
checkcount 2 '(i1:1.2.840.113556.1.4.804:=15)'
64
 
checkcount 1 '(i1:1.2.840.113556.1.4.804:=0x800000)'
65
 
checkcount 1 '(i1:1.2.840.113556.1.4.804:=8388608)'
66
 
 
67
 
# this is one that w2k gives
68
 
checkcount 3 '(|(|(&(!(groupType:1.2.840.113556.1.4.803:=1))(groupType:1.2.840.113556.1.4.803:=2147483648)(groupType:1.2.840.113556.1.4.804:=10))(samAccountType=805306368))(samAccountType=805306369))'
69