#ifdef ENABLE_AUTOLOGIN
struct PurgeList *pptr;
- if ((us->uid != (-1)) && (us->uid != BBSUID)) {
+ if ((us->uid != (-1)) && (us->uid != CTDLUID)) {
if (getpwuid(us->uid) == NULL) {
pptr = (struct PurgeList *)
malloc(sizeof(struct PurgeList));
*/
if (us->timescalled == 0) purge = 1;
+ /* User number 0, as well as any negative user number, is
+ * also impossible.
+ */
+ if (us->usernum < 1L) purge = 1;
+
if (purge == 1) {
pptr = (struct PurgeList *) malloc(sizeof(struct PurgeList));
pptr->next = UserPurgeList;
* last twelve hours. This is usually enough granularity.
*/
now = time(NULL);
- memcpy(&tm, localtime(&now), sizeof(struct tm));
+ localtime_r(&now, &tm);
if (tm.tm_hour != config.c_purge_hour) return;
if ((now - last_purge) < 43200) return;