diff options
author | Tudor Florea <tudor.florea@enea.com> | 2014-10-10 03:20:04 +0200 |
---|---|---|
committer | Tudor Florea <tudor.florea@enea.com> | 2014-10-10 03:20:04 +0200 |
commit | 1b8dfe266937a37a4c642f96ceb2347bf4c00a17 (patch) | |
tree | 0c6aab146bb3c82efd9c7846a9a4e70dcb0ec84f /meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-allow-non-root-user-to-check-status.patch | |
download | meta-openembedded-daisy-140929.tar.gz |
initial commit for Enea Linux 4.0-140929daisy-140929
Migrated from the internal git server on the daisy-enea-point-release branch
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-allow-non-root-user-to-check-status.patch')
-rw-r--r-- | meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-allow-non-root-user-to-check-status.patch | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-allow-non-root-user-to-check-status.patch b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-allow-non-root-user-to-check-status.patch new file mode 100644 index 0000000000..6020c31e23 --- /dev/null +++ b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-allow-non-root-user-to-check-status.patch | |||
@@ -0,0 +1,69 @@ | |||
1 | autofs-5.0.7 - allow non root user to check status | ||
2 | |||
3 | From: Ian Kent <ikent@redhat.com> | ||
4 | |||
5 | |||
6 | --- | ||
7 | |||
8 | CHANGELOG | 1 + | ||
9 | redhat/autofs.init.in | 20 +++++++++++++------- | ||
10 | 2 files changed, 14 insertions(+), 7 deletions(-) | ||
11 | |||
12 | |||
13 | diff --git a/CHANGELOG b/CHANGELOG | ||
14 | index 44c9fb2..936c9ab 100644 | ||
15 | --- a/CHANGELOG | ||
16 | +++ b/CHANGELOG | ||
17 | @@ -11,6 +11,7 @@ | ||
18 | - make description of default MOUNT_WAIT setting clear. | ||
19 | - configure.in: allow cross compilation. | ||
20 | - README: update mailing list subscription info. | ||
21 | +- allow non root user to check status. | ||
22 | |||
23 | 25/07/2012 autofs-5.0.7 | ||
24 | ======================= | ||
25 | diff --git a/redhat/autofs.init.in b/redhat/autofs.init.in | ||
26 | index cd5cb34..fe18b3e 100644 | ||
27 | --- a/redhat/autofs.init.in | ||
28 | +++ b/redhat/autofs.init.in | ||
29 | @@ -167,6 +167,19 @@ function usage_message() { | ||
30 | |||
31 | RETVAL=0 | ||
32 | |||
33 | +# allow non-root users to read status / usage | ||
34 | + | ||
35 | +case "$1" in | ||
36 | + status) | ||
37 | + status -p @@autofspiddir@@/autofs.pid -l autofs $prog | ||
38 | + exit 0; | ||
39 | + ;; | ||
40 | + usage) | ||
41 | + usage_message | ||
42 | + exit 0; | ||
43 | + ;; | ||
44 | +esac | ||
45 | + | ||
46 | # Only the root user may change the service status | ||
47 | if [ `id -u` -ne 0 ] && [ "$1" != "status" ]; then | ||
48 | echo "insufficient privilege to change service status" | ||
49 | @@ -184,9 +197,6 @@ case "$1" in | ||
50 | stop) | ||
51 | stop | ||
52 | ;; | ||
53 | - status) | ||
54 | - status -p @@autofspiddir@@/autofs.pid -l autofs $prog | ||
55 | - ;; | ||
56 | restart|force-reload) | ||
57 | restart | ||
58 | ;; | ||
59 | @@ -202,10 +212,6 @@ case "$1" in | ||
60 | restart | ||
61 | fi | ||
62 | ;; | ||
63 | - usage) | ||
64 | - usage_message | ||
65 | - exit 0 | ||
66 | - ;; | ||
67 | *) | ||
68 | usage_message | ||
69 | exit 2 | ||