diff options
-rw-r--r-- | docs/ENVIRONMENT.md | 3 | ||||
-rw-r--r-- | src/shared/cryptsetup-util.c | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/docs/ENVIRONMENT.md b/docs/ENVIRONMENT.md index 534490e0e0..5e15b2ba1d 100644 --- a/docs/ENVIRONMENT.md +++ b/docs/ENVIRONMENT.md @@ -472,7 +472,8 @@ disk images with `--image=` or similar: * `$SYSTEMD_CRYPTSETUP_TOKEN_PATH` – takes a path to a directory in the file system. If specified overrides where libcryptsetup will look for token modules (.so). This is useful for debugging token modules: set this - environment variable to the build directory and you are set. + environment variable to the build directory and you are set. This variable + is only supported when systemd is compiled in developer mode. Various tools that read passwords from the TTY, such as `systemd-cryptenroll` and `homectl`: diff --git a/src/shared/cryptsetup-util.c b/src/shared/cryptsetup-util.c index 19241015fb..ab5764dc10 100644 --- a/src/shared/cryptsetup-util.c +++ b/src/shared/cryptsetup-util.c @@ -72,8 +72,7 @@ int (*sym_crypt_volume_key_keyring)(struct crypt_device *cd, int enable); /* Do this only on new enough compilers that actually support the "symver" attribute. Given this is a debug * feature, let's simply not bother on older compilers */ -#if defined __has_attribute -#if __has_attribute(symver) +#if BUILD_MODE_DEVELOPER && defined(__has_attribute) && __has_attribute(symver) const char *my_crypt_token_external_path(void); /* prototype for our own implementation */ /* We use the "symver" attribute to mark this implementation as the default implementation, and drop the @@ -97,7 +96,6 @@ _public_ const char *my_crypt_token_external_path(void) { return NULL; } #endif -#endif static void cryptsetup_log_glue(int level, const char *msg, void *usrptr) { |