From db28ce35357c15a1407eba23715938aa256d120e Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Tue, 4 Feb 2020 14:00:20 -0800 Subject: [PATCH] locate: Clarify mlocate warning message Make it clear that the warning is that updatedb will run as root, not that locate will only run as root. Also explain how to silence the warning. Fixes #30864. Signed-off-by: Anders Kaseorg --- nixos/modules/misc/locate.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/misc/locate.nix b/nixos/modules/misc/locate.nix index 552535c253e6..e78c37a00134 100644 --- a/nixos/modules/misc/locate.nix +++ b/nixos/modules/misc/locate.nix @@ -127,7 +127,7 @@ in { { LOCATE_PATH = cfg.output; }; - warnings = optional (isMLocate && cfg.localuser != null) "mlocate does not support searching as user other than root" + warnings = optional (isMLocate && cfg.localuser != null) "mlocate does not support the services.locate.localuser option; updatedb will run as root. (Silence with services.locate.localuser = null.)" ++ optional (isFindutils && cfg.pruneNames != []) "findutils locate does not support pruning by directory component" ++ optional (isFindutils && cfg.pruneBindMounts) "findutils locate does not support skipping bind mounts";