Kevin James wrote:
> Another SuSE-related patch. As SuSE doesn't use SELinux,
> the /usr/sbin/selinuxenabled command isn't there. This patch makes
> is_selinux_enabled return false if it can't find the command.
>
>
> ---
> cobbler/utils.py |    2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/cobbler/utils.py b/cobbler/utils.py
> index 64ad96b..5bbacdd 100644
> --- a/cobbler/utils.py
> +++ b/cobbler/utils.py
> @@ -1228,6 +1228,8 @@ def safe_filter(var):
>         raise CX("Invalid characters found in input")
>
> def is_selinux_enabled():
> +    if not os.path.exists("/usr/sbin/selinuxenabled"):
> +      return False
>      args = "/usr/sbin/selinuxenabled"
>      selinuxenabled = sub_process.call(args,close_fds=True)
>      if selinuxenabled == 0:
>   

Thanks, I'm going to apply this one and then hold the remainder of the 
compatibility patches for the 1.5.X development branch, which will start 
up next week.

--Michael


_______________________________________________
cobbler mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/cobbler

Reply via email to