On Tue, May 14, 2013 at 09:09:27AM +0200, 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
Ack and pushed to master.
Please review the patches more carefully next time.