Skip to content

Commit 53ab6cf

Browse files
elderingvmcj
authored andcommitted
Add some checks on domjudge_user and runuser.
They should not be the same, and neither should be equal to root, but definitely runuser should not be as it is the unprivileged user that submissions are run as. For domjudge_user there is already a (overridable) check that it is not root. (cherry picked from commit d9c298f)
1 parent 41a958f commit 53ab6cf

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

configure.ac

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,13 @@ else
117117
AC_MSG_RESULT($RUNUSER)
118118
fi
119119

120+
if test "x${DOMJUDGE_USER#"$RUNUSER"}" != "x$DOMJUDGE_USER" ; then
121+
AC_MSG_ERROR([domjudge_user '$DOMJUDGE_USER' cannot match runuser '$RUNUSER'.])
122+
fi
123+
if test "x$RUNUSER" = "xroot" ; then
124+
AC_MSG_ERROR([runuser cannot be root.])
125+
fi
126+
120127
AC_MSG_CHECKING([rungroup])
121128
AC_ARG_WITH([rungroup], [AS_HELP_STRING([--with-rungroup=GROUP],
122129
[Unprivileged group under which to run submissions (default: same as runuser).])], [], [])

0 commit comments

Comments
 (0)