Stop processing arguments at -c

Original patch by Neil Moore <neil@s-z.org>
This commit is contained in:
Pasi Kallinen 2015-12-07 18:40:04 +02:00
parent 4a619dc66e
commit 6435ddc779
1 changed files with 6 additions and 6 deletions

View File

@ -2719,15 +2719,15 @@ main (int argc, char** argv)
__progname = basename(strdup(argv[0]));
while ((c = getopt(argc, argv, "c:sqh:pi:aeW:SD")) != -1)
while ((c = getopt(argc, argv, "csqh:pi:aeW:SD")) != -1)
{
/* Stop processing arguments at -c, so that user-provided
* commands (via ssh for example) to the dgamelaunch login
* shell are ignored.
*/
if (c == 'c') break;
switch (c)
{
case 'c':
fprintf(stderr, "This is not a shell account, you can't execute "
"arbitrary commands.\n");
graceful_exit(15);
break;
case 's':
showplayers = 1; break;