]> err.no Git - systemd/commitdiff
refuse to add jobs for names that are not loaded
authorLennart Poettering <lennart@poettering.net>
Wed, 20 Jan 2010 18:20:41 +0000 (19:20 +0100)
committerLennart Poettering <lennart@poettering.net>
Wed, 20 Jan 2010 18:20:41 +0000 (19:20 +0100)
manager.c

index 41124fff8972999aef1b4c580afd238037cac51a..8e1c64a90c12ad1b319c9f7e2739474b203cd57c 100644 (file)
--- a/manager.c
+++ b/manager.c
@@ -511,6 +511,9 @@ static int transaction_add_job_and_dependencies(Manager *m, JobType type, Name *
         assert(type < _JOB_TYPE_MAX);
         assert(name);
 
+        if (name->meta.state != NAME_LOADED)
+                return -EINVAL;
+
         /* First add the job. */
         if (!(ret = transaction_add_one_job(m, type, name, &is_new)))
                 return -ENOMEM;