From: Martin Mares Date: Thu, 3 Jul 2003 09:03:09 +0000 (+0000) Subject: Support for explicit user list. X-Git-Tag: python-dummy-working~475 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=6f3b2de7e371cea4d2b2dc5e7058c48683284657;p=eval.git Support for explicit user list. --- diff --git a/bin/mo-get-users b/bin/mo-get-users index f2ed30f..9e9b2c2 100755 --- a/bin/mo-get-users +++ b/bin/mo-get-users @@ -7,9 +7,17 @@ fi set -e . config -if [ "$1" = --full ] ; then - FORM='$1,$5' +if [ -z "$CT_USER_LIST" ] ; then + if [ "$1" = --full ] ; then + FORM='$1,$5' + else + FORM='$1' + fi + awk -F: = $CT_UID_MIN && \$3 <= $CT_UID_MAX) print $FORM; }" else - FORM='$1' + if [ "$1" = --full ] ; then + cat $CT_USER_LIST + else + cut -d ' ' -f 1 <$CT_USER_LIST + fi fi -awk -F: = $CT_UID_MIN && \$3 <= $CT_UID_MAX) print $FORM; }" diff --git a/config b/config index 9c20211..eea4db1 100644 --- a/config +++ b/config @@ -11,6 +11,10 @@ TEST_USERS="mo-test1 mo-test2" CT_UID_MIN=65100 CT_UID_MAX=65199 +# If the contestants are not present in /etc/passwd on the evaluating machine, +# we need a list of them (usernamefullname). +#CT_USER_LIST=userlist + # Test user for sandboxing TEST_USER=${TEST_USER:mo-test1}