Simon,
kernel.if of SELinux contains self and I copy attribute and typeattribute
to make ota_client_t accessing self so that
"allow ota_client_t self: capability sys_module" works
---henry
On Fri, Feb 24, 2023 at 8:46 PM Simon Sekidde <ssekidde(a)redhat.com> wrote:
On Thu, Feb 23, 2023 at 12:38 PM Henry Zhang
<henryzhang62(a)gmail.com>
wrote:
> Hi folks,
>
> I meet a tough neverallow problem:
> (neverallow base_typeattr_8 self (capability (sys_module)))
> | <root>
> | allow at
>
/mnt/disk2/henryzhang/sec-4715/connectivity-bsp/build-ctx0700-updater/tmp/work/ctx0700-fsl-linux/refpolicy-mcs/2.20190201-r0/image/var/lib/selinux/mcs/tmp/modules/100/ota_client/cil:678
> | (allow ota_client_t self (capability (net_raw sys_module sys_resource
> mknod)))
>
> The SELinux interface does not contain ota_client_t but file
> usr/share/selinux/devel/include/system/unconfined.if: allow $1
> self:capability ~{ sys_module };
>
> I do not know how to make following worked
> allow ota_client_t self (capability (net_raw sys_module sys_resource
> mknod))
>
Does the ota_client app need these caps? See capabilities(7) or
/usr/include/linux/capability.h
Are you able to manage the app with a confined user like sysadm_u instead?
> Please advise.
>
> Thanks.
>
> ----henry
> _______________________________________________
> selinux mailing list -- selinux(a)lists.fedoraproject.org
> To unsubscribe send an email to selinux-leave(a)lists.fedoraproject.org
> Fedora Code of Conduct:
>
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
> List Guidelines:
https://fedoraproject.org/wiki/Mailing_list_guidelines
> List Archives:
>
https://lists.fedoraproject.org/archives/list/selinux@lists.fedoraproject...
> Do not reply to spam, report it:
>
https://pagure.io/fedora-infrastructure/new_issue
>
--
Simon Sekidde