}
| KeyType '=' TYPE_NUMBER {
if (!myconfig)
+ {
myconfig = calloc(1, sizeof(struct dg_config));
+ myconfig->shed_uid = (uid_t)-1;
+ myconfig->shed_gid = (gid_t)-1;
+ }
switch ($1)
{
break;
case TYPE_MAX:
+ set_max = 1; /* XXX XXX */
myconfig->max = $3;
break;
/* max = */ 64000
};
+int set_max = 0; /* XXX */
int loggedin = 0;
char rcfilename[80];
char *chosen_name;
myconfig->shed_gid = defconfig.shed_gid;
}
- if (myconfig->max == -1) myconfig->max = defconfig.max;
+ if (myconfig->max == 0 && !set_max) myconfig->max = defconfig.max;
if (!myconfig->banner) myconfig->banner = defconfig.banner;
if (!myconfig->chroot) myconfig->chroot = defconfig.chroot;
if (!myconfig->nethack) myconfig->nethack = defconfig.nethack;
f_num++;
/* prevent a buffer overrun here */
if (f_num > myconfig->max)
+ {
+ fprintf(stderr,"ERROR: number of users in database exceeds maximum. Exiting.\n");
graceful_exit (109);
+ }
}
if (!nolock)