Add RDEPENDS on audit-python for selinux-python-semanage.

Fixes:
$ semanage fcontext -a -t user_home_t "/web(/.*)?"
Traceback (most recent call last):
  File "/usr/sbin/semanage", line 975, in <module>
    do_parser()
  File "/usr/sbin/semanage", line 947, in do_parser
    args.func(args)
  File "/usr/sbin/semanage", line 329, in handleFcontext
    OBJECT.add(args.file_spec, args.type, args.ftype, args.range, args.seuser)
  File "/usr/lib/python3.9/site-packages/seobject.py", line 2485, in add
    self.__add(target, type, ftype, serange, seuser)
  File "/usr/lib/python3.9/site-packages/seobject.py", line 2481, in __add
    self.mylog.log_change("resrc=fcontext op=add %s ftype=%s 
tcontext=%s:%s:%s:%s"
      % (audit.audit_encode_nv_string("tglob", target, 0), 
ftype_to_audit[ftype],)
NameError: name 'audit' is not defined

Signed-off-by: Yi Zhao <yi.z...@windriver.com>
---
 recipes-security/selinux/selinux-python_3.2.bb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/recipes-security/selinux/selinux-python_3.2.bb 
b/recipes-security/selinux/selinux-python_3.2.bb
index a954676..d130900 100644
--- a/recipes-security/selinux/selinux-python_3.2.bb
+++ b/recipes-security/selinux/selinux-python_3.2.bb
@@ -50,6 +50,7 @@ RDEPENDS:${BPN}-semanage += "\
         python3-xml \
         python3-misc \
         libselinux-python \
+        audit-python \
         ${BPN} \
 "
 RDEPENDS:${BPN}-sepolicy += "\
-- 
2.25.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#55735): https://lists.yoctoproject.org/g/yocto/message/55735
Mute This Topic: https://lists.yoctoproject.org/mt/88210237/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to