SE Linux patch(Re: [BusyBox] SE Linux)
Rob Landley
rob at landley.net
Mon May 2 23:47:00 UTC 2005
On Monday 02 May 2005 07:21 pm, Rob Landley wrote:
> Up in the header file or werever:
>
> #ifndef CONFIG_SELINUX
> #define USE_SELINUX 0
> #else
> #define USE_SELINUX 1
> #endif
>
> And then later, you can do some variant of:
>
> void function(blah)
> {
> int use_selinux=0;
>
> if(decision) use_selinux=USE_SELINUX;
>
> if(use_selinux) {
> stuff();
> }
> }
Also, rather than trying to modify use_selinux earlier, you can do:
if (USE_SELINUX && use_selinux) {
}
For similar effect. Still evaluates to a constant at compile time allowing
the compiler's "dead code elimination" pass to spot it.
Rob
More information about the busybox
mailing list