diff options
author | Samuel Mendoza-Jonas <sam@mendozajonas.com> | 2018-06-19 16:33:42 +1000 |
---|---|---|
committer | Samuel Mendoza-Jonas <sam@mendozajonas.com> | 2018-12-03 14:39:57 +1100 |
commit | 5d7f93f2ee09de515e1e474fd752d52590b51793 (patch) | |
tree | e125ada614a82edd27269b873d77a66d99420da0 /configure.ac | |
parent | cfd6bf4f7da1ee71a65f57f28912d43ab757b968 (diff) | |
download | talos-petitboot-5d7f93f2ee09de515e1e474fd752d52590b51793.tar.gz talos-petitboot-5d7f93f2ee09de515e1e474fd752d52590b51793.zip |
lib/crypt: Add helpers for operating on /etc/shadow
Provides helper functions for reading, writing, and checking against
/etc/shadow. The main use case if for authenticating clients against the
"system" password, which is set as the root password.
Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 2bf6e6f..4151b00 100644 --- a/configure.ac +++ b/configure.ac @@ -76,6 +76,27 @@ AC_CHECK_LIB([devmapper], [dm_task_create], [AC_MSG_FAILURE([The libdevmapper development library is required by petitboot. Try installing the package libdevmapper-dev or device-mapper-devel.])] ) +AC_ARG_ENABLE( + [crypt], + [AS_HELP_STRING( + [--enable-crypt], + [Include crypt support to enable password use [default=no]] + )], + [], + [enable_crypt=no] +) +AM_CONDITIONAL([ENABLE_CRYPT], [test "x$enable_crypt" = "xyes"]) +AS_IF([test "x$enable_crypt" = "xyes"], + [AC_DEFINE(CRYPT_SUPPORT, 1, [Enable crypt/password support])], + [] +) +AS_IF([test "x$enable_crypt" = "xyes"], + AC_CHECK_LIB([crypt], [crypt], + [CRYPT_LIBS=-lcrypt], + [AC_MSG_FAILURE([shadow/crypt libs required])] + ) +) + AC_ARG_WITH([fdt], AS_HELP_STRING([--without-fdt], [Build without libfdt (default: no)])) @@ -455,6 +476,7 @@ AS_IF( AC_SUBST([UDEV_LIBS]) AC_SUBST([DEVMAPPER_LIBS]) +AC_SUBST([CRYPT_LIBS]) AC_SUBST([FDT_LIBS]) AC_SUBST([LIBFLASH_LIBS]) AC_SUBST([LIBTOOL_DEPS]) |