Skip to content
Snippets Groups Projects
Commit eaa57c2f authored by Brian J. Murrell's avatar Brian J. Murrell
Browse files

Optionally use RUNAS_GID to runas command to set group to setregid() to.

This is needed to prevent errors such as:
  mds blocked setgid attempt (1000/1000 -> 100)
parent d74922d7
No related merge requests found
......@@ -102,7 +102,11 @@ if [ $UID -ne 0 ]; then
RUNAS=""
else
RUNAS_ID=${RUNAS_ID:-500}
RUNAS=${RUNAS:-"runas -u $RUNAS_ID"}
if [ -z "$RUNAS_GID" ]; then
RUNAS=${RUNAS:-"runas -u $RUNAS_ID"}
else
RUNAS=${RUNAS:-"runas -u $RUNAS_ID -g $RUNAS_GID"}
fi
fi
OLDTMPDIR=$TMPDIR
......
......@@ -58,7 +58,11 @@ if [ $UID -ne 0 ]; then
RUNAS=""
else
RUNAS_ID=${RUNAS_ID:-500}
RUNAS=${RUNAS:-"runas -u $RUNAS_ID"}
if [ -z "$RUNAS_GID" ]; then
RUNAS=${RUNAS:-"runas -u $RUNAS_ID"}
else
RUNAS=${RUNAS:-"runas -u $RUNAS_ID -g $RUNAS_GID"}
fi
fi
if [ `using_krb5_sec $SECURITY` == 'y' ] ; then
......
......@@ -31,7 +31,11 @@ if [ $UID -ne 0 ]; then
RUNAS=""
else
RUNAS_ID=${RUNAS_ID:-500}
RUNAS=${RUNAS:-"runas -u $RUNAS_ID"}
if [ -z "$RUNAS_GID" ]; then
RUNAS=${RUNAS:-"runas -u $RUNAS_ID"}
else
RUNAS=${RUNAS:-"runas -u $RUNAS_ID -g $RUNAS_GID"}
fi
fi
if [ `using_krb5_sec $SECURITY` == 'y' ] ; then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment