Bug 1575002
| Summary: | chrony commands does not print output to tty on console | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Ravindra Patil <ravpatil> |
| Component: | selinux-policy | Assignee: | Lukas Vrabec <lvrabec> |
| Status: | CLOSED DUPLICATE | QA Contact: | Milos Malik <mmalik> |
| Severity: | high | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 7.5 | CC: | lvrabec, mgrepl, mmalik, plautrba, ssekidde |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2018-05-18 16:46:04 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Ravindra Patil
2018-05-04 14:00:32 UTC
This seems to be a selinux issue, possibly a duplicate of bug #1574418. As a workaround, piping the output through cat works. The issue reported above is about tty, redirecting to file works fine. The output is not printed on the tty (terminal) when executed chrony related commands on the console. The output is blank From console # chronyc tracking # chronyc sources # No output printed on the terminal, commands execute but nothing is printed. If on same console terminal, I redirect output to file, it is written to file fine. # chronyc tracking > /tmp/chrony_tracking # cat /tmp/chrony_tracking Reference ID : 344205B9 (ec2-52-66-5-185.ap-south-1.compute.amazonaws.com) Stratum : 3 Ref time (UTC) : Fri May 04 14:08:41 2018 System time : 0.000000074 seconds fast of NTP time Last offset : -0.000610918 seconds RMS offset : 0.003948574 seconds Frequency : 17.642 ppm fast Residual freq : -0.101 ppm Skew : 1.669 ppm Root delay : 0.092673689 seconds Root dispersion : 0.026519082 seconds Update interval : 64.6 seconds Leap status : Normal Seen in enforcing mode after removing the dontaudit rules:
----
type=PROCTITLE msg=audit(05/11/2018 03:26:48.683:69) : proctitle=chronyc sources
type=SYSCALL msg=audit(05/11/2018 03:26:48.683:69) : arch=ppc64le syscall=execve success=yes exit=0 a0=0x1002e679cd0 a1=0x1002e684170 a2=0x1002e685c60 a3=0x21 items=0 ppid=9474 pid=9507 auid=root uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=1 comm=chronyc exe=/usr/bin/chronyc subj=unconfined_u:unconfined_r:chronyc_t:s0-s0:c0.c1023 key=(null)
type=AVC msg=audit(05/11/2018 03:26:48.683:69) : avc: denied { read write } for pid=9507 comm=chronyc path=/dev/hvc0 dev="devtmpfs" ino=10242 scontext=unconfined_u:unconfined_r:chronyc_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_tty_device_t:s0 tclass=chr_file
type=AVC msg=audit(05/11/2018 03:26:48.683:69) : avc: denied { read write } for pid=9507 comm=chronyc path=/dev/hvc0 dev="devtmpfs" ino=10242 scontext=unconfined_u:unconfined_r:chronyc_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_tty_device_t:s0 tclass=chr_file
type=AVC msg=audit(05/11/2018 03:26:48.683:69) : avc: denied { read write } for pid=9507 comm=chronyc path=/dev/hvc0 dev="devtmpfs" ino=10242 scontext=unconfined_u:unconfined_r:chronyc_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_tty_device_t:s0 tclass=chr_file
type=AVC msg=audit(05/11/2018 03:26:48.683:69) : avc: denied { read write } for pid=9507 comm=chronyc path=/dev/hvc0 dev="devtmpfs" ino=10242 scontext=unconfined_u:unconfined_r:chronyc_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_tty_device_t:s0 tclass=chr_file
----
The audit2allow tool recommends to use 'daemons_use_tty' boolean, but chronyc is not a daemon.
*** This bug has been marked as a duplicate of bug 1574418 *** The 3.13.1-229.el7_6.5 version is newer than 3.13.1-229.el7 version, which means that the latest version of selinux-policy is installed on your machines. |