Stop processing arguments at -c
Original patch by Neil Moore <neil@s-z.org>
This commit is contained in:
parent
4a619dc66e
commit
6435ddc779
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue