summaryrefslogtreecommitdiff
path: root/src/firstboot/firstboot.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2019-11-13 23:13:42 +0100
committerLennart Poettering <lennart@poettering.net>2020-01-15 15:26:27 +0100
commit42f3b2f97510ab364717154c01a03f5ddd9541a1 (patch)
tree06849d5179287878f3e53890573fbec197cedd0b /src/firstboot/firstboot.c
parent2ee4b118fa72d1dd119dc7b8915307ed86df5b14 (diff)
downloadsystemd-42f3b2f97510ab364717154c01a03f5ddd9541a1.tar.gz
shared: split out crypt() specific helpers into its own .c/.h in src/shared/
This way we can use libxcrypt specific functionality such as crypt_gensalt() and thus take benefit of the newer algorithms libxcrypt implements. (Also adds support for a new env var $SYSTEMD_CRYPT_PREFIX which may be used to select the hash algorithm to use for libxcrypt.) Also, let's move the weird crypt.h inclusion into libcrypt.h so that there's a single place for it.
Diffstat (limited to 'src/firstboot/firstboot.c')
-rw-r--r--src/firstboot/firstboot.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/src/firstboot/firstboot.c b/src/firstboot/firstboot.c
index 528e6452cf..8001f90d57 100644
--- a/src/firstboot/firstboot.c
+++ b/src/firstboot/firstboot.c
@@ -4,19 +4,6 @@
#include <getopt.h>
#include <unistd.h>
-#if HAVE_CRYPT_H
-/* libxcrypt is a replacement for glibc's libcrypt, and libcrypt might be
- * removed from glibc at some point. As part of the removal, defines for
- * crypt(3) are dropped from unistd.h, and we must include crypt.h instead.
- *
- * Newer versions of glibc (v2.0+) already ship crypt.h with a definition
- * of crypt(3) as well, so we simply include it if it is present. MariaDB,
- * MySQL, PostgreSQL, Perl and some other wide-spread packages do it the
- * same way since ages without any problems.
- */
-# include <crypt.h>
-#endif
-
#include "sd-id128.h"
#include "alloc-util.h"
@@ -28,6 +15,7 @@
#include "fs-util.h"
#include "hostname-util.h"
#include "kbd-util.h"
+#include "libcrypt-util.h"
#include "locale-util.h"
#include "main-func.h"
#include "memory-util.h"