Skip to content

Commit 7c1aee7

Browse files
committed
Allow httpd get attributes of dirsrv unit files
The commit addresses the following AVC denial: type=PROCTITLE msg=audit(3.10.2024 23:49:42.622:3489) : proctitle=(wsgi:ipa) -DFOREGROUND type=AVC msg=audit(3.10.2024 23:49:42.622:3489) : avc: denied { getattr } for pid=21525 comm=httpd path=/usr/lib/systemd/system/dirsrv@.service dev="vda3" ino=1451794 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:dirsrv_unit_file_t:s0 tclass=file permissive=0 type=SYSCALL msg=audit(3.10.2024 23:49:42.622:3489) : arch=x86_64 syscall=newfstatat success=no exit=EACCES(Operace zamítnuta) a0=AT_FDCWD a1=0x7f3a270cda40 a2=0x7f3a25bfe420 a3=0x0 items=1 ppid=21518 pid=21525 auid=unset uid=988 gid=988 euid=988 suid=988 fsuid=988 egid=988 sgid=988 fsgid=988 tty=(none) ses=unset comm=httpd exe=/usr/sbin/httpd subj=system_u:system_r:httpd_t:s0 key=(null) type=CWD msg=audit(3.10.2024 23:49:42.622:3489) : cwd=/ type=PATH msg=audit(3.10.2024 23:49:42.622:3489) : item=0 name=/usr/lib/systemd/system/dirsrv@.service inode=1451794 dev=fc:03 mode=file,644 ouid=root ogid=root rdev=00:00 obj=system_u:object_r:dirsrv_unit_file_t:s0 nametype=NORMAL cap_fp=none cap_fi=none cap_fe=0 cap_fver=0 cap_frootid=0 Resolves: RHEL-62706
1 parent 07ad942 commit 7c1aee7

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

policy/modules/contrib/apache.te

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -991,6 +991,7 @@ optional_policy(`
991991
')
992992

993993
optional_policy(`
994+
dirsrv_getattr_unit_files(httpd_t)
994995
dirsrv_manage_config(httpd_t)
995996
dirsrv_manage_log(httpd_t)
996997
dirsrv_manage_var_run(httpd_t)

policy/modules/contrib/dirsrv.if

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,23 @@ interface(`dirsrv_systemctl',`
104104
ps_process_pattern($1, dirsrv_t)
105105
')
106106

107+
########################################
108+
## <summary>
109+
## Allow domain to getattr dirsrv unit files.
110+
## </summary>
111+
## <param name="domain">
112+
## <summary>
113+
## Domain allowed to transition.
114+
## </summary>
115+
## </param>
116+
#
117+
interface(`dirsrv_getattr_unit_files',`
118+
gen_require(`
119+
type dirsrv_unit_file_t;
120+
')
107121

122+
allow $1 dirsrv_unit_file_t:file getattr_file_perms;
123+
')
108124

109125
#######################################
110126
## <summary>

0 commit comments

Comments
 (0)