break;
case TYPE_PATH_PASSWD:
- if (myconfig[ncnf]->passwd) free(myconfig[ncnf]->passwd);
- myconfig[ncnf]->passwd = strdup($3);
+ if (globalconfig.passwd) free(globalconfig.passwd);
+ globalconfig.passwd = strdup($3);
break;
case TYPE_PATH_SAVEFILEFMT:
graceful_exit (114);
}
- fp = fopen (myconfig[0]->passwd, "r");
+ fp = fopen (globalconfig.passwd, "r");
if (!fp)
graceful_exit (106);
freefile ();
readfile (1);
- fp = fopen (myconfig[0]->passwd, "w");
+ fp = fopen (globalconfig.passwd, "w");
if (!fp)
{
sigprocmask(SIG_SETMASK, &oldmask, NULL);
printf("game:'%s'\n", myconfig[userchoice]->game_name);
printf("dglroot:'%s'\n", globalconfig.dglroot);
printf("lockfile:'%s'\n", myconfig[userchoice]->lockfile);
- printf("passwd:'%s'\n", myconfig[userchoice]->passwd);
+ printf("passwd:'%s'\n", globalconfig.passwd);
printf("banner:'%s'\n", globalconfig.banner);
printf("rcfile:'%s'\n", myconfig[userchoice]->rcfile);
printf("spool:'%s'\n", myconfig[userchoice]->spool);
char* game_name;
char* chdir;
char* lockfile;
- char* passwd;
char* rcfile;
char* spool;
char* savefilefmt;
char* shed_group;
uid_t shed_uid;
gid_t shed_gid;
+ char* passwd;
};
/* Global variables */
/* chdir = */ NULL,
/* dglroot = *//* "/dgldir/",*/
/* lockfile = */ "/dgl-lock",
- /* passwd = */ "/dgl-login",
+ /* passwd = */ /*"/dgl-login",*/
/* banner = */ /*"/dgl-banner",*/
/* rcfile = */ NULL, /*"/dgl-default-rcfile",*/
/* spool = */ "/var/mail/",
if (!myconfig[tmp]->game_name) myconfig[tmp]->game_name = defconfig.game_name;
if (!myconfig[tmp]->rcfile) myconfig[tmp]->rcfile = defconfig.rcfile;
if (!myconfig[tmp]->spool) myconfig[tmp]->spool = defconfig.spool;
- if (!myconfig[tmp]->passwd) myconfig[tmp]->passwd = defconfig.passwd;
if (!myconfig[tmp]->lockfile) myconfig[tmp]->lockfile = defconfig.lockfile;
if (!myconfig[tmp]->savefilefmt) myconfig[tmp]->savefilefmt = defconfig.savefilefmt;
if (!myconfig[tmp]->inprogressdir) myconfig[tmp]->inprogressdir = defconfig.inprogressdir;
if (!globalconfig.dglroot) globalconfig.dglroot = "/dgldir/";
if (!globalconfig.banner) globalconfig.banner = "/dgl-banner";
+ if (!globalconfig.passwd) globalconfig.passwd = "/dgl-login";
+
if (!globalconfig.shed_user && globalconfig.shed_uid == (uid_t)-1)
{
struct passwd *pw;