--- xdg-su.orig 2012-12-05 20:04:08.040808857 +0100 +++ xdg-su 2012-12-05 20:13:42.972761364 +0100 @@ -59,6 +59,8 @@ Options -u user run command as user. The default is to run as root. +-c command + specifies the command to run. It has to be passed in one argument. --help Show command synopsis. --manual @@ -398,6 +400,8 @@ while [ $# -gt 0 ] ; do -u) if [ -z "$1" ] ; then exit_failure_syntax "user argument missing for -u" + elif [ -n "$user" ] ; then + exit_failure_syntax "only one user can be specified" fi user="$1" shift @@ -406,6 +410,8 @@ while [ $# -gt 0 ] ; do -c) if [ -z "$1" ] ; then exit_failure_syntax "command argument missing for -c" + elif [ -n "$cmd" ] ; then + exit_failure_syntax "only one command can be specified" fi cmd="$1" shift