Original patch by Neil Moore <neil@s-z.org>
__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;