* Use pam_env to set the PATH for SSH logins. This allows

non-interactive ssh sessions (such as "ssh host command") to work
  properly.  This should probably be used for other kinds of logins as
  well.

svn path=/nixos/trunk/; revision=7799
This commit is contained in:
Eelco Dolstra 2007-01-26 15:32:49 +00:00
parent a1f512ede3
commit b01ef92437
2 changed files with 7 additions and 0 deletions

View File

@ -5,6 +5,10 @@ let
optional = option: file:
if config.get option then [file] else [];
defaultEnv = pkgs.writeText "environment" "
PATH=${systemPath}/bin:${systemPath}/sbin
";
in
import ../helpers/make-etc.nix {
@ -98,6 +102,7 @@ import ../helpers/make-etc.nix {
pkgs.xorg.fontbh100dpi
pkgs.xorg.fontbhlucidatypewriter100dpi
pkgs.ttf_bitstream_vera
pkgs.corefonts
pkgs.freefont_ttf
];
buildInputs = [pkgs.libxslt];
@ -130,6 +135,7 @@ import ../helpers/make-etc.nix {
then pkgs.pam_ldap
else "/no-such-path";
inherit (pkgs.xorg) xauth;
inherit defaultEnv;
};
target = "pam.d/" + program;
}

View File

@ -2,3 +2,4 @@ auth include common-auth
account include common-account
password include common-password
session include common-session
session optional pam_env.so envfile=@defaultEnv@