logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

Re: .udev.tdb ?: msg#00136

Subject: Re: .udev.tdb ?
OK, done.

Here are a few entries from the resulting trace
of calls to restorecon from a clean reboot
with 'enforcing=0'. The first call is the
last one in the trace prior to a number
of calls from udev:

params:/var/run/sm-client.pid
total 4
lrwx------  1 root root 64 Jul 21 07:28 0 -> /dev/pts/0
l-wx------  1 root root 64 Jul 21 07:28 1 -> /root/file
lrwx------  1 root root 64 Jul 21 07:28 2 -> /dev/pts/0
lr-x------  1 root root 64 Jul 21 07:28 3 -> /proc/2423/fd
params:/dev/lp0
total 6
lrwx------  1 root root 64 Jul 21 07:28 0 -> socket:[906]
l-wx------  1 root root 64 Jul 21 07:28 1 -> /root/file
l-wx------  1 root root 64 Jul 21 07:28 2 -> pipe:[914]
lrwx------  1 root root 64 Jul 21 07:28 3 -> socket:[915]
lrwx------  1 root root 64 Jul 21 07:28 4 -> /dev/.udev.tdb
lr-x------  1 root root 64 Jul 21 07:28 5 -> /proc/2446/fd
params:/dev/snd/timer
total 6
lrwx------  1 root root 64 Jul 21 07:28 0 -> socket:[906]
l-wx------  1 root root 64 Jul 21 07:28 1 -> /root/file
l-wx------  1 root root 64 Jul 21 07:28 2 -> pipe:[914]
lrwx------  1 root root 64 Jul 21 07:28 3 -> socket:[915]
lrwx------  1 root root 64 Jul 21 07:28 4 -> /dev/.udev.tdb
lr-x------  1 root root 64 Jul 21 07:28 5 -> /proc/2632/fd
...... (many more)

As you suspected, it looks like udev is
leaving fd 4 (/dev/.udev.tdb) open
across the exec (i.e., has not set
FD_CLOEXEC).

I've bugzilla-ed this here:
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=128304

Thanks for helping track this down.
  tom

Russell Coker wrote:

On Wed, 21 Jul 2004 02:35, Tom London <selinux@xxxxxxxxxxx> wrote:
Yikes.... sorry, but this doesn't look right....
now produces hordes of 'restorecon' avcs....

Jul 20 09:23:46 fedora kernel: audit(1090340592.421:0): avc:  denied  {
read write } for  pid=991 exe=/sbin/restorecon path=/dev/.udev.tdb
dev=hda2 ino=2698913 scontext=system_u:system_r:restorecon_t
tcontext=system_u:object_r:udev_tbl_t tclass=file

udev calls restorecon to set the correct type of a device node it has just created.

restorecon has no business in opening /dev/.udev.tdb and I really doubt that it is doing so. I expect that udev is opening /dev/.udev.tdb, not using fcntl(fd, F_SETFD, FD_CLOEXEC) to set the fd to close on execute, and not calling close(fd) before the exec.

Please file a bugzilla report about this. To assist in tracking it down rename /sbin/restorecon to /sbin/restorecon.orig and put the following shell script in place as /sbin/restorecon:
#!/bin/sh
echo -n params: >> /root/file
for n in $*; do echo -n "$n "; done >> /root/file
echo "" >> /root/file
ls -l /proc/self/fd >> /root/file
exec /sbin/restorecon.orig $*

Run the machine in permissive mode while doing this and don't bother about the AVC messages about not being permitted to write to /root/file.

Jul 20 09:23:47 fedora kernel: audit(1090340600.740:0): avc:  denied  {
unlink } for  pid=1297 exe=/sbin/udev name=microcode dev=hda2
ino=2689375 scontext=system_u:system_r:udev_t
tcontext=system_u:object_r:device_t tclass=lnk_file

allow udev_t device_t:lnk_file create_file_perms;
Add the above policy to allow this.



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
qnx.openqnx.dev...    gcc.libstdc++.c...    solaris.opensol...    information-ret...    misc.misterhous...    web.catalyst.ge...    apache.webservi...    redhat.release....    hardware.lirc/2...    kernel.autofs/2...    technology.sust...    linux.vdr/2003-...    editors.lyx.gen...    org.user-groups...    netbsd.devel.pk...    xdg.devel/2004-...    version-control...    jakarta.slide.d...    debian.packages...    creativecommons...    ports.ppc.embed...    bug-tracking.bu...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation