]> git.proxmox.com Git - swtpm.git/commitdiff
swtpm_setup.conf: Use /usr/bin/swtpm_localca for create_certs_tool
authorStefan Berger <stefanb@linux.ibm.com>
Thu, 28 Oct 2021 18:06:29 +0000 (14:06 -0400)
committerStefan Berger <stefanb@us.ibm.com>
Thu, 28 Oct 2021 19:14:01 +0000 (15:14 -0400)
swtpm_setup.conf has traditionally pointed to
/usr/share/swtpm/swtpm-localca for create_certs_tool but since
/usr/bin/swtpm_localca is now available, have newly created
config files point to this executable instead.

Since there are possibly many swtpm_setup.conf out there pointing
to /usr/share/swtpm/swtpm-localca, we have to still install
swtm_localca there as well and package it.

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
samples/swtpm_setup.conf.in
src/swtpm_setup/swtpm_setup_conf.h.in
src/swtpm_setup/swtpm_setup_utils.c

index 68d7e6f5cc7a6a9c5a344e577615ad90359e5c49..4256308ce024bdf5099070276f2211b1de59a5db 100644 (file)
@@ -1,4 +1,4 @@
 # Program invoked for creating certificates
-create_certs_tool= @DATAROOTDIR@/swtpm/swtpm-localca
+create_certs_tool= @BINDIR@/swtpm_localca
 create_certs_tool_config = @SYSCONFDIR@/swtpm-localca.conf
 create_certs_tool_options = @SYSCONFDIR@/swtpm-localca.options
index 34e0858c29bb65c418f54654044d4349c2d7131c..137fd70d936deaaca4e21477ff1b79d37350a41f 100644 (file)
@@ -15,6 +15,6 @@
 #define SWTPM_VER_MICRO @SWTPM_VER_MICRO@
 
 #define SYSCONFDIR "@SYSCONFDIR@"
-#define DATAROOTDIR "@DATAROOTDIR@"
+#define BINDIR "@BINDIR@"
 
 #endif /* SWTPM_SETUP_CONF_H */
index 9647693616ce65145640fd876541ee77b6590f00..b343e1627900f6a84ae55ac949ef2446705eecad 100644 (file)
@@ -129,8 +129,8 @@ int create_config_files(gboolean overwrite, gboolean root_flag,
     filedata = g_new0(gchar *, NUM_FILES + 1);
 
     /* setpm_setup.conf */
-    create_certs_tool = g_build_filename(DATAROOTDIR,
-                                         "swtpm", "swtpm-localca", NULL);
+    create_certs_tool = g_build_filename(BINDIR,
+                                         "swtpm_localca", NULL);
     filedata[SWTPM_SETUP_CONF] = g_strdup_printf(
         "create_certs_tool = %s\n"
         "create_certs_tool_config = %s\n"