Patchwork [libffi] fix SELinux test

login
register
mail settings
Submitter Anthony Green
Date Aug. 6, 2010, 5:40 a.m.
Message ID <m3sk2sti25.fsf@redhat.com>
Download mbox | patch
Permalink /patch/61068/
State New
Headers show

Comments

Anthony Green - Aug. 6, 2010, 5:40 a.m.
I'm checking in the following libffi patch.

This patch from Evan Phoenix fixes a strncmp test used to determine if
SELinux is running.

Thanks,

AG


2010-07-10  Evan Phoenix  <evan@fallingsnow.net>

	* src/closures.c (selinux_enabled_check): Fix strncmp usage bug.

Patch

Index: libffi/src/closures.c
===================================================================
--- libffi.orig/src/closures.c
+++ libffi/src/closures.c
@@ -146,7 +146,7 @@  selinux_enabled_check (void)
       p = strchr (p + 1, ' ');
       if (p == NULL)
         break;
-      if (strncmp (p + 1, "selinuxfs ", 10) != 0)
+      if (strncmp (p + 1, "selinuxfs ", 10) == 0)
         {
           free (buf);
           fclose (f);