check integrity of pool code file
authorAndreas Steffen <andreas@strongswan.org>
Mon, 17 Aug 2009 13:46:56 +0000 (15:46 +0200)
committerAndreas Steffen <andreas@strongswan.org>
Mon, 17 Aug 2009 13:46:56 +0000 (15:46 +0200)
src/charon/plugins/sql/pool.c
src/checksum/Makefile.am
src/checksum/checksum_builder.c

index d45c579..ebcc9ad 100644 (file)
@@ -644,6 +644,12 @@ int main(int argc, char *argv[])
        {
                exit(SS_RC_LIBSTRONGSWAN_INTEGRITY);
        }
+       if (lib->integrity &&
+               !lib->integrity->check_file(lib->integrity, "pool", argv[0]))
+       {
+               fprintf(stderr, "integrity check of pool failed\n");
+               exit(SS_RC_DAEMON_INTEGRITY);
+       }
        lib->plugins->load(lib->plugins, IPSEC_PLUGINDIR,
                lib->settings->get_str(lib->settings, "pool.load", PLUGINS));
        
index 8241012..bd42c23 100644 (file)
@@ -28,5 +28,9 @@ if USE_TOOLS
   libs += $(top_builddir)/src/scepclient/.libs/scepclient
 endif
 
+if USE_SQL
+  libs += $(top_builddir)/src/charon/plugins/sql/.libs/pool
+endif
+
 checksum.c : checksum_builder $(libs)
                ./checksum_builder $(libs) > checksum.c
index d6085f8..a713eb5 100644 (file)
@@ -69,6 +69,10 @@ int main(int argc, char* argv[])
                        name = strdup("libstrongswan\",");
                        sname = "library_init";
                }
+               else if (strstr(path, "pool"))
+               {
+                       name = strdup("pool\",");
+               }
                else if (strstr(path, "charon"))
                {
                        name = strdup("charon\",");