[PATCH v7 1/4] elf: Cleanup and improve tst-execstack

Florian Weimer fweimer@redhat.com
Mon Dec 30 17:08:26 GMT 2024


* Adhemerval Zanella:

> +static bool
> +check_selinux (void)
> +{
> +  /* Old Red Hat like systems.  */
> +  enum selinux_status r =
> +    check_selinux_generic ("/selinux/enforce",
> +			   "/selinux/booleans/allow_execstack");
> +  if (r == SELINUX_NOT_PRESENT)
> +    /* New Red Hard like systems.  */
> +    r = check_selinux_generic ("/sys/fs/selinux/enforce",
> +			       "/sys/fs/selinux/booleans/selinuxuser_execstack");
> +  return r == SELINUX_NOT_PRESENT || r == SELINUX_EXECSTACK_ENABLE;
> +}

Typo: Red Ha[t]

I think this isn't quite right.  The path prefix (selinuxfs mount point)
is independent of the policy style.  The reference policy
<https://github.com/SELinuxProject/refpolicy> still uses allow_execstack
in its most recent versions.  Only the Fedora policy
<https://github.com/fedora-selinux/selinux-policy> uses
selinuxuser_execstack.

Rest of the changes look okay.

Thanks,
Florian



More information about the Libc-alpha mailing list