Re: SETools patch for libselinux-2.3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 5/28/2014 1:04 PM, Sven Vermeulen wrote:
> In libselinux-2.3, the interface of the lsetfilecon_raw function has been
> changed:
> 
> -extern int lsetfilecon_raw(const char *path, security_context_t con);
> +extern int lsetfilecon_raw(const char *path, const char * con);
> 
> The call to lsetfilecon_raw in setools' secmds/replcon.cc needs to be
> updated accordingly, as it otherwise fails during build:
> 
> replcon.cc: In function ‘int replcon_lsetfilecon(const char*, security_context_t)’:
> replcon.cc:73:25: warning: NULL used in arithmetic [-Wpointer-arith]
> replcon.cc:73:25: error: invalid operands of types ‘<unresolved overloaded function type>’ and ‘long int’ to binary ‘operator!=’
> 
> The below patch fixes this (but makes the setools version depend on
> libselinux-2.3 now).
> 
> With thanks to Arfrever Frehtes Taifersar Arahesis for the patch (I worked
> around it first by just calling lsetfilecon_raw directly). Something about
> weakly linked functions...
> 
> 
> Index: secmds/replcon.cc
> ===================================================================
> --- secmds/replcon.cc	(revision 4973)
> +++ secmds/replcon.cc	(working copy)
> @@ -60,7 +60,7 @@
>  	{NULL, 0, NULL, 0}
>  };
>  
> -extern int lsetfilecon_raw(const char *, security_context_t) __attribute__ ((weak));
> +extern int lsetfilecon_raw(const char *, const char *) __attribute__ ((weak));

Unfortunately, this breaks it in the same way if you compile with libselinux < 2.3 with this patch.  The preference would be a patch that allows it to compile with any recent libselinux, rather than requiring libselinux 2.3.

-- 
Chris PeBenito
Tresys Technology, LLC
www.tresys.com | oss.tresys.com

_______________________________________________
Selinux mailing list
Selinux@xxxxxxxxxxxxx
To unsubscribe, send email to Selinux-leave@xxxxxxxxxxxxx.
To get help, send an email containing "help" to Selinux-request@xxxxxxxxxxxxx.





[Index of Archives]     [Selinux Refpolicy]     [Linux SGX]     [Fedora Users]     [Fedora Desktop]     [Yosemite Photos]     [Yosemite Camping]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux