From 49aa5804ed2615101ee4a078fbd05ca1e646098f Mon Sep 17 00:00:00 2001 From: Lengyel Balazs Date: Thu, 18 Jan 2018 22:55:43 +0100 Subject: [PATCH] samba: apply patch mailinglist, which fixes `#ifdef` boundaries http://samba.2283325.n4.nabble.com/Fix-compilation-of-Samba-4-7-4-with-disabled-ADS-td4728041.html --- pkgs/servers/samba/4.x.nix | 1 + ...h-source3__libads__kerberos_keytab.c.patch | 20 +++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 pkgs/servers/samba/patch-source3__libads__kerberos_keytab.c.patch diff --git a/pkgs/servers/samba/4.x.nix b/pkgs/servers/samba/4.x.nix index a0fecc183656..fa910e80dab2 100644 --- a/pkgs/servers/samba/4.x.nix +++ b/pkgs/servers/samba/4.x.nix @@ -30,6 +30,7 @@ stdenv.mkDerivation rec { patches = [ ./4.x-no-persistent-install.patch + ./patch-source3__libads__kerberos_keytab.c.patch ]; buildInputs = diff --git a/pkgs/servers/samba/patch-source3__libads__kerberos_keytab.c.patch b/pkgs/servers/samba/patch-source3__libads__kerberos_keytab.c.patch new file mode 100644 index 000000000000..9f6577c65c14 --- /dev/null +++ b/pkgs/servers/samba/patch-source3__libads__kerberos_keytab.c.patch @@ -0,0 +1,20 @@ +--- old/source3/libads/kerberos_keytab.c 2017-12-23 14:23:53.247467000 +0100 ++++ new/source3/libads/kerberos_keytab.c 2017-12-23 18:57:07.135340000 +0100 +@@ -32,8 +32,6 @@ + + #ifdef HAVE_KRB5 + +-#ifdef HAVE_ADS +- + /* This MAX_NAME_LEN is a constant defined in krb5.h */ + #ifndef MAX_KEYTAB_NAME_LEN + #define MAX_KEYTAB_NAME_LEN 1100 +@@ -85,6 +83,8 @@ + return ret; + } + ++#ifdef HAVE_ADS ++ + /********************************************************************** + Adds a single service principal, i.e. 'host' to the system keytab + ***********************************************************************/