diff options
author | Amitay Isaacs <amitay@gmail.com> | 2013-04-03 14:44:08 +1100 |
---|---|---|
committer | Amitay Isaacs <amitay@gmail.com> | 2013-04-08 11:14:28 +1000 |
commit | d931e73fb83fe1ced9c41b06c15060fd18aff3d7 (patch) | |
tree | d4223a6b1ebfacdcc7cf420ce4711b695b1b6d19 /ctdb/config/statd-callout | |
parent | 41f0252da22b97667ecdbc2235930d3b2523aa4d (diff) | |
download | samba-d931e73fb83fe1ced9c41b06c15060fd18aff3d7.tar.gz |
statd-callout: Make sure statd callout script always runs as root
In RHEL 6+, rpc.statd runs as "rpcuser" instead of root as on RHEL 5. This
prevents CTDB tool commands talking to daemon since "rpcuser" cannot access
CTDB socket.
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Pair-Programmed-With: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit fe8c4880b371492a38554868d4ca10918c54e412)
Diffstat (limited to 'ctdb/config/statd-callout')
-rwxr-xr-x | ctdb/config/statd-callout | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ctdb/config/statd-callout b/ctdb/config/statd-callout index a9c2e3dfba5..94bd2dd7fbd 100755 --- a/ctdb/config/statd-callout +++ b/ctdb/config/statd-callout @@ -1,5 +1,8 @@ #!/bin/sh +# This must run as root as CTDB tool commands need to access CTDB socket +[ $(id -u) -eq 0 ] || exec sudo "$0" "$@" + # this script needs to be installed so that statd points to it with the -H # command line argument. The easiest way to do that is to put something like this in # /etc/sysconfig/nfs: |