mirror of
https://github.com/paxed/dgamelaunch.git
synced 2025-07-24 22:25:17 +02:00
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]));
|
__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)
|
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':
|
case 's':
|
||||||
showplayers = 1; break;
|
showplayers = 1; break;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user