diff options
| author | Armin Kuster <akuster808@gmail.com> | 2021-04-02 16:08:40 +0000 |
|---|---|---|
| committer | Armin Kuster <akuster808@gmail.com> | 2021-04-12 07:00:47 -0700 |
| commit | 0f79f5aa6792f11f4e7648c949fff61f4e82a556 (patch) | |
| tree | 058af211d17458d1a5f4b65061682e179cb8fd50 | |
| parent | e70a97b5702ce4153a5159f16d7b88f360c3b3ec (diff) | |
| download | meta-security-0f79f5aa6792f11f4e7648c949fff61f4e82a556.tar.gz | |
swtpm: fix check for tscd deamon on host
Found a few places that tscd check was trying to run the hosts.
Signed-off-by: Armin Kuster <akuster808@gmail.com>
| -rw-r--r-- | meta-tpm/recipes-tpm/swtpm/files/oe_configure.patch | 65 | ||||
| -rw-r--r-- | meta-tpm/recipes-tpm/swtpm/swtpm_0.5.2.bb | 1 |
2 files changed, 66 insertions, 0 deletions
diff --git a/meta-tpm/recipes-tpm/swtpm/files/oe_configure.patch b/meta-tpm/recipes-tpm/swtpm/files/oe_configure.patch new file mode 100644 index 0000000..5aee933 --- /dev/null +++ b/meta-tpm/recipes-tpm/swtpm/files/oe_configure.patch | |||
| @@ -0,0 +1,65 @@ | |||
| 1 | Don't check for tscd deamon on host. | ||
| 2 | |||
| 3 | Upstream-Status: OE Specific | ||
| 4 | |||
| 5 | Signed-off-by: Armin Kuster <akuster808@gmail.com> | ||
| 6 | |||
| 7 | Index: git/configure.ac | ||
| 8 | =================================================================== | ||
| 9 | --- git.orig/configure.ac | ||
| 10 | +++ git/configure.ac | ||
| 11 | @@ -179,15 +179,6 @@ AC_SUBST([LIBTPMS_LIBS]) | ||
| 12 | AC_CHECK_LIB(c, clock_gettime, LIBRT_LIBS="", LIBRT_LIBS="-lrt") | ||
| 13 | AC_SUBST([LIBRT_LIBS]) | ||
| 14 | |||
| 15 | -AC_PATH_PROG([TCSD], tcsd) | ||
| 16 | -if test "x$TCSD" = "x"; then | ||
| 17 | - have_tcsd=no | ||
| 18 | - AC_MSG_WARN([tcsd could not be found; typically need it for tss user account and tests]) | ||
| 19 | -else | ||
| 20 | - have_tcsd=yes | ||
| 21 | -fi | ||
| 22 | -AM_CONDITIONAL([HAVE_TCSD], test "$have_tcsd" != "no") | ||
| 23 | - | ||
| 24 | dnl We either need netstat (more common across systems) or 'ss' for test cases | ||
| 25 | AC_PATH_PROG([NETSTAT], [netstat]) | ||
| 26 | if test "x$NETSTAT" = "x"; then | ||
| 27 | @@ -440,23 +431,6 @@ AC_ARG_WITH([tss-group], | ||
| 28 | [TSS_GROUP="tss"] | ||
| 29 | ) | ||
| 30 | |||
| 31 | -case $have_tcsd in | ||
| 32 | -yes) | ||
| 33 | - AC_MSG_CHECKING([whether TSS_USER $TSS_USER is available]) | ||
| 34 | - if ! test $(id -u $TSS_USER); then | ||
| 35 | - AC_MSG_ERROR(["$TSS_USER is not available"]) | ||
| 36 | - else | ||
| 37 | - AC_MSG_RESULT([yes]) | ||
| 38 | - fi | ||
| 39 | - AC_MSG_CHECKING([whether TSS_GROUP $TSS_GROUP is available]) | ||
| 40 | - if ! test $(id -g $TSS_GROUP); then | ||
| 41 | - AC_MSG_ERROR(["$TSS_GROUP is not available"]) | ||
| 42 | - else | ||
| 43 | - AC_MSG_RESULT([yes]) | ||
| 44 | - fi | ||
| 45 | - ;; | ||
| 46 | -esac | ||
| 47 | - | ||
| 48 | AC_SUBST([TSS_USER]) | ||
| 49 | AC_SUBST([TSS_GROUP]) | ||
| 50 | |||
| 51 | Index: git/tests/Makefile.am | ||
| 52 | =================================================================== | ||
| 53 | --- git.orig/tests/Makefile.am | ||
| 54 | +++ git/tests/Makefile.am | ||
| 55 | @@ -83,10 +83,6 @@ TESTS += \ | ||
| 56 | test_tpm2_swtpm_cert \ | ||
| 57 | test_tpm2_swtpm_cert_ecc \ | ||
| 58 | test_tpm2_swtpm_setup_create_cert | ||
| 59 | -if HAVE_TCSD | ||
| 60 | -TESTS += \ | ||
| 61 | - test_tpm2_samples_create_tpmca | ||
| 62 | -endif | ||
| 63 | endif | ||
| 64 | |||
| 65 | EXTRA_DIST=$(TESTS) \ | ||
diff --git a/meta-tpm/recipes-tpm/swtpm/swtpm_0.5.2.bb b/meta-tpm/recipes-tpm/swtpm/swtpm_0.5.2.bb index ab77196..caf99e8 100644 --- a/meta-tpm/recipes-tpm/swtpm/swtpm_0.5.2.bb +++ b/meta-tpm/recipes-tpm/swtpm/swtpm_0.5.2.bb | |||
| @@ -12,6 +12,7 @@ DEPENDS_append = " tpm-tools-native expect-native socat-native python3-pip-nativ | |||
| 12 | SRCREV = "e59c0c1a7b4c8d652dbb280fd6126895a7057464" | 12 | SRCREV = "e59c0c1a7b4c8d652dbb280fd6126895a7057464" |
| 13 | SRC_URI = "git://github.com/stefanberger/swtpm.git;branch=stable-0.5 \ | 13 | SRC_URI = "git://github.com/stefanberger/swtpm.git;branch=stable-0.5 \ |
| 14 | file://ioctl_h.patch \ | 14 | file://ioctl_h.patch \ |
| 15 | file://oe_configure.patch \ | ||
| 15 | " | 16 | " |
| 16 | PE = "1" | 17 | PE = "1" |
| 17 | 18 | ||
