Bug 1045052 - SELinux is preventing /usr/libexec/nm-l2tp-service from 'rename' accesses on the file /etc/ipsec.secrets. [NEEDINFO]
Summary: SELinux is preventing /usr/libexec/nm-l2tp-service from 'rename' accesses on ...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 20
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:430e0906728d93e79f8b3eed33f...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-19 14:28 UTC by Fabien Archambault
Modified: 2014-01-07 07:51 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-01-07 07:51:31 UTC
Type: ---
mgrepl: needinfo? (marbolangos)


Attachments (Terms of Use)

Description Fabien Archambault 2013-12-19 14:28:20 UTC
Description of problem:
Trying to connect to a VPN L2TP/IPsec.
SELinux is preventing /usr/libexec/nm-l2tp-service from 'rename' accesses on the file /etc/ipsec.secrets.

*****  Plugin restorecon (94.8 confidence) suggests   ************************

If vous souhaitez corriger l'étiquette. 
L'étiquette par défaut de /etc/ipsec.secrets devrait être ipsec_key_file_t.
Then vous pouvez exécuter restorecon.
Do
# /sbin/restorecon -v /etc/ipsec.secrets

*****  Plugin catchall_labels (5.21 confidence) suggests   *******************

If you want to allow nm-l2tp-service to have rename access on the ipsec.secrets file
Then l'étiquette sur /etc/ipsec.secrets doit être modifiée.
Do
# semanage fcontext -a -t FILE_TYPE '/etc/ipsec.secrets'
où FILE_TYPE est l'une des valeurs suivantes : ipsec_key_file_t, l2tpd_var_run_t. 
Puis exécutez : 
restorecon -v '/etc/ipsec.secrets'


*****  Plugin catchall (1.44 confidence) suggests   **************************

If vous pensez que nm-l2tp-service devrait être autorisé à accéder rename sur ipsec.secrets file par défaut.
Then vous devriez rapporter ceci en tant qu'anomalie.
Vous pouvez générer un module de stratégie local pour autoriser cet accès.
Do
autoriser cet accès pour le moment en exécutant :
# grep nm-l2tp-service /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:l2tpd_t:s0
Target Context                system_u:object_r:etc_t:s0
Target Objects                /etc/ipsec.secrets [ file ]
Source                        nm-l2tp-service
Source Path                   /usr/libexec/nm-l2tp-service
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           NetworkManager-l2tp-0.9.8-4.fc20.x86_64
Target RPM Packages           libreswan-3.6-1.fc20.x86_64
Policy RPM                    selinux-policy-3.12.1-106.fc20.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.11.10-301.fc20.x86_64 #1 SMP Thu
                              Dec 5 14:01:17 UTC 2013 x86_64 x86_64
Alert Count                   27
First Seen                    2013-12-18 13:33:01 CET
Last Seen                     2013-12-19 15:26:56 CET
Local ID                      e5ce06e5-74dd-45d4-9731-7579d0248bfa

Raw Audit Messages
type=AVC msg=audit(1387463216.165:617): avc:  denied  { rename } for  pid=2551 comm="nm-l2tp-service" name="ipsec.secrets" dev="sda3" ino=2099652 scontext=system_u:system_r:l2tpd_t:s0 tcontext=system_u:object_r:etc_t:s0 tclass=file


type=SYSCALL msg=audit(1387463216.165:617): arch=x86_64 syscall=rename success=no exit=EACCES a0=4060d5 a1=7fffa738ab40 a2=7fffa738ab57 a3=0 items=0 ppid=1108 pid=2551 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) comm=nm-l2tp-service exe=/usr/libexec/nm-l2tp-service subj=system_u:system_r:l2tpd_t:s0 key=(null)

Hash: nm-l2tp-service,l2tpd_t,etc_t,file,rename

Additional info:
reporter:       libreport-2.1.10
hashmarkername: setroubleshoot
kernel:         3.11.10-301.fc20.x86_64
type:           libreport

Potential duplicate: bug 1011808

Comment 1 Miroslav Grepl 2014-01-07 07:51:31 UTC
Did you try to run

# restorecon -v /etc/ipsec.secrets


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