Accepting request 318424 from home:cboltz
- add fix-initscript-aa_log_end_msg.diff - fixes ugly initscript output (boo#862170) OBS-URL: https://build.opensuse.org/request/show/318424 OBS-URL: https://build.opensuse.org/package/show/security:apparmor/apparmor?expand=0&rev=137
This commit is contained in:
parent
7f772258a8
commit
7ae1344363
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Jul 23 22:16:35 UTC 2015 - opensuse@cboltz.de
|
||||||
|
|
||||||
|
- add fix-initscript-aa_log_end_msg.diff - fixes ugly initscript
|
||||||
|
output (boo#862170)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Jul 16 20:51:00 UTC 2015 - opensuse@cboltz.de
|
Thu Jul 16 20:51:00 UTC 2015 - opensuse@cboltz.de
|
||||||
|
|
||||||
|
@ -92,6 +92,9 @@ Patch6: apparmor-abstractions-no-multiline.diff
|
|||||||
# bug 906858 - confine lessopen.sh (submitted upstream 2014-12-21)
|
# bug 906858 - confine lessopen.sh (submitted upstream 2014-12-21)
|
||||||
Patch7: apparmor-lessopen-profile.patch
|
Patch7: apparmor-lessopen-profile.patch
|
||||||
|
|
||||||
|
# boo#862170 - fix ugly initscript output (commited upstream trunk r3208)
|
||||||
|
Patch8: fix-initscript-aa_log_end_msg.diff
|
||||||
|
|
||||||
Url: https://launchpad.net/apparmor
|
Url: https://launchpad.net/apparmor
|
||||||
PreReq: sed
|
PreReq: sed
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
@ -436,6 +439,8 @@ SubDomain.
|
|||||||
|
|
||||||
%patch6
|
%patch6
|
||||||
%patch7 -p1
|
%patch7 -p1
|
||||||
|
%patch8
|
||||||
|
|
||||||
# search for left-over multiline rules
|
# search for left-over multiline rules
|
||||||
test -z "$(grep -r '^\s*\(unix\|dbus\)[^,]\(([^)]*)\)*[^,]*$' profiles/apparmor.d/)"
|
test -z "$(grep -r '^\s*\(unix\|dbus\)[^,]\(([^)]*)\)*[^,]*$' profiles/apparmor.d/)"
|
||||||
|
|
||||||
|
47
fix-initscript-aa_log_end_msg.diff
Normal file
47
fix-initscript-aa_log_end_msg.diff
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
Fix aa_log_end_msg() in rc.apparmor.suse
|
||||||
|
|
||||||
|
"rcapparmor kill" results in a funny error message:
|
||||||
|
/lib/apparmor/rc.apparmor.functions: line 441: return: -v: invalid option
|
||||||
|
return: usage: return [n]
|
||||||
|
|
||||||
|
SLE12 includes a patch that prevents this error message, but also
|
||||||
|
prevents that $? is handed over correctly to rc_status. This means that
|
||||||
|
"rcapparmor kill" will happily display "done" even with a compiled-in
|
||||||
|
apparmor module that can't be unloaded.
|
||||||
|
|
||||||
|
This patch is the improved version - it adds a small helper function to
|
||||||
|
set $? (as handed over to aa_log_end_msg()) and then calls rc_status -v.
|
||||||
|
This means that "rcapparmor kill" now shows "failed" because it's
|
||||||
|
impossible to unload something that is compiled directly into the
|
||||||
|
kernel.
|
||||||
|
|
||||||
|
References: https://bugzilla.opensuse.org/show_bug.cgi?id=862170 (non-public)
|
||||||
|
|
||||||
|
|
||||||
|
Acked-by: Seth Arnold <seth.arnold@canonical.com> for 2.9 and trunk
|
||||||
|
|
||||||
|
|
||||||
|
Commited to trunk revision 3208.
|
||||||
|
=== modified file 'parser/rc.apparmor.suse'
|
||||||
|
--- parser/rc.apparmor.suse 2011-09-15 18:20:23 +0000
|
||||||
|
+++ parser/rc.apparmor.suse 2015-07-22 19:23:28 +0000
|
||||||
|
@@ -94,12 +94,13 @@
|
||||||
|
echo -e "$rc_skipped"
|
||||||
|
}
|
||||||
|
|
||||||
|
+_set_status() {
|
||||||
|
+ return $1
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
aa_log_end_msg() {
|
||||||
|
- v="-v"
|
||||||
|
- if [ "$1" != '0' ]; then
|
||||||
|
- rc="-v$1"
|
||||||
|
- fi
|
||||||
|
- rc_status $v
|
||||||
|
+ _set_status $1
|
||||||
|
+ rc_status -v
|
||||||
|
}
|
||||||
|
|
||||||
|
usage() {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user