adapt pam_winbin.c to deal with later iniparser versions

Noel Power nopower at
Fri Nov 15 10:14:40 MST 2013

Hi Andreas,
On 14/11/13 08:49, Andreas Schneider wrote:
> On Thursday 07 November 2013 10:34:26 Noel Power wrote:
>> I came across another strange pam related issue with the
>> require_membership_of specified flag in pam_winbind.conf with
>> opensuse-12.3 ( and possibly earlier versions ) if you have a blank (
>> e.g. empty ) value like
>>     require_membership_of specified=
>> then pam will refuse to authenticate any user
>> The problem stems from the fact that we use a different ( later )
>> version of iniparser (3.1.5) where the behaviour of iniparser when
>> dealing with blank or non-existing key values is different. This patch
>> works around the problem ( and although strictly not necessary for
>> upstream currently ) and will future proof the code against the eventual
>> upgrade of iniparser. Please review
> Hi Noel,
> thanks for your contribution, but the patch is not sufficient. We have an "in-
> tree" copy of iniparser which needs to be updated.
Sure I know there is an in-tree copy of inparser
>  Also you probably need to 
> check for the function during 'waf configure'. See
> lib/iniparser
> lib/iniparser_build
hmm not sure what you are getting are here, are you suggesting that
instead of implementing a wrapper that I detect the iniparser library
version with configure and explicitly hard code the changes needed in
pam_winbind.c based on the current version of iniparser detected/used?
I don't see what is to be gained doing that, there is no ABI change
here, just a change in the function behaviour, the patch merely provides
a wrapper to adjust newer iniparser behaviour to match the current
intree behaviour, if you are using the intree inparser the wrapper
function works as before and imposes no changes.

If one were to do some #if INI_VER > x.y etc. foo you would have to do
the more of less same thing as the patch does now ( but it would be ugly
) and it is entirely unnecessary as this situation can be resolved ( as
the patch does ) at runtime

but, I am new to this and quite possibly have misunderstood completely
what you mean



More information about the samba-technical mailing list