File vixie-cron-4.1-remove_old_system.patch of Package cron

Index: vixie-cron-4.1/database.c
===================================================================
--- vixie-cron-4.1.orig/database.c
+++ vixie-cron-4.1/database.c
@@ -128,7 +128,19 @@ load_database(cron_db *old_db) {
 	 * elements from the old database, reloading elements that have
 	 * actually changed.  Whatever is left in the old database when
 	 * we're done is chaff -- crontabs that disappeared.
+	 * old *system* users are removed uncoditionally, because
+	 * we cannot trust the order in which the files get loaded
 	 */
+	Debug(DLOAD, ("unlinking old *system* base:\n"))
+	for (u = old_db->head;  u != NULL;  u = nu) {
+		nu = u->next;
+		if (strncmp("*system*", u->name, 8) == 0) {
+			Debug(DLOAD, ("\t%s\n", u->name))
+			unlink_user(old_db, u);
+			free_user(u);
+		}
+	}
+
 	new_db.mtime = TMAX(crond_stat.st_mtime,
 			    TMAX(statbuf.st_mtime, syscron_stat.st_mtime));
 	new_db.head = new_db.tail = NULL;
openSUSE Build Service is sponsored by