Bug 432357 - SELinux is preventing console-kit-dae (consolekit_t) "unlink" to ./database (var_run_t).
SELinux is preventing console-kit-dae (consolekit_t) "unlink" to ./database (...
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: Daniel Walsh
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2008-02-11 10:25 EST by Matěj Cepl
Modified: 2018-04-11 09:05 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-03-05 17:19:08 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Matěj Cepl 2008-02-11 10:25:32 EST
Description of problem:


SELinux is preventing console-kit-dae (consolekit_t) "unlink" to ./database

Podrobný popis:

[SELinux je v uvolněném režimu, operace by byla odmítnuta, ale byla povolena
kvůli uvolněnému režimu.]

SELinux is preventing console-kit-dae (consolekit_t) "unlink" to ./database
(var_run_t). The SELinux type var_run_t, is a generic type for all files in the
directory and very few processes (SELinux Domains) are allowed to write to this
SELinux type. This type of denial usual indicates a mislabeled file. By default
a file created in a directory has the gets the context of the parent directory,
but SELinux policy has rules about the creation of directories, that say if a
process running in one SELinux Domain (D1) creates a file in a directory with a
particular SELinux File Context (F1) the file gets a different File Context
(F2). The policy usually allows the SELinux Domain (D1) the ability to write,
unlink, and append on (F2). But if for some reason a file (./database) was
created with the wrong context, this domain will be denied. The usual solution
to this problem is to reset the file context on the target file, restorecon -v
'./database'. If the file context does not change from var_run_t, then this is
probably a bug in policy. Please file a bug report
(http://bugzilla.redhat.com/bugzilla/enter_bug.cgi) against the selinux-policy
package. If it does change, you can try your application again to see if it
works. The file context could have been mislabeled by editing the file or moving
the file from a different directory, if the file keeps getting mislabeled, check
the init scripts to see if they are doing something to mislabel the file.

Povolení přístupu:

You can attempt to fix file context by executing restorecon -v './database'

Tento přístup povolí následující příkaz:

restorecon './database'

Další informace:

Kontext zdroje                system_u:system_r:consolekit_t
Kontext cíle                 system_u:object_r:var_run_t
Objekty cíle                 ./database [ file ]
Zdroj                         console-kit-dae
Cesta zdroje                  /usr/sbin/console-kit-daemon
Port                          <Neznámé>
Počítač                    hubmaier.ceplovi.cz
RPM balíčky zdroje          ConsoleKit-0.2.7-1.fc9
RPM balíčky cíle           
RPM politiky                  selinux-policy-3.2.7-1.fc9
Selinux povolen               True
Typ politiky                  targeted
MLS povoleno                  True
Vynucovací režim            Permissive
Název zásuvného modulu     mislabeled_file
Název počítače            hubmaier.ceplovi.cz
Platforma                     Linux hubmaier.ceplovi.cz 2.6.24-17.fc9 #1 SMP Mon
                              Feb 4 18:35:53 EST 2008 x86_64 x86_64
Počet uporoznění           1
Poprvé viděno               Po 11. únor 2008, 10:48:01 CET
Naposledy viděno             Po 11. únor 2008, 10:48:01 CET
Místní ID                   7037886b-34fe-450a-b66e-04394881a916
Čísla řádků              

Původní zprávy auditu      

host=hubmaier.ceplovi.cz type=AVC msg=audit(1202723281.279:4580): avc:  denied 
{ unlink } for  pid=2665 comm="console-kit-dae" name="database" dev=dm-1
ino=197123 scontext=system_u:system_r:consolekit_t:s0
tcontext=system_u:object_r:var_run_t:s0 tclass=file

host=hubmaier.ceplovi.cz type=SYSCALL msg=audit(1202723281.279:4580):
arch=c000003e syscall=82 success=yes exit=0 a0=41785d a1=4178e5 a2=2
a3=32ea56c9d8 items=0 ppid=1 pid=2665 auid=4294967295 uid=0 gid=0 euid=0 suid=0
fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) comm="console-kit-dae"
exe="/usr/sbin/console-kit-daemon" subj=system_u:system_r:consolekit_t:s0 key=(null)

Version-Release number of selected component (if applicable):
Comment 1 Daniel Walsh 2008-02-11 16:22:59 EST
Fixed in selinux-policy-3.2.7-3.fc9
Comment 2 David Zeuthen 2008-02-15 15:47:16 EST
Please file these bugs against selinux-policy in the future. Thanks.
Comment 3 Daniel Walsh 2008-03-05 17:19:08 EST
CLosed as this should be fixed in rawhide.  If this problem persists please
reopen the bugzilla.

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