Red Hat Bugzilla – Bug 1505845
osm_dump_qmap_to_file: cannot create file '/var/log/opensm-subnet.lst
Last modified: 2018-04-10 08:45:39 EDT
Description of problem: I think opensm could use some built-in policy, I needed: require { type var_log_t; type opensm_t; class file { write open }; } #============= opensm_t ============== allow opensm_t var_log_t:file { write open }; maybe more(?) regards Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
Please attach relevant SELinux denials too: # ausearch -m avc -m user_avc -m selinux_err -m user_selinux_err -i -ts today
the system does dozen different things, a snippet: type=SYSCALL msg=audit(24/10/17 11:59:13.001:3249) : arch=x86_64 syscall=open success=no exit=EACCES(Permission denied) a0=0x7f18b49ec8c0 a1=O_WRONLY|O_CREAT|O_TRUNC a2=0666 a3=0x24 items=0 ppid=59040 pid=59042 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=opensm exe=/usr/sbin/opensm subj=system_u:system_r:opensm_t:s0 key=(null) type=AVC msg=audit(24/10/17 11:59:13.001:3249) : avc: denied { open } for pid=59042 comm=opensm path=/var/log/opensm-subnet.lst dev="dm-0" ino=538204637 scontext=system_u:system_r:opensm_t:s0 tcontext=system_u:object_r:var_log_t:s0 tclass=file type=PROCTITLE msg=audit(24/10/17 11:59:13.000:3248) : proctitle=/usr/sbin/opensm -p 1 -g 0x0008f104039a62a2 --subnet_prefix 0xfe80000000000001 type=SYSCALL msg=audit(24/10/17 11:59:13.000:3248) : arch=x86_64 syscall=open success=no exit=EACCES(Permission denied) a0=0x7f8901aac8c0 a1=O_WRONLY|O_CREAT|O_TRUNC a2=0666 a3=0x24 items=0 ppid=59043 pid=59044 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=opensm exe=/usr/sbin/opensm subj=system_u:system_r:opensm_t:s0 key=(null) type=AVC msg=audit(24/10/17 11:59:13.000:3248) : avc: denied { open } for pid=59044 comm=opensm path=/var/log/opensm-subnet.lst dev="dm-0" ino=538204637 scontext=system_u:system_r:opensm_t:s0 tcontext=system_u:object_r:var_log_t:s0 tclass=file type=PROCTITLE msg=audit(24/10/17 11:59:23.000:3262) : proctitle=/usr/sbin/opensm -p 1 -g 0x0008f104039a62a1 --subnet_prefix 0xfe80000000000000 type=SYSCALL msg=audit(24/10/17 11:59:23.000:3262) : arch=x86_64 syscall=open success=no exit=EACCES(Permission denied) a0=0x7f18b49ec8c0 a1=O_WRONLY|O_CREAT|O_TRUNC a2=0666 a3=0x24 items=0 ppid=59040 pid=59042 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=opensm exe=/usr/sbin/opensm subj=system_u:system_r:opensm_t:s0 key=(null) type=AVC msg=audit(24/10/17 11:59:23.000:3262) : avc: denied { open } for pid=59042 comm=opensm path=/var/log/opensm-subnet.lst dev="dm-0" ino=538204637 scontext=system_u:system_r:opensm_t:s0 tcontext=system_u:object_r:var_log_t:s0 tclass=file type=PROCTITLE msg=audit(24/10/17 11:59:23.000:3263) : proctitle=/usr/sbin/opensm -p 1 -g 0x0008f104039a62a2 --subnet_prefix 0xfe80000000000001 type=SYSCALL msg=audit(24/10/17 11:59:23.000:3263) : arch=x86_64 syscall=open success=no exit=EACCES(Permission denied) a0=0x7f8901aac8c0 a1=O_WRONLY|O_CREAT|O_TRUNC a2=0666 a3=0x24 items=0 ppid=59043 pid=59044 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=opensm exe=/usr/sbin/opensm subj=system_u:system_r:opensm_t:s0 key=(null) type=AVC msg=audit(24/10/17 11:59:23.000:3263) : avc: denied { open } for pid=59044 comm=opensm path=/var/log/opensm-subnet.lst dev="dm-0" ino=538204637 scontext=system_u:system_r:opensm_t:s0 tcontext=system_u:object_r:var_log_t:s0 tclass=file type=PROCTITLE msg=audit(24/10/17 11:59:33.004:3336) : proctitle=/usr/sbin/opensm -p 1 -g 0x0008f104039a62a1 --subnet_prefix 0xfe80000000000000 type=SYSCALL msg=audit(24/10/17 11:59:33.004:3336) : arch=x86_64 syscall=open success=no exit=EACCES(Permission denied) a0=0x7f18b49ec8c0 a1=O_WRONLY|O_CREAT|O_TRUNC a2=0666 a3=0x24 items=0 ppid=59040 pid=59042 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=opensm exe=/usr/sbin/opensm subj=system_u:system_r:opensm_t:s0 key=(null) type=AVC msg=audit(24/10/17 11:59:33.004:3336) : avc: denied { open } for pid=59042 comm=opensm path=/var/log/opensm-subnet.lst dev="dm-0" ino=538204637 scontext=system_u:system_r:opensm_t:s0 tcontext=system_u:object_r:var_log_t:s0 tclass=file type=PROCTITLE msg=audit(24/10/17 11:59:33.004:3337) : proctitle=/usr/sbin/opensm -p 1 -g 0x0008f104039a62a2 --subnet_prefix 0xfe80000000000001 type=SYSCALL msg=audit(24/10/17 11:59:33.004:3337) : arch=x86_64 syscall=open success=no exit=EACCES(Permission denied) a0=0x7f8901aac8c0 a1=O_WRONLY|O_CREAT|O_TRUNC a2=0666 a3=0x24 items=0 ppid=59043 pid=59044 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=opensm exe=/usr/sbin/opensm subj=system_u:system_r:opensm_t:s0 key=(null) type=AVC msg=audit(24/10/17 11:59:33.004:3337) : avc: denied { open } for pid=59044 comm=opensm path=/var/log/opensm-subnet.lst dev="dm-0" ino=538204637 scontext=system_u:system_r:opensm_t:s0 tcontext=system_u:object_r:var_log_t:s0 tclass=file type=PROCTITLE msg=audit(24/10/17 11:59:43.003:3339) : proctitle=/usr/sbin/opensm -p 1 -g 0x0008f104039a62a2 --subnet_prefix 0xfe80000000000001 type=SYSCALL msg=audit(24/10/17 11:59:43.003:3339) : arch=x86_64 syscall=open success=no exit=EACCES(Permission denied) a0=0x7f8901aac8c0 a1=O_WRONLY|O_CREAT|O_TRUNC a2=0666 a3=0x24 items=0 ppid=59043 pid=59044 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=opensm exe=/usr/sbin/opensm subj=system_u:system_r:opensm_t:s0 key=(null) type=AVC msg=audit(24/10/17 11:59:43.003:3339) : avc: denied { open } for pid=59044 comm=opensm path=/var/log/opensm-subnet.lst dev="dm-0" ino=538204637 scontext=system_u:system_r:opensm_t:s0 tcontext=system_u:object_r:var_log_t:s0 tclass=file type=PROCTITLE msg=audit(24/10/17 11:59:43.003:3338) : proctitle=/usr/sbin/opensm -p 1 -g 0x0008f104039a62a1 --subnet_prefix 0xfe80000000000000 type=SYSCALL msg=audit(24/10/17 11:59:43.003:3338) : arch=x86_64 syscall=open success=no exit=EACCES(Permission denied) a0=0x7f18b49ec8c0 a1=O_WRONLY|O_CREAT|O_TRUNC a2=0666 a3=0x24 items=0 ppid=59040 pid=59042 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=opensm exe=/usr/sbin/opensm subj=system_u:system_r:opensm_t:s0 key=(null) type=AVC msg=audit(24/10/17 11:59:43.003:3338) : avc: denied { open } for pid=59042 comm=opensm path=/var/log/opensm-subnet.lst dev="dm-0" ino=538204637 scontext=system_u:system_r:opensm_t:s0 tcontext=system_u:object_r:var_log_t:s0 tclass=file
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2018:0763