apparmor/apparmor-2.7.0rc1-aa-notify-better-error-message.diff
Stephan Kulow 0a3dbf3200 Accepting request 88695 from security:apparmor:factory
- include autogenerated profile sniplet for samba shares (bnc#688040)
- more helpful error message for "aa-notify -p" if the user is not in
  the configured group

OBS-URL: https://build.opensuse.org/request/show/88695
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/apparmor?expand=0&rev=26
2011-10-19 11:56:25 +00:00

22 lines
863 B
Diff

Add a more helpful error message to aa-notify -p if the user is not in
the configured group.
Pending for review upstream.
Signed-off-by: Christian Boltz <apparmor@cboltz.de>
=== modified file 'utils/aa-notify'
--- utils/aa-notify 2011-10-12 11:08:25 +0000
+++ utils/aa-notify 2011-10-16 13:53:23 +0000
@@ -151,7 +151,7 @@
if (defined($prefs{use_group})) {
my ($name, $passwd, $gid, $members) = getgrnam($prefs{use_group});
if (not defined($members) or not defined($login) or (not grep { $_ eq $login } split(/ /, $members) and $login ne "root")) {
- _error("'$login' must be in '$prefs{use_group}' group. Aborting");
+ _error("'$login' must be in '$prefs{use_group}' group. Aborting.\nAsk your admin to add you to this group or to change the group in\n$conf if you want to use aa-notify.");
}
}
}