[SSSD] [PATCH] Fixes compilation without selinux.

Ondrej Kos okos at redhat.com
Tue May 14 09:03:03 UTC 2013


On 05/14/2013 09:09 AM, Lukas Slebodnik wrote:
> On (13/05/13 17:32), Ariel Barria wrote:
>> Hi.
>> only as information.
>> after cloning the repository get this error
>>
>> CC       src/providers/ipa/libsss_ipa_la-ipa_hbac_users.lo
>>   CC       src/providers/ipa/libsss_ipa_la-ipa_hbac_common.lo
>>   CC       src/providers/ipa/libsss_ipa_la-ipa_selinux.lo
>> ../src/providers/ipa/ipa_selinux.c: In function 'write_selinux_login_file':
>> ../src/providers/ipa/ipa_selinux.c:693:5:
>> error: implicit declaration of function 'selinux_policy_root'
>> [-Werror=implicit-function-declaration]
>> ../src/providers/ipa/ipa_selinux.c:693:5:
>> warning: format '%s' expects argument of type 'char *', but argument 3
>> has type 'int' [-Wformat]
>> ../src/providers/ipa/ipa_selinux.c:713:13:
>> error: implicit declaration of function 'selinux_getenforcemode'
>> [-Werror=implicit-function-declaration]
>> ../src/providers/ipa/ipa_selinux.c: In function 'remove_selinux_login_file':
>> ../src/providers/ipa/ipa_selinux.c:778:5:
>> warning: format '%s' expects argument of type 'char *', but argument 3
>> has type 'int' [-Wformat]
>> cc1: some warnings being treated as errors
>> make[2]: *** [src/providers/ipa/libsss_ipa_la-ipa_selinux.lo] Error 1
>>
>> I add #include <selinux/selinux.h>
>>
>> and remove the error
>
> You are right.
> My apologies to all for broken build.
> I should check all kind of combinations
> related conditional build next time.
>
> I am attaching patch witch fixes build with and without selinux.
>
> Header file selinux/selinux.h was removed in commit 245cc346 from file
> ipa_selinux.c, because it breaks build without selinux. But new
> error was introduced. This patch fixes compilation with selinux and include
> header file selinux/selinux.h only if both macros
> exist HAVE_SELINUX and HAVE_SELINUX_LOGIN_DIR.
> Now ipa_selinux.c should be correctly built with and without selinux.
>
> LS
>
>
>
> _______________________________________________
> sssd-devel mailing list
> sssd-devel at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/sssd-devel
>

Hi,

My apologies as well, as I ACKed the patch.
I tested the build without selinux, I should've tested it with selinux 
as well, but I forgot.

Ondra

-- 
Ondrej Kos
Associate Software Engineer
Identity Management
Red Hat Czech



More information about the sssd-devel mailing list