Author: viric
Date: Mon Apr 25 14:40:10 2011
New Revision: 26967
URL: https://svn.nixos.org/websvn/nix/?rev=26967&sc=1
Log:
Making dropbear sessions inherit the PATH
Added:
nixpkgs/trunk/pkgs/tools/networking/dropbear/pass-path.patch
Modified:
nixpkgs/trunk/pkgs/tools/networking/dropbear/default.nix
Modified: nixpkgs/trunk/pkgs/tools/networking/dropbear/default.nix
==============================================================================
--- nixpkgs/trunk/pkgs/tools/networking/dropbear/default.nix Mon Apr 25
13:33:28 2011 (r26966)
+++ nixpkgs/trunk/pkgs/tools/networking/dropbear/default.nix Mon Apr 25
14:40:10 2011 (r26967)
@@ -12,6 +12,12 @@
configureFlags = stdenv.lib.optional enableStatic "LDFLAGS=-static";
+ patches = [
+ # Allow sessions to inherit the PATH from the parent dropbear.
+ # Otherwise they only get the usual /bin:/usr/bin kind of PATH
+ ./pass-path.patch
+ ];
+
buildInputs = [ zlib ];
meta = {
Added: nixpkgs/trunk/pkgs/tools/networking/dropbear/pass-path.patch
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ nixpkgs/trunk/pkgs/tools/networking/dropbear/pass-path.patch Mon Apr
25 14:40:10 2011 (r26967)
@@ -0,0 +1,15 @@
+Allow sessions to inherit the PATH from the parent dropbear.
+
+diff --git a/svr-chansession.c b/svr-chansession.c
+index 23dad8c..9af8e55 100644
+--- a/svr-chansession.c
++++ b/svr-chansession.c
+@@ -878,7 +878,7 @@ static void execchild(void *user_data) {
+ addnewvar("LOGNAME", ses.authstate.pw_name);
+ addnewvar("HOME", ses.authstate.pw_dir);
+ addnewvar("SHELL", get_user_shell());
+- addnewvar("PATH", DEFAULT_PATH);
++ addnewvar("PATH", getenv("PATH"));
+ if (chansess->term != NULL) {
+ addnewvar("TERM", chansess->term);
+ }
_______________________________________________
nix-commits mailing list
[email protected]
http://mail.cs.uu.nl/mailman/listinfo/nix-commits