Add config file command "chmail" that will ask the user to change his email
git-svn-id: svn://katsu.triplehelix.org/dgamelaunch/trunk@419 db0b04b0-f4d1-0310-9a6d-de3e77497b0e
This commit is contained in:
parent
2d0a128be7
commit
0ee48979db
1
config.l
1
config.l
|
@ -93,6 +93,7 @@ unlink { yylval.i = DGLCMD_UNLINK; return TYPE_DGLCMD1; }
|
|||
setenv { yylval.i = DGLCMD_SETENV; return TYPE_DGLCMD2; }
|
||||
exec { yylval.i = DGLCMD_EXEC; return TYPE_DGLCMD2; }
|
||||
chpasswd { yylval.i = DGLCMD_CHPASSWD; return TYPE_DGLCMD0; }
|
||||
chmail { yylval.i = DGLCMD_CHMAIL; return TYPE_DGLCMD0; }
|
||||
DEFINE { return TYPE_DEFINE_GAME; }
|
||||
|
||||
|
||||
|
|
|
@ -104,6 +104,7 @@ typedef enum
|
|||
DGLCMD_UNLINK, /* unlink foo */
|
||||
DGLCMD_EXEC, /* exec foo bar */
|
||||
DGLCMD_SETENV, /* setenv foo bar */
|
||||
DGLCMD_CHMAIL, /* chmail */
|
||||
DGLCMD_CHPASSWD /* chpasswd */
|
||||
} dglcmd_actions;
|
||||
|
||||
|
|
|
@ -200,6 +200,9 @@ dgl_exec_cmdqueue(struct dg_cmdpart *queue, int game, struct dg_user *me)
|
|||
case DGLCMD_CHPASSWD:
|
||||
if (loggedin) changepw(1);
|
||||
break;
|
||||
case DGLCMD_CHMAIL:
|
||||
if (loggedin) change_email();
|
||||
break;
|
||||
}
|
||||
free(p1);
|
||||
free(p2);
|
||||
|
|
|
@ -76,6 +76,7 @@ lockfile = "/dgl-lock"
|
|||
# setenv "foo "bar" = sets environment variable "foo" to "bar"
|
||||
# exec "foo" "bar" = execute "foo" with "bar" as it's param
|
||||
# chpasswd = do the change password prompting, if logged in
|
||||
# chmail = do the change email prompting, if logged in
|
||||
#
|
||||
# The commands will be done inside the chroot and with the uid and gid
|
||||
# defined above.
|
||||
|
|
Loading…
Reference in New Issue