/*
* Back end function to check user accounts for associated Unix accounts
- * which no longer exist.
+ * which no longer exist. (Only relevant for host auth mode.)
*/
void do_uid_user_purge(struct ctdluser *us, void *data) {
-#ifdef ENABLE_AUTOLOGIN
struct PurgeList *pptr;
if ((us->uid != (-1)) && (us->uid != CTDLUID)) {
UserPurgeList = pptr;
}
}
-
-#endif /* ENABLE_AUTOLOGIN */
}
char *transcript = NULL;
lprintf(CTDL_DEBUG, "PurgeUsers() called\n");
-#ifdef ENABLE_AUTOLOGIN
- ForEachUser(do_uid_user_purge, NULL);
-#else
- if (config.c_userpurge > 0) {
- ForEachUser(do_user_purge, NULL);
+
+ if (config.c_auth_mode == 1) {
+ /* host auth mode */
+ ForEachUser(do_uid_user_purge, NULL);
+ }
+ else {
+ /* native auth mode */
+ if (config.c_userpurge > 0) {
+ ForEachUser(do_user_purge, NULL);
+ }
}
-#endif
transcript = malloc(SIZ);
strcpy(transcript, "The following users have been auto-purged:\n");