]> git.ozlabs.org Git - petitboot/blobdiff - discover/kboot-parser.c
Add support for GPG signature enforcement on booted
[petitboot] / discover / kboot-parser.c
index 8572674b982a94f1b49395cb3d504cf67f3f3879..f7f75e07ceae60212f3ccef5cea34d7ed3ef93aa 100644 (file)
@@ -1,4 +1,6 @@
-#define _GNU_SOURCE
+#if defined(HAVE_CONFIG_H)
+#include "config.h"
+#endif
 
 #include <assert.h>
 #include <stdlib.h>
@@ -94,6 +96,12 @@ out_add:
        d_opt->boot_image = create_devpath_resource(d_opt,
                                conf->dc->device, value);
 
+       char* args_sigfile_default = talloc_asprintf(d_opt,
+               "%s.cmdline.sig", value);
+       d_opt->args_sig_file = create_devpath_resource(d_opt,
+                               conf->dc->device, args_sigfile_default);
+       talloc_free(args_sigfile_default);
+
        if (root) {
                opt->boot_args = talloc_asprintf(opt, "root=%s %s", root, args);
                talloc_free(args);