mirror of
https://github.com/stefanberger/swtpm.git
synced 2025-08-22 19:04:35 +00:00
build-sys: Check whether tss user and group are available
If the tcsd (trousers) is available, TPM 1.2 support should work as well. Typically the tss user and group should be defined at this point, but this may not always be the case, so make sure that this user and group are available on the system. Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
This commit is contained in:
parent
b71a228538
commit
aa88eebe32
18
configure.ac
18
configure.ac
@ -407,6 +407,24 @@ AC_ARG_WITH([tss-group],
|
||||
[TSS_GROUP="$withval"],
|
||||
[TSS_GROUP="tss"]
|
||||
)
|
||||
|
||||
case $have_tcsd in
|
||||
yes)
|
||||
AC_MSG_CHECKING([whether TSS_USER $TSS_USER is available])
|
||||
if ! test $(id -u $TSS_USER); then
|
||||
AC_MSG_ERROR(["$TSS_USER is not available"])
|
||||
else
|
||||
AC_MSG_RESULT([yes])
|
||||
fi
|
||||
AC_MSG_CHECKING([whether TSS_GROUP $TSS_GROUP is available])
|
||||
if ! test $(id -g $TSS_GROUP); then
|
||||
AC_MSG_ERROR(["$TSS_GROUP is not available"])
|
||||
else
|
||||
AC_MSG_RESULT([yes])
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_SUBST([TSS_USER])
|
||||
AC_SUBST([TSS_GROUP])
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user