3 # Copyright (c) 2009 Casey Schaufler under the terms of the
4 # GNU General Public License version 2, as published by the
5 # Free Software Foundation
7 # Test reading of the current process Smack label
13 source smack_common.sh
15 NotTheFloorLabel
="XYZZY"
16 StartLabel
=`cat "$smackfsdir/ambient" 2>/dev/null`
18 echo "$NotTheFloorLabel" 2>/dev
/null
> "$smackfsdir/ambient"
20 label
=`cat "$smackfsdir/ambient" 2>/dev/null`
21 if [ "$label" != "$NotTheFloorLabel" ]; then
23 The smack label reported for the current process is "$label", not the expected
29 echo "$StartLabel" 2>/dev
/null
> "$smackfsdir/ambient"
31 label
=`cat "$smackfsdir/ambient" 2>/dev/null`
32 if [ "$label" != "$StartLabel" ]; then
34 The smack label reported for the current process is "$label", not the expected "$StartLabel".