ps: making the libselinux support configurable

Previously the libselinux support was present
in the sources, but disabled with a preprocessor
condition (#if 0).
From now the libselinux support can be enabled with
the --enable-libselinux switch available
in the configuration script. That way is more
flexible than local patches modifying the condition
value from 0 to 1.
This commit is contained in:
Jaromir Capik
2013-08-07 17:52:38 +02:00
parent 26ae657950
commit 5f663aee47
2 changed files with 13 additions and 1 deletions

View File

@ -1282,6 +1282,8 @@ fail:
/****************** FLASK & seLinux security stuff **********************/
// move the bulk of this to libproc sometime
#if !ENABLE_LIBSELINUX
static int pr_context(char *restrict const outbuf, const proc_t *restrict const pp){
char filename[48];
size_t len;
@ -1310,7 +1312,8 @@ fail:
return 1;
}
#if 0
#else
// This needs more study, considering:
// 1. the static linking option (maybe disable this in that case)
// 2. the -z and -Z option issue
@ -1345,6 +1348,7 @@ static int pr_context(char *restrict const outbuf, const proc_t *restrict const
}
return len;
}
#endif