find_library(json NAMES json-c json)
+IF(UCERT_HOST_BUILD)
+ADD_DEFINITIONS(-DUCERT_HOST_BUILD)
+ENDIF()
+
ADD_EXECUTABLE(ucert ucert.c usign-exec.c)
IF(UCERT_FULL)
ADD_DEFINITIONS(-DUCERT_FULL)
#include "usign.h"
+#ifdef UCERT_HOST_BUILD
+#define USIGN_EXEC "usign"
+#else
#define USIGN_EXEC "/usr/bin/usign"
+#endif
/*
* check for revoker deadlink in pubkeydir
return -1;
case 0:
- if (execv(usign_argv[0], usign_argv))
+ if (
+#ifdef UCERT_HOST_BUILD
+ execvp(usign_argv[0], usign_argv)
+#else
+ execv(usign_argv[0], usign_argv)
+#endif
+ )
return -1;
break;
close(fds[0]);
close(fds[1]);
- if (execv(usign_argv[0], usign_argv))
+ if (
+#ifdef UCERT_HOST_BUILD
+ execvp(usign_argv[0], usign_argv)
+#else
+ execv(usign_argv[0], usign_argv)
+#endif
+ )
return -1;
break;
return -1;
case 0:
- if (execv(usign_argv[0], usign_argv))
+ if (
+#ifdef UCERT_HOST_BUILD
+ execvp(usign_argv[0], usign_argv)
+#else
+ execv(usign_argv[0], usign_argv)
+#endif
+ )
return -1;
break;