Bug 757691 - SELinux is preventing /bin/login from 'getattr' accesses on the archivo /home/jairot/.ecryptfs/auto-mount.
Summary: SELinux is preventing /bin/login from 'getattr' accesses on the archivo /home...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 16
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:233a9db8683fc05debe479ff4f1...
Depends On:
Blocks: 773217
TreeView+ depends on / blocked
 
Reported: 2011-11-28 12:10 UTC by Yajo
Modified: 2013-02-13 18:49 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 773217 (view as bug list)
Environment:
Last Closed: 2013-02-13 18:49:45 UTC


Attachments (Terms of Use)
File: description (2.45 KB, text/plain)
2011-11-28 12:10 UTC, Yajo
no flags Details

Description Yajo 2011-11-28 12:10:20 UTC
libreport version: 2.0.7
executable:     /usr/bin/python
hashmarkername: setroubleshoot
kernel:         3.1.2-1.fc16.x86_64
reason:         SELinux is preventing /bin/login from 'getattr' accesses on the archivo /home/jairot/.ecryptfs/auto-mount.
time:           lun 28 nov 2011 13:08:05 CET

description:    Text file, 2506 bytes

Comment 1 Yajo 2011-11-28 12:10:23 UTC
Created attachment 537444 [details]
File: description

Comment 2 Miroslav Grepl 2011-11-28 12:34:21 UTC
Could you try these steps

https://bugzilla.redhat.com/show_bug.cgi?id=712048#c17

Comment 3 Yajo 2011-12-02 21:24:21 UTC
I tried that. After rebooting and logging in, SELinux alert is not showing up, but I keep experiencing the problem described in bug 487088 comment 25, as before doing all this.

