]> git.pld-linux.org Git - packages/apparmor-parser.git/commitdiff
- now in sources
authorzbyniu <zbyniu@pld-linux.org>
Fri, 13 Apr 2007 23:58:32 +0000 (23:58 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    apparmor-parser-avoid-pushpop.patch -> 1.2
    apparmor-parser-no-fdopendir.patch -> 1.4
    apparmor-parser-pld.patch -> 1.4

apparmor-parser-avoid-pushpop.patch [deleted file]
apparmor-parser-no-fdopendir.patch [deleted file]
apparmor-parser-pld.patch [deleted file]

diff --git a/apparmor-parser-avoid-pushpop.patch b/apparmor-parser-avoid-pushpop.patch
deleted file mode 100644 (file)
index 8880084..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-This patch fixes the apparmor parser tst Makefile to not use popd/pushd
-bashisms which were in place to get around PWD not getting set
-correctly. Instead, fix the simple.pl script to call pwd directly.
-Based on feedback from PLD/Arkadiusz Miskiewicz <arekm@maven.pl>.
----
- parser/tst/Makefile  |    2 +-
- parser/tst/simple.pl |    8 +++++---
- 2 files changed, 6 insertions(+), 4 deletions(-)
-
-Index: trunk-forge/parser/tst/Makefile
-===================================================================
---- trunk-forge.orig/parser/tst/Makefile
-+++ trunk-forge/parser/tst/Makefile
-@@ -12,7 +12,7 @@ all: tests
- .PHONY: tests
- tests: ../apparmor_parser
--      $(Q)pushd . && ${PROVE} ${PROVE_ARG} ${TESTS} && popd
-+      $(Q)${PROVE} ${PROVE_ARG} ${TESTS}
- ../apparmor_parser:
-       make -C .. apparmor_parser
-Index: trunk-forge/parser/tst/simple.pl
-===================================================================
---- trunk-forge.orig/parser/tst/simple.pl
-+++ trunk-forge/parser/tst/simple.pl
-@@ -13,6 +13,8 @@ $config{'parser'} = "/sbin/subdomain_par
- $config{'profiledir'} = "./simple_tests/";
- my $help;
-+my $pwd = `pwd`;
-+chomp($pwd);
- GetOptions(
-   "help|h" => \$help,
-@@ -32,13 +34,13 @@ read_config();
- # Override config file profile location when passed on command line
- if (@ARGV >= 1) {
-   $config{'profiledir'} = shift;
--} 
-+}
- if ($config{'profiledir'} =~ /^\//) {
-   $config{'includedir'} = $config{'profiledir'};
- } else {
--  $config{'includedir'} = "$ENV{'PWD'}/$config{'profiledir'}";
--} 
-+  $config{'includedir'} = "$pwd/$config{'profiledir'}";
-+}
- sub read_config {
-   my $which;
diff --git a/apparmor-parser-no-fdopendir.patch b/apparmor-parser-no-fdopendir.patch
deleted file mode 100644 (file)
index 6e328ac..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-Index: parser/parser_include.c
-===================================================================
---- parser/parser_include.c    (wersja 246)
-+++ parser/parser_include.c    (wersja 247)
-@@ -393,8 +393,13 @@
-       }
-       if (S_ISDIR(my_stat.st_mode)) {
--              DIR *dir = fdopendir(fileno(newf));
-+              DIR *dir = NULL;
-               struct dirent *dirent;
-+
-+              /* XXX - fdopendir not available in glibc < 2.4 */
-+              /* dir = fdopendir(fileno(newf)); */
-+              fclose(newf);
-+              dir = opendir(buf);
-               if (!dir) {
-                       retval = 1;
-                       goto out;
diff --git a/apparmor-parser-pld.patch b/apparmor-parser-pld.patch
deleted file mode 100644 (file)
index 711d7a0..0000000
+++ /dev/null
@@ -1,221 +0,0 @@
-diff -urN apparmor-parser-2.0.org/rc.apparmor.functions apparmor-parser-2.0/rc.apparmor.functions
---- apparmor-parser-2.0.org/rc.apparmor.functions      2006-10-12 18:56:46.000000000 +0200
-+++ apparmor-parser-2.0/rc.apparmor.functions  2006-12-18 14:47:44.113527250 +0100
-@@ -53,7 +53,7 @@
- if [ -f "${APPARMOR_CONF}" ] ; then
-       #parse the conf file to see what we should do
--      source "${APPARMOR_CONF}"
-+      . "${APPARMOR_CONF}"
- fi
- if [ -f /sbin/apparmor_parser ] ; then
-@@ -102,7 +102,7 @@
- # keep exit status from parser during profile load.  0 is good, 1 is bad
- STATUS=0
--function parse_profiles() {   
-+parse_profiles() {    
-       # get parser arg
-       case "$1" in
-               load)
-@@ -160,7 +160,7 @@
-       fi
- }
--function profiles_names_list() {      
-+profiles_names_list() {       
-       # run the parser on all of the apparmor profiles
-       TMPFILE=$1
-       if [ ! -f "$PARSER" ]; then
-@@ -188,7 +188,7 @@
-       done
- }
--function is_subdomainfs_mounted() {
-+is_subdomainfs_mounted() {
-       if grep -q subdomainfs /proc/filesystems ; then
-               if grep -q subdomainfs /proc/mounts && \
-                  [ -f "${SUBDOMAINFS_MOUNTPOINT}/profiles" ]; then
-@@ -211,7 +211,7 @@
-       return 1
- }
--function mount_subdomainfs() {
-+mount_subdomainfs() {
-       # for backwords compatibility
-       if grep -q subdomainfs /proc/filesystems ; then
-               if [ "X" != "X${SUBDOMAINFS_MOUNTPOINT}" ]; then
-@@ -239,14 +239,14 @@
-       return 0
- }
--function unmount_subdomainfs() {
-+unmount_subdomainfs() {
-       SUBDOMAINFS=$(grep subdomainfs /proc/mounts  | cut -d" " -f2 2> /dev/null)
-       if [ "X" != "X${SUBDOMAINFS}" ]; then
-               sd_action "Unmounting subdomainfs" umount ${SUBDOMAINFS}
-       fi
- }
--function rebuild_subdomain() {
-+rebuild_subdomain() {
-       if [ -d "$SUBDOMAIN_SRC" ] ; then
-               # only try to rebuild for the running kernel
-               cd "$SUBDOMAIN_SRC"
-@@ -280,7 +280,7 @@
-       fi
- }
--function failstop_system() {
-+failstop_system() {
-       level=$(runlevel | cut -d" " -f2)
-       if [ $level -ne "1" ] ; then
-               sd_log_failure_msg "- could not start AppArmor.  Changing to runlevel 1"
-@@ -291,7 +291,7 @@
-       return -1
- }
--function module_panic() {
-+module_panic() {
-       # the module failed to load, determine what action should be taken
-       case "$SUBDOMAIN_MODULE_PANIC" in
-@@ -315,7 +315,7 @@
-       esac
- }
--function load_module() {
-+load_module() {
-       if modinfo -F filename apparmor > /dev/null 2>&1 ; then
-               MODULE=apparmor
-       elif modinfo -F filename subdomain > /dev/null 2>&1 ; then
-@@ -335,7 +335,7 @@
-       fi
- }     
--function start_sd_event() {
-+start_sd_event() {
-       if [ -x "$AA_EV_BIN" -a "${APPARMOR_ENABLE_AAEVENTD}" = "yes" ] ; then
-               sd_action "Starting AppArmor Event daemon" startproc -f -p $AA_EV_PIDFILE $AA_EV_BIN -p $AA_EV_PIDFILE
-       elif [ -x "$SD_EV_BIN" -a "${APPARMOR_ENABLE_AAEVENTD}" = "yes" ] ; then
-@@ -343,7 +343,7 @@
-       fi
- }
--function stop_sd_event() {
-+stop_sd_event() {
-       if [ -x "$AA_EV_BIN" -a -f "$AA_EV_PIDFILE" ] ; then
-               sd_action "Shutting down AppArmor Event daemon" /sbin/killproc -G -p $AA_EV_PIDFILE -INT $AA_EV_BIN
-       fi
-@@ -352,7 +352,7 @@
-       fi
- }
--function subdomain_start() {
-+subdomain_start() {
-       if ! grep -qE "^(subdomain|apparmor)[[:space:]]" /proc/modules ; then
-               load_module
-               rc=$?
-@@ -383,7 +383,8 @@
-       fi
- }
--function remove_profiles() {
-+remove_profiles() {
-+      
-       # removing profiles as we directly read from subdomainfs
-       # doesn't work, since we are removing entries which screws up
-       # our position.  Lets hope there are never enough profiles to
-@@ -404,7 +405,8 @@
-       fi
-       retval=0
--      IFS=$'\n' && for profile in $(sed -e "s/ (\(enforce\|complain\))$//" "$SFS_MOUNTPOINT/profiles") ; do
-+      cat "$SFS_MOUNTPOINT/profiles" | while read line; do
-+              profile=$(echo "$line" | sed -e "s/ (\(enforce\|complain\))$//")
-               echo "\"$profile\" { }" | $PARSER -R >/dev/null
-               rc=$?
-               if [ ${rc} -ne 0 ] ; then 
-@@ -418,13 +420,13 @@
-       fi      
- }
--function subdomain_stop() {
-+subdomain_stop() {
-       stop_sd_event
-       echo -n "Unloading AppArmor profiles "
-       remove_profiles
- }
--function subdomain_kill() {
-+subdomain_kill() {
-       stop_sd_event
-       unmount_subdomainfs
-       if grep -qE "^apparmor[[:space:]]" /proc/modules ; then
-@@ -437,7 +439,7 @@
-       sd_action "Unloading AppArmor modules" /sbin/modprobe -r $MODULE
- }
--function __subdomain_restart() {
-+__subdomain_restart() {
-       if [ ! -w "$SFS_MOUNTPOINT/.load" ] ; then
-               sd_log_failure_msg "Loading AppArmor profiles - failed, Do you have the correct privileges?"
-               return 4
-@@ -449,17 +451,15 @@
-       profiles_names_list ${PNAMES_LIST}
-       MODULE_PLIST=$(mktemp ${APPARMOR_TMPDIR}/tmp.XXXXXXXX)
-       sed  -e "s/ (\(enforce\|complain\))$//" "$SFS_MOUNTPOINT/profiles" | sort >"$MODULE_PLIST"
--      #profiles=$(cat $PNAMES_LIST | sort | comm -2 -3 "$MODULE_PLIST" -)
--      #for profile in $profiles ; do
--      IFS=$'\n' && for profile in $(cat $PNAMES_LIST | sort | comm -2 -3 "$MODULE_PLIST" -) ; do
--              echo "\"$profile\" {}" | $PARSER -R >/dev/null
-+      cat "$PNAMES_LIST" | sort | comm -2 -3 "$MODULE_PLIST" - | while read profile; do
-+              echo "\"$profile\" {}" | $PARSER -R > /dev/null
-       done
-       rm "$MODULE_PLIST"
-       rm "$PNAMES_LIST"
-       return 0
- }
--function subdomain_restart() {
-+subdomain_restart() {
-       if ! grep -qE "^(subdomain|apparmor)[[:space:]]" /proc/modules ; then
-               subdomain_start
-               rc=$?
-@@ -479,7 +479,7 @@
-       return $rc
- }
--function subdomain_try_restart() {
-+subdomain_try_restart() {
-       if ! grep -qE "^(subdomain|apparmor)[[:space:]]" /proc/modules ; then
-               return 1
-       fi
-@@ -493,7 +493,7 @@
-       return $rc
- }
--function subdomain_debug() {
-+subdomain_debug() {
-       subdomain_kill
-       load_module "subdomain_debug=1"
-       mount_subdomainfs
-@@ -501,7 +501,7 @@
-       parse_profiles load
- }
--function configure_owlsm () {
-+configure_owlsm () {
-       if [ "${SUBDOMAIN_ENABLE_OWLSM}" = "yes" -a -f ${SFS_MOUNTPOINT}/control/owlsm ] ; then
-               # Sigh, the "sh -c" is necessary for the SuSE sd_action
-               # and it can't be abstracted out as a seperate function, as
-@@ -513,7 +513,7 @@
-       fi
- }
--function subdomain_status () {
-+subdomain_status () {
-       if test -x ${AA_STATUS} ; then
-               ${AA_STATUS} --verbose
-               return $?
This page took 0.120117 seconds and 4 git commands to generate.