OpenSSH: add Kerberos support

This commit is contained in:
Christophe Raffalli 2013-06-15 06:40:01 +00:00 committed by Evgeny Egorochkin
parent 77cf3c3e0c
commit 2c089337e7
2 changed files with 16 additions and 6 deletions

View File

@ -1,8 +1,12 @@
{ stdenv, fetchurl, zlib, openssl, perl, libedit, pkgconfig, pam
, etcDir ? null
, hpnSupport ? false
, withKerberos ? false
, kerberos
}:
assert withKerberos -> kerberos != null;
let
hpnSrc = fetchurl {
@ -28,7 +32,9 @@ stdenv.mkDerivation rec {
patches = [ ./locale_archive.patch ];
buildInputs = [ zlib openssl libedit pkgconfig pam ];
buildInputs = [ zlib openssl libedit pkgconfig pam ] ++
(if withKerberos then [ kerberos ] else [])
;
# I set --disable-strip because later we strip anyway. And it fails to strip
# properly when cross building.
@ -39,6 +45,7 @@ stdenv.mkDerivation rec {
--disable-strip
${if pam != null then "--with-pam" else "--without-pam"}
${if etcDir != null then "--sysconfdir=${etcDir}" else ""}
${if withKerberos then "--with-kerberos5=${kerberos}" else ""}
'';
preConfigure =

View File

@ -1420,11 +1420,14 @@ let
opensc_dnie_wrapper = callPackage ../tools/security/opensc-dnie-wrapper { };
openssh = callPackage ../tools/networking/openssh {
openssh =
callPackage ../tools/networking/openssh {
hpnSupport = false;
withKerberos = false;
etcDir = "/etc/ssh";
pam = if stdenv.isLinux then pam else null;
};
openssh_with_kerberos = lowPrio (pkgs.appendToName "with-kerberos" (openssh.override { withKerberos = true; }));
opensp = callPackage ../tools/text/sgml/opensp { };