Branch: refs/heads/master
Home: https://github.com/NixOS/nixpkgs
Commit: 74d5adcb4d114e2d159d4ed4a5f0ef35352465a9
https://github.com/NixOS/nixpkgs/commit/74d5adcb4d114e2d159d4ed4a5f0ef35352465a9
Author: Bjørn Forsman <[email protected]>
Date: 2015-06-14 (Sun, 14 Jun 2015)
Changed paths:
M nixos/modules/system/boot/modprobe.nix
Log Message:
-----------
nixos: move environment.{variables => sessionVariables}.MODULE_DIR
This solves the problem that modprobe does not know about $MODULE_DIR
when run via sudo, and instead wrongly tries to read /lib/modules/:
$ sudo strace -efile modprobe foo |& grep modules
open("/lib/modules/3.14.37/modules.softdep", O_RDONLY|O_CLOEXEC) = -1 ENOENT
(No such file or directory)
open("/lib/modules/3.14.37/modules.dep.bin", O_RDONLY|O_CLOEXEC) = -1 ENOENT
(No such file or directory)
open("/lib/modules/3.14.37/modules.dep.bin", O_RDONLY|O_CLOEXEC) = -1 ENOENT
(No such file or directory)
open("/lib/modules/3.14.37/modules.alias.bin", O_RDONLY|O_CLOEXEC) = -1
ENOENT (No such file or directory)
Without this patch, one would have to use sudo -E (preserves environment
vars). But that option is reserved for sudo users with extra rights
(SETENV), so it's not a solution.
environment.sessionVariables are set by PAM, so they are included in the
environment used by sudo.
_______________________________________________
nix-commits mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-commits