r23780: Find and fix more GPL2 -> GPL3.
[ira/wip.git] / testsuite / smbd / se_access_check.exp
1 #
2 # @(#) Test se_access_check() function
3 #
4
5 #
6 # Unix SMB/Netbios implementation.
7 # Copyright (C) Tim Potter 2000
8 #   
9 # This program is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License as published by
11 # the Free Software Foundation; either version 3 of the License, or
12 # (at your option) any later version.
13 #   
14 # This program is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 # GNU General Public License for more details.
18 #   
19 # You should have received a copy of the GNU General Public License
20 # along with this program; if not, write to the Free Software
21 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 #
23
24 load_lib "compile.exp"
25 load_lib "util-defs.exp"
26
27 # Run tests from C source files
28
29 set se_access_check_tests [list \
30         { "null security descriptor" "se_access_check_nullsd" } \
31         { "security descriptor allow everyone" "se_access_check_allowall" } \
32         { "security descriptor allow everyone" "se_access_check_allowall" } \
33         { "security descriptor deny everyone" "se_access_check_denyall" } \
34         { "empty security descriptor" "se_access_check_empty" } \
35         { "allow some users access" "se_access_check_allowsome" } \
36         { "deny some users access" "se_access_check_denysome" } \
37         { "printer access permissions" "se_access_check_printer" } \
38         ]
39
40 foreach { test } $se_access_check_tests {
41     set test_desc [lindex $test 0]
42     set test_file [lindex $test 1]
43
44     simple_make "se_access_check" $test_file
45     set output [util_start "$srcdir/$subdir/$test_file" ]
46
47     if { [regexp "PASS" $output] } {
48         pass $test_desc
49         file delete "$srcdir/$subdir/$test_file" "$srcdir/$subdir/$test_file.o"
50     } else {
51         fail $test_desc
52         puts $output
53     }
54 }