blob: 568d32174c95dedb3e99e7412f8fecd544c5389b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
#!/sbin/runscript
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
#
# Created by Wolfram Schlich <wschlich@gentoo.org>
# Feedback is greatly appreciated!
#
depend() {
after grsecurity-sysctl
before net.*
}
checkconfig() {
if [[ ! -f /etc/grsec/pw ]]; then
eerror
eerror "The grsecurity RBAC system password file is missing!"
eerror " -> /etc/grsec/pw"
eerror
eerror "Create passwords for the RBAC system itself and the 'admin'"
eerror "role by running the following commands:"
eerror
eerror "To create the grsecurity RBAC system main password:"
eerror " gradm -P"
eerror
eerror "To create the grsecurity RBAC system role 'admin' password:"
eerror " gradm -P admin"
eerror
return 1
fi
}
start() {
checkconfig || return 1
ebegin "Enabling grsecurity RBAC system"
/sbin/gradm -E
eend $?
}
stop() {
einfo
einfo "You have to manually disable the grsecurity RBAC system"
einfo "by running the following command:"
einfo " gradm -D"
einfo
}
|