~ubuntu-branches/ubuntu/raring/apparmor/raring

« back to all changes in this revision

Viewing changes to tests/regression/subdomain/net_raw.sh

  • Committer: Bazaar Package Importer
  • Author(s): Kees Cook
  • Date: 2007-03-23 16:42:01 UTC
  • Revision ID: james.westby@ubuntu.com-20070323164201-jkax6f0oku087b7l
Tags: upstream-2.0.1+510.dfsg
ImportĀ upstreamĀ versionĀ 2.0.1+510.dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/bash
 
2
# $Id: net_raw.sh 61 2006-05-19 18:32:14Z steve-beattie $
 
3
 
 
4
#       Copyright (C) 2002-2005 Novell/SUSE
 
5
#
 
6
#       This program is free software; you can redistribute it and/or
 
7
#       modify it under the terms of the GNU General Public License as
 
8
#       published by the Free Software Foundation, version 2 of the
 
9
#       License.
 
10
 
 
11
#=NAME net_raw
 
12
#=DESCRIPTION 
 
13
# AppArmor requires the net_raw capability in order to open a raw socket.  
 
14
# This test verifies this.
 
15
#=END
 
16
 
 
17
pwd=$(dirname $0)
 
18
pwd=$(cd $pwd ; /bin/pwd)
 
19
 
 
20
bin=$pwd
 
21
 
 
22
. $bin/prologue.inc
 
23
 
 
24
dir=$tmpdir/tmpdir
 
25
 
 
26
# NET_RAW FAIL
 
27
genprofile 
 
28
runchecktest "RAW SOCKET (no cap)" fail
 
29
 
 
30
# NET_RAW PASS (?)
 
31
genprofile cap:net_raw
 
32
runchecktest "RAW SOCKET (cap net_raw)" pass
 
33