Bug 1005041
Summary: | SELinux is preventing /usr/bin/ssh-add from 'connectto' accesses on the unix_stream_socket /tmp/ssh-h6hRzTfjkHPZ/agent.1237. | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Juan Orti <jorti> |
Component: | selinux-policy | Assignee: | Miroslav Grepl <mgrepl> |
Status: | CLOSED EOL | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 19 | CC: | dominick.grift, dwalsh, jorti, lvrabec, mgrepl |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Unspecified | ||
Whiteboard: | abrt_hash:c05280cacbd69e95797b72c91084d8fd24ed5e9529dcff4dbc3004c67553360f | ||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2015-02-18 11:26:16 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Juan Orti
2013-09-06 05:42:02 UTC
What is your output of # ps -efZ |grep unconfined # ps -efZ |grep unconfined staff_u:unconfined_r:unconfined_t:s0 juan 1240 1 0 07:29 ? 00:00:00 ssh-agent staff_u:unconfined_r:unconfined_t:s0 juan 1241 1 0 07:29 ? 00:00:00 gpg-agent --daemon --write-env-file /home/juan/.gnupg/gpg-agent-info staff_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 root 14100 14096 0 10:31 pts/7 00:00:00 /bin-bash staff_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 root 15467 14100 0 11:09 pts/7 00:00:00 ps -efZ staff_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 root 15468 14100 0 11:09 pts/7 00:00:00 grep --color=auto unconfined I launch the agent at reboot with cron, how can I lauch it to run as staff_t? Ok, the problem ssh-agent is running as staff_u:unconfined_r:unconfined_t:s0 Any chance to re-run the agent. On my system $ ps -eZ |grep ssh system_u:system_r:sshd_t:s0-s0:c0.c1023 800 ? 00:00:00 sshd staff_u:staff_r:staff_ssh_agent_t:s0 2741 ? 00:00:00 ssh-agent staff_u:staff_r:ssh_t:s0 4481 pts/1 00:00:00 ssh Now I'm launching ssh-agent from .bashrc and the process is labeled as staff_ssh_agent_t, everything works alright. Why it does not get correctly labeled when launched from the user crontab? Thank you and sorry for the inconveniences. Ok, so it looks your cronjob is not running in the staff_t domain as expected. What does # grep -r crond_t /etc/selinux/targeted/contexts/users/ # grep -r crond_t /etc/selinux/targeted/contexts/users/ /etc/selinux/targeted/contexts/users/guest_u:system_r:crond_t:s0 guest_r:guest_t:s0 /etc/selinux/targeted/contexts/users/root:system_r:crond_t:s0 unconfined_r:unconfined_t:s0 sysadm_r:sysadm_t:s0 staff_r:staff_t:s0 user_r:user_t:s0 /etc/selinux/targeted/contexts/users/staff_u:system_r:crond_t:s0 staff_r:staff_t:s0 /etc/selinux/targeted/contexts/users/unconfined_u:system_r:crond_t:s0 unconfined_r:unconfined_t:s0 /etc/selinux/targeted/contexts/users/user_u:system_r:crond_t:s0 user_r:user_t:s0 /etc/selinux/targeted/contexts/users/xguest_u:system_r:crond_t:s0 xguest_r:xguest_t:s0 It is OK. How does look your configuration with the user crontab? I have in the user crontab: # SSH Agent @reboot umask 0077; rm -f ${HOME}/.ssh/environment; pgrep -U $LOGNAME ssh-agent >/dev/null 2>&1 || ssh-agent | sed 's/^echo/#echo/' > ${HOME}/.ssh/environment */5 * * * * umask 0077; pgrep -U $LOGNAME ssh-agent >/dev/null 2>&1 || ssh-agent | sed 's/^echo/#echo/' > ${HOME}/.ssh/environment This message is a notice that Fedora 19 is now at end of life. Fedora has stopped maintaining and issuing updates for Fedora 19. It is Fedora's policy to close all bug reports from releases that are no longer maintained. Approximately 4 (four) weeks from now this bug will be closed as EOL if it remains open with a Fedora 'version' of '19'. 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 19 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 19 changed to end-of-life (EOL) status on 2015-01-06. Fedora 19 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. |