Project

General

Profile

Bug #13441 » stream-setup.sh

Setup tests on server share - Matt Barden, 2021-01-30 12:22 AM

 
1
#!/usr/bin/bash
2

    
3
mkdir -p streams-test-dir
4
chmod A=everyone@:full_set:fd:allow streams-test-dir
5
chown 100 streams-test-dir
6
chgrp 100 streams-test-dir
7
pushd streams-test-dir
8

    
9
mkdir -p test-streams
10
chmod A=everyone@:rwpRWxaAdcCos:fd:allow test-streams
11
chown 100 test-streams
12
chgrp 100 test-streams
13

    
14
cd test-streams
15

    
16
echo "init" > test-denied.txt
17
chmod A=everyone@:full_set:fd:allow test-denied.txt
18
chown 100 test-denied.txt
19
chgrp 100 test-denied.txt
20
runat test-denied.txt <<EOF
21
echo "write" > SUNWsmb:stream_rw:\\\$DATA
22
EOF
23
chmod A=everyone@:rRxacs:fd:allow test-denied.txt
24

    
25
mkdir testdirstream
26
chmod A=everyone@:full_set:fd:allow testdirstream
27
chown 100 testdirstream
28
chgrp 100 testdirstream
29
runat testdirstream <<EOF
30
echo "init" > SUNWsmb:stream_rw:\\\$DATA
31
EOF
32

    
33
mkdir testdir-denied
34
chmod A=everyone@:full_set:fd:allow testdir-denied
35
chown 100 testdir-denied
36
chgrp 100 testdir-denied
37
runat testdir-denied <<EOF
38
echo "write" > SUNWsmb:stream_rw:\\\$DATA
39
EOF
40
chmod A=everyone@:rRxacs:fd:allow testdir-denied
41

    
42
popd
(2-2/2)