Add a -c option (login shell command) with an error message. (from Edoardo Spadolini)
This commit is contained in:
parent
4d16194de8
commit
d54512a31f
2
README
2
README
|
@ -152,6 +152,7 @@ COMMANDLINE PARAMETERS
|
|||
======================
|
||||
|
||||
-a Ignored.
|
||||
-c Shows error message and exits. (login shell command)
|
||||
-e Ignored.
|
||||
-h Ignored.
|
||||
-i user Autologin and run the register -command hook for "user"
|
||||
|
@ -191,6 +192,7 @@ ERROR CODES
|
|||
11 Cannot run as root: Config file has shed_uid = 0
|
||||
12 Config file has an unrecognized token
|
||||
13 Config file: Negative value not accepted
|
||||
15 dgamelaunch called with -c (login shell command); exited
|
||||
20 No menu defined, or no banner found for menu
|
||||
60 Cannot create a new terminal, or no termcap files.
|
||||
61 Cannot openpty()
|
||||
|
|
|
@ -2719,10 +2719,15 @@ main (int argc, char** argv)
|
|||
|
||||
__progname = basename(strdup(argv[0]));
|
||||
|
||||
while ((c = getopt(argc, argv, "sqh:pi:aeW:SD")) != -1)
|
||||
while ((c = getopt(argc, argv, "c:sqh:pi:aeW:SD")) != -1)
|
||||
{
|
||||
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