Description of problem: This happened when I installed the NetworkManager ssh vpn plugin and set it to authenticate using password authentication. SELinux is preventing /usr/bin/sshpass from read, write access on the chr_file ptmx. ***** Plugin catchall (100. confidence) suggests ************************** If you believe that sshpass should be allowed read write access on the ptmx chr_file by default. Then you should report this as a bug. You can generate a local policy module to allow this access. Do allow this access for now by executing: # grep sshpass /var/log/audit/audit.log | audit2allow -M mypol # semodule -i mypol.pp Additional Information: Source Context system_u:system_r:NetworkManager_t:s0 Target Context system_u:object_r:ptmx_t:s0 Target Objects ptmx [ chr_file ] Source sshpass Source Path /usr/bin/sshpass Port <Unknown> Host (removed) Source RPM Packages sshpass-1.05-5.fc20.x86_64 Target RPM Packages Policy RPM selinux-policy-3.12.1-119.fc20.noarch Selinux Enabled True Policy Type targeted Enforcing Mode Enforcing Host Name (removed) Platform Linux (removed) 3.12.8-300.fc20.x86_64 #1 SMP Thu Jan 16 01:07:50 UTC 2014 x86_64 x86_64 Alert Count 1 First Seen 2014-01-26 16:37:12 IST Last Seen 2014-01-26 16:37:12 IST Local ID 310ae01b-a968-471d-b902-c975f39cd2b9 Raw Audit Messages type=AVC msg=audit(1390747032.732:337): avc: denied { read write } for pid=6678 comm="sshpass" name="ptmx" dev="devtmpfs" ino=7107 scontext=system_u:system_r:NetworkManager_t:s0 tcontext=system_u:object_r:ptmx_t:s0 tclass=chr_file type=SYSCALL msg=audit(1390747032.732:337): arch=x86_64 syscall=open success=no exit=EACCES a0=3496f7b9d5 a1=2 a2=0 a3=8 items=0 ppid=6666 pid=6678 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) comm=sshpass exe=/usr/bin/sshpass subj=system_u:system_r:NetworkManager_t:s0 key=(null) Hash: sshpass,NetworkManager_t,ptmx_t,chr_file,read,write Additional info: reporter: libreport-2.1.11 hashmarkername: setroubleshoot kernel: 3.12.8-300.fc20.x86_64 type: libreport
Ok, I guess it does work. Could you try to switch to permissive mode to get it working and execute # ausearch -m avc -ts recent
*** Bug 1058027 has been marked as a duplicate of this bug. ***
---- time->Mon Jan 27 13:35:35 2014 type=SYSCALL msg=audit(1390822535.340:244): arch=c000003e syscall=16 success=yes exit=0 a0=3 a1=5401 a2=7fff996d49c0 a3=8 items=0 ppid=7547 pid=7557 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) comm="sshpass" exe="/usr/bin/sshpass" subj=system_u:system_r:NetworkManager_t:s0 key=(null) type=AVC msg=audit(1390822535.340:244): avc: denied { ioctl } for pid=7557 comm="sshpass" path="/dev/ptmx" dev="devtmpfs" ino=134 scontext=system_u:system_r:NetworkManager_t:s0 tcontext=system_u:object_r:ptmx_t:s0 tclass=chr_file ---- time->Mon Jan 27 13:35:35 2014 type=SYSCALL msg=audit(1390822535.339:243): arch=c000003e syscall=2 success=yes exit=3 a0=3496f7b9d5 a1=2 a2=0 a3=8 items=0 ppid=7547 pid=7557 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) comm="sshpass" exe="/usr/bin/sshpass" subj=system_u:system_r:NetworkManager_t:s0 key=(null) type=AVC msg=audit(1390822535.339:243): avc: denied { open } for pid=7557 comm="sshpass" path="/dev/ptmx" dev="devtmpfs" ino=134 scontext=system_u:system_r:NetworkManager_t:s0 tcontext=system_u:object_r:ptmx_t:s0 tclass=chr_file type=AVC msg=audit(1390822535.339:243): avc: denied { read write } for pid=7557 comm="sshpass" name="ptmx" dev="devtmpfs" ino=134 scontext=system_u:system_r:NetworkManager_t:s0 tcontext=system_u:object_r:ptmx_t:s0 tclass=chr_file ---- time->Mon Jan 27 13:35:35 2014 type=SYSCALL msg=audit(1390822535.340:245): arch=c000003e syscall=2 success=yes exit=4 a0=34971bdb80 a1=102 a2=34971b8700 a3=7fd87bb0ba10 items=0 ppid=7547 pid=7557 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) comm="sshpass" exe="/usr/bin/sshpass" subj=system_u:system_r:NetworkManager_t:s0 key=(null) type=AVC msg=audit(1390822535.340:245): avc: denied { open } for pid=7557 comm="sshpass" path="/dev/pts/1" dev="devpts" ino=4 scontext=system_u:system_r:NetworkManager_t:s0 tcontext=system_u:object_r:devpts_t:s0 tclass=chr_file
Does it work with # grep sshpass /var/log/audit/audit.log | audit2allow -M mypol # semodule -i mypol.pp in enforcing mode?
Since this NetworkManager plugin doesn't seem to work even with SELinux in permissive mode, I can't really test if this policy will help. I'm closing this bug as I have no further interest in testing this plugin (I wasted 2 hours trying to get it to work with no success, I don't want to waste any more time on this).
Filed bug 1061365 and since sshpass itself works fine for me in the enforcing mode, I'm reassigning this to the NetworkManager-ssh component.
(In reply to Elad Alfassa from comment #5) > Since this NetworkManager plugin doesn't seem to work even with SELinux in > permissive mode, I can't really test if this policy will help. I'm closing > this bug as I have no further interest in testing this plugin (I wasted 2 > hours trying to get it to work with no success, I don't want to waste any > more time on this). What didn't work?
(In reply to Martin Cermak from comment #6) > Filed bug 1061365 and since sshpass itself works fine for me in the > enforcing mode, I'm reassigning this to the NetworkManager-ssh component. Martin thanks, as said it already has a bug upstream.
This message is a reminder that Fedora 20 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 20. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '20'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 20 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Fedora 20 changed to end-of-life (EOL) status on 2015-06-23. Fedora 20 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.