sudo sh Descargas/ecrypt/ecrypt.sh jairot
Building and Loading Policy
+ make -f /usr/share/selinux/devel/Makefile
make: No se hace nada para `all'.
+ /usr/sbin/semodule -i ecrypt.pp
/usr/sbin/semodule:  Failed on ecrypt.pp!
+ /sbin/restorecon -R -v /home/jairot
/sbin/restorecon reset /home/jairot/.local/share/Trash/files/fl El esposo que se gana profundo respeto.wtfav context unconfined_u:object_r:user_home_t:s0->unconfined_u:object_r:data_home_t:s0
+ /usr/sbin/semanage fcontext -a -e /home /home/.ecryptfs
+ /sbin/restorecon -R -v /home/.ecrypfs/jairot

$ sudo setsebool -P use_ecryptfs_home_dirs 1
libsemanage.dbase_llist_set: record not found in the database (No such file or directory).
libsemanage.dbase_llist_set: could not set record value (No such file or directory).
Could not change boolean use_ecryptfs_home_dirs
Could not change policy booleans

Comment 4 Miroslav Grepl 2011-12-05 10:44:26 UTC
Are you building it on F16?

Comment 5 Yajo 2011-12-06 08:53:10 UTC
(In reply to comment #4)
> Are you building it on F16?

I'm using the pre-built package from the repository, and I'm on F16.

Comment 6 Miroslav Grepl 2011-12-06 11:27:40 UTC
Ok, strange, I am able to compile/install the policy which I attached. Could you try to do these steps

# cd Descargas/ecrypt
# make -f /usr/share/selinux/devel/Makefile clean
# make -f /usr/share/selinux/devel/Makefile ecrypt.pp
# semodule -i ecrypt.pp


Thank you.

Comment 7 Yajo 2011-12-11 11:51:30 UTC
(In reply to comment #6)
> Ok, strange, I am able to compile/install the policy which I attached. Could
> you try to do these steps
> 
> # cd Descargas/ecrypt
> # make -f /usr/share/selinux/devel/Makefile clean
> # make -f /usr/share/selinux/devel/Makefile ecrypt.pp
> # semodule -i ecrypt.pp
> 
> 
> Thank you.

Done that, rebooted and logged in. Problem persists, wrong files are mounted:

$ ls Private/
ECRYPTFS_FNEK_ENCRYPTED.FWaoDWu.Cjtw6kQaZaymE2xzgJFixN3DB7g.2yCPt2KW5lQvM8YkET2xa---
ECRYPTFS_FNEK_ENCRYPTED.FWaoDWu.Cjtw6kQaZaymE2xzgJFixN3DB7g.F7peVpxgBbAKT3a0xheu8---
ECRYPTFS_FNEK_ENCRYPTED.FWaoDWu.Cjtw6kQaZaymE2xzgJFixN3DB7g.LDT-hNeBlGcNTTFIzS.3nk--
ECRYPTFS_FNEK_ENCRYPTED.FWaoDWu.Cjtw6kQaZaymE2xzgJFixN3DB7g.P8EWIQ-mL6JpIApgeoSZ6U--
ECRYPTFS_FNEK_ENCRYPTED.FWaoDWu.Cjtw6kQaZaymE2xzgJFixN3DB7g.u0YpfWmuur5DXoAXevUgR---
ECRYPTFS_FNEK_ENCRYPTED.FXaoDWu.Cjtw6kQaZaymE2xzgJFixN3DB7g.WHMioUXTw.G9KPVhIFNHzPqKdWovOa8ECkn.yddOPz2-

After doing this, good files are mounted:
$ ecryptfs-umount-private
$ ecryptfs-mount-private

Comment 8 Miroslav Grepl 2011-12-12 11:27:36 UTC
So the "semodule -i ecrypt.pp" command worked without any error? 

If so, you just need to execute these commands

# /sbin/restorecon -R -v /home/jairot
# /usr/sbin/semanage fcontext -a -e /home /home/.ecryptfs
# /sbin/restorecon -R -v /home/.ecrypfs/jairot
# setsebool -P use_ecryptfs_home_dirs 1

and now it should work from the SELinux point of view.

Comment 9 Yajo 2011-12-20 19:16:15 UTC
(In reply to comment #8)
> So the "semodule -i ecrypt.pp" command worked without any error? 
> 
> If so, you just need to execute these commands
> 
> # /sbin/restorecon -R -v /home/jairot
> # /usr/sbin/semanage fcontext -a -e /home /home/.ecryptfs
> # /sbin/restorecon -R -v /home/.ecrypfs/jairot
> # setsebool -P use_ecryptfs_home_dirs 1
> 
> and now it should work from the SELinux point of view.

After doing that, I reboot and wrong files are still mounted, but now after unmounting and mounting again, wrong files keep there. No workaround now...

Comment 10 Miroslav Grepl 2011-12-21 10:40:00 UTC
And are you trying it in permissive mode?

Comment 11 Michal Hlavinka 2011-12-21 11:37:45 UTC
(Talking about comment #7)

what you mean by wrong files mounted?
are just file names not decrypted or even content is not decrypted?
what is "mount" output when you see this problem and what is "mount" output after remount?

Comment 12 Yajo 2011-12-22 14:35:27 UTC
(In reply to comment #10)
> And are you trying it in permissive mode?

I tried, but the results are the same.

(In reply to comment #11)
> are just file names not decrypted or even content is not decrypted?

Both. 

> what you mean by wrong files mounted?
> [...]
> what is "mount" output when you see this problem and what is "mount" output
> after remount?

See here:

$ ls Private/
ECRYPTFS_FNEK_ENCRYPTED.FWaoDWu.Cjtw6kQaZaymE2xzgJFixN3DB7g.2yCPt2KW5lQvM8YkET2xa---
ECRYPTFS_FNEK_ENCRYPTED.FWaoDWu.Cjtw6kQaZaymE2xzgJFixN3DB7g.F7peVpxgBbAKT3a0xheu8---
ECRYPTFS_FNEK_ENCRYPTED.FWaoDWu.Cjtw6kQaZaymE2xzgJFixN3DB7g.LDT-hNeBlGcNTTFIzS.3nk--
ECRYPTFS_FNEK_ENCRYPTED.FWaoDWu.Cjtw6kQaZaymE2xzgJFixN3DB7g.P8EWIQ-mL6JpIApgeoSZ6U--
ECRYPTFS_FNEK_ENCRYPTED.FWaoDWu.Cjtw6kQaZaymE2xzgJFixN3DB7g.u0YpfWmuur5DXoAXevUgR---
ECRYPTFS_FNEK_ENCRYPTED.FXaoDWu.Cjtw6kQaZaymE2xzgJFixN3DB7g.WHMioUXTw.G9KPVhIFNHzPqKdWovOa8ECkn.yddOPz2-

$ mount
fusectl on /sys/fs/fuse/connections type fusectl (rw)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
/dev/sda5 on /home type ext4 (rw)
/dev/sda6 on /boot type ext4 (rw)
/home/jairot/.Private on /home/jairot/Private type ecryptfs (ecryptfs_check_dev_ruid,ecryptfs_cipher=aes,ecryptfs_key_bytes=16,ecryptfs_unlink_sigs,ecryptfs_sig=4f4809770febd99e)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
gvfs-fuse-daemon on /home/jairot/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=jairot)

$ ecryptfs-umount-private 

$ ecryptfs-mount-private 
Enter your login passphrase:
Inserted auth tok with sig [4f4809770febd99e] into the user session keyring

$ ls Private/
ECRYPTFS_FNEK_ENCRYPTED.FWaoDWu.Cjtw6kQaZaymE2xzgJFixN3DB7g.2yCPt2KW5lQvM8YkET2xa---
ECRYPTFS_FNEK_ENCRYPTED.FWaoDWu.Cjtw6kQaZaymE2xzgJFixN3DB7g.F7peVpxgBbAKT3a0xheu8---
ECRYPTFS_FNEK_ENCRYPTED.FWaoDWu.Cjtw6kQaZaymE2xzgJFixN3DB7g.LDT-hNeBlGcNTTFIzS.3nk--
ECRYPTFS_FNEK_ENCRYPTED.FWaoDWu.Cjtw6kQaZaymE2xzgJFixN3DB7g.P8EWIQ-mL6JpIApgeoSZ6U--
ECRYPTFS_FNEK_ENCRYPTED.FWaoDWu.Cjtw6kQaZaymE2xzgJFixN3DB7g.u0YpfWmuur5DXoAXevUgR---
ECRYPTFS_FNEK_ENCRYPTED.FXaoDWu.Cjtw6kQaZaymE2xzgJFixN3DB7g.WHMioUXTw.G9KPVhIFNHzPqKdWovOa8ECkn.yddOPz2-

$ mount
fusectl on /sys/fs/fuse/connections type fusectl (rw)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
/dev/sda5 on /home type ext4 (rw)
/dev/sda6 on /boot type ext4 (rw)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
gvfs-fuse-daemon on /home/jairot/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=jairot)
/home/jairot/.Private on /home/jairot/Private type ecryptfs (ecryptfs_check_dev_ruid,ecryptfs_cipher=aes,ecryptfs_key_bytes=16,ecryptfs_unlink_sigs,ecryptfs_sig=4f4809770febd99e)

Comment 13 Yajo 2011-12-30 14:51:54 UTC
(In reply to comment #6)
> Ok, strange, I am able to compile/install the policy which I attached. Could
> you try to do these steps
> 
> # cd Descargas/ecrypt
> # make -f /usr/share/selinux/devel/Makefile clean
> # make -f /usr/share/selinux/devel/Makefile ecrypt.pp
> # semodule -i ecrypt.pp
> 
> 
> Thank you.


Is there any way to undo what I did in this step?

I need access to my encrypted files...

Comment 14 Miroslav Grepl 2012-01-02 09:20:24 UTC
If you run it in permissive mode then SELinux is not your problem.

Comment 15 Yajo 2012-01-08 09:28:05 UTC
(In reply to comment #14)
> If you run it in permissive mode then SELinux is not your problem.

Then how can I have a clue of where is the problem so I can submit a bug to the right package?

Comment 16 Christian Kujau 2012-06-04 23:55:54 UTC
Isn't this a duplicate of #712048?

Comment 17 Fedora End Of Life 2013-01-16 15:42:03 UTC
This message is a reminder that Fedora 16 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 16. 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 WONTFIX if it remains open with a Fedora 
'version' of '16'.

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 prior to Fedora 16's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 16 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 to click on 
"Clone This Bug" 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

Comment 18 Fedora End Of Life 2013-02-13 18:49:50 UTC
Fedora 16 changed to end-of-life (EOL) status on 2013-02-12. Fedora 16 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.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.