| Summary: | deja-dup fails with value 30 if called by confined user | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Joachim Katzer <jokatzer> | ||||||
| Component: | deja-dup | Assignee: | Rahul Sundaram <metherid> | ||||||
| Status: | CLOSED WONTFIX | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||
| Severity: | unspecified | Docs Contact: | |||||||
| Priority: | unspecified | ||||||||
| Version: | 14 | CC: | dwalsh, fedora, metherid, mike | ||||||
| Target Milestone: | --- | ||||||||
| Target Release: | --- | ||||||||
| Hardware: | x86_64 | ||||||||
| OS: | Linux | ||||||||
| Whiteboard: | |||||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||||
| Doc Text: | Story Points: | --- | |||||||
| Clone Of: | Environment: | ||||||||
| Last Closed: | 2012-08-16 21:31:54 UTC | Type: | --- | ||||||
| Regression: | --- | Mount Type: | --- | ||||||
| Documentation: | --- | CRM: | |||||||
| Verified Versions: | Category: | --- | |||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||
| Attachments: |
|
||||||||
Dan Walsh, CC'ing you here. Do take a look and let me know what the appropriate way to handle this is. Could you execute # semodule -DB Then try this again and see if there are AVC's reported? Created attachment 500497 [details]
AVCs during login as user_u
Test user name is "test_user_u", user id is 504
Created attachment 500499 [details]
syslog messages during login at the same time
# semodule -B Will turn the dontaudit rules back on. Sadly this did not show the error. Are you sure this is an SELinux issue. I see nothing in the logs concerning this. If you put the machine in permissive mode, does it work? (In reply to comment #6) > Are you sure this is an SELinux issue. Yes > > If you put the machine in permissive mode, does it work? Yes Before I posted this bug report I had already tried to turn dontaudit rules off and to look into the audit files without any idea what could go wrong. May be ~/.gvfs is a special case: "gvfs is not a filesystem it is a memory resident tree representing configuration controls for gnome." It is also not accessible for root. (according to http://forums.fedoraforum.org/showpost.php?p=1439804&postcount=5). Now I think I have found the responsible AVC: type=AVC msg=audit(1305837227.901:97): avc: denied { read write } for pid=2043 comm="fusermount" path="socket:[18540]" dev=sockfs ino=18540 scontext=user_u:user_r:mount_t:s0 tcontext=user_u:user_r:user_t:s0 tclass=unix_stream_socket From this AVC audit2allow has generated following gvfsmount.te file (rule for staff_t manually added by me): module gvfsmount 1.0; require { type mount_t; type user_t; type staff_t; class unix_stream_socket { read write }; } #============= mount_t ============== #!!!! This avc has a dontaudit rule in the current policy allow mount_t user_t:unix_stream_socket { read write }; allow mount_t staff_t:unix_stream_socket { read write }; After a "make -f /usr/share/selinux/devel/Makefile && semodule -i gvfsmount.pp" ~/.gvfs is now created properly and deja-dup is working for confined users user_t and staff_t! I hope the rules are not too general (from a security point of view). I have no problem with that.
Miroslav lets add
allow mount_t $1:unix_stream_socket { read write };
To mount_domtrans_fusermount in RHEL6 and F14, F15
This message is a notice that Fedora 14 is now at end of life. Fedora has stopped maintaining and issuing updates for Fedora 14. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At this time, all open bugs with a Fedora 'version' of '14' have been closed as WONTFIX. (Please note: Our normal process is to give advanced warning of this occurring, but we forgot to do that. A thousand apologies.) Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, feel free to reopen this bug and simply change the 'version' to a later Fedora version. Bug Reporter: Thank you for reporting this issue and we are sorry that we were unable to fix it before Fedora 14 reached 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 to click on "Clone This Bug" (top right of this page) and open it against that version of Fedora. 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. The process we are following is described here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping |
Description of problem: A confined user (e.g. user_u or staff_u) cannot use deja-dup because it fails with exit code 30 and Python exception: Traceback (most recent call last): ... File "/usr/lib64/python2.7/site-packages/duplicity/path.py", line 491, in setdata self.stat = os.lstat(self.name) OSError: [Errno 107] Transport endpoint is not connected: '/home/joachim/.gvfs' Version-Release number of selected component (if applicable): deja-dup-16.1.1-1.fc14.x86_64 gvfs-1.6.6-1.fc14.x86_64 selinux-policy-3.9.7-40.fc14.noarch How reproducible: Always Steps to Reproduce: 1. Create a new user (e.g. test), call "sudo semanage login -a -s user_u test" 2. Login to user "test" via GDM choosing GNOME desktop 3. Call deja-dup, configure and start "backup" Actual results: Failed with Python exception because ~/.gvfs is not accessible. $ ls -ld ~/.gvfs ls: cannot access .gvfs: Transport endpoint is not connected Expected results: Either ~/.gvfs should be accessible by confined user, or deja-dup should not rely on gvfs to work. Additional info: There's no obvious AVC reporting access problem with gvfs. gvfs and deja-dup works for unconfined user.