[PATCH] Add a simple test to verify pam_winbind can authenticate a user

Uri Simchoni uri at samba.org
Wed Apr 12 07:37:59 UTC 2017


On 04/12/2017 10:29 AM, Andreas Schneider wrote:
> On Wednesday, 12 April 2017 09:25:02 CEST Uri Simchoni wrote:
>> On 04/10/2017 08:51 AM, Andreas Schneider wrote:
>>> On Saturday, 8 April 2017 19:53:41 CEST Uri Simchoni wrote:
>>>> On 04/05/2017 06:41 PM, Andreas Schneider via samba-technical wrote:
>>>>> Hi,
>>>>>
>>>>> attached is a patch which uses pam_wrapper [1] to add at least a simple
>>>>> test for pam_winbind.
>>>>>
>>>>> I don't have more time to work on that right now. I hope other will help
>>>>> extending it. As you can see a simple PAM test is basically just 3 lines
>>>>> of
>>>>> code.
>>>>>
>>>>>
>>>>> Review and push much appreciated!
>>>>>
>>>>>
>>>>> Thanks,
>>>>>
>>>>> 	Andreas
>>>>>
>>>>> [1] https://cwrap.org/pam_wrapper.html
>>>>
>>>> That landed and broke my build after successful configure because I
>>>> didn't have pam-devel installed.
>>>
>>> Could you try with this patch?
>>>
>>> 	Andreas
>>
>> Nope. still failed. Adding/squashing the attached is one way to go...
>>
>> Thanks,
>> Uri.
> 
> I think this should be a patch on its own.
> 
Well, In that case I can RB+ your patch, and here's the same patch with
a better commit message. It doesn't change behavior a bit, but not in a
surprising manner :)

Thanks,
Uri.
-------------- next part --------------
>From e439401b8b590b4bcdf516160b573158335a51d8 Mon Sep 17 00:00:00 2001
From: Uri Simchoni <uri at samba.org>
Date: Wed, 12 Apr 2017 10:32:39 +0300
Subject: [PATCH v2] build: refuse to build without PAM support if enabled

If PAM support is enabled, refuse to build if the prerequisite
libraries are not in place, instead of silently disabling PAM
support and continuing with the build.

This simplifies inclusion of pam_wrapper in the tree.

Signed-off-by: Uri Simchoni <uri at samba.org>
---
 source3/wscript | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/source3/wscript b/source3/wscript
index 7875368..c526fc5 100644
--- a/source3/wscript
+++ b/source3/wscript
@@ -947,6 +947,10 @@ int i; i = PAM_RADIO_TYPE;
         if use_pam:
             conf.DEFINE('WITH_PAM', 1)
             conf.DEFINE('WITH_PAM_MODULES', 1)
+        else:
+            conf.fatal("PAM support is enabled but prerequisite libraries "
+                       "or headers not found. Use --without-pam to disable "
+                       "PAM support.");
 
     seteuid = False
 
-- 
2.9.3



More information about the samba-technical mailing list