Bug 132099

Summary: /sbin/start_udev is using /usr/sbin/setfiles
Product: [Fedora] Fedora Reporter: Michal Jaegermann <michal>
Component: udevAssignee: Harald Hoyer <harald>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 3CC: sangu.fedora
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-09-14 12:23:48 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Bug Depends On:    
Bug Blocks: 130887    

Description Michal Jaegermann 2004-09-08 15:44:07 EDT
Description of problem:

When booting with UDEV_TMPFS=yes I see in startup messages:

/sbin/start_udev: line 86: setfiles: command not found

This is not a big surprise as 'setfiles' lives in /usr/sbin
and is not yet available.  Either it has to be moved to /sbin
if it is really necessary on boot or 'start_udev' needs to do
something else.

Version-Release number of selected component (if applicable):
udev-030-20

How reproducible:
Always
Comment 1 Harald Hoyer 2004-09-09 03:34:36 EDT
already fixed... thx!
Comment 2 sangu 2004-09-09 12:23:45 EDT
The same problem happenes in udev-030-23.
Comment 3 Harald Hoyer 2004-09-10 05:12:12 EDT
/sbin/start_udev:

if [ -x /usr/sbin/setfiles
     -a -f /etc/selinux/$SELINUXTYPE/contexts/files/file_contexts ];then
   /usr/sbin/setfiles -q \
    /etc/selinux/$SELINUXTYPE/contexts/files/file_contexts /dev
fi

huh?? cannot be... are you sure this message comes after "Making extra
nodes" ???
Comment 4 sangu 2004-09-10 09:40:53 EDT
cat /sbin/start_udev
[...]
 if [ -f /etc/selinux/config ]; then
                . /etc/selinux/config
                if [ -x /usr/sbin/setfiles -a -f \
                       
/etc/selinux/$SELINUXTYPE/contexts/files/file_contexts ];then
                        /usr/sbin/setfiles -q \
                          
/etc/selinux/$SELINUXTYPE/contexts/files/file_contexts /dev
                fi
        fi
[...]

----
/etc/selinux/config in my linuxbox

cat /etc/selinux/config
# This is a comment field in /etc/sysconfig/selinux
#
# Allowable values are:
#     enforcing  -  enables enforcing mode
#     permissive -  enables permissive mode
#     disabled   -  disables SELinux
SELINUX=disabled

# SELINUXTYPE= can take one of these two values:
#       targeted - Only targeted network daemons are protected.
#       strict - Full SELinux protection.
SELINUXTYPE=strict

Is "/sbin/start_udev" stripts wrong?

SELinux is disabled in my linux box.

Because /sbin/start_udev scripts is checking whether
/etc/selinux/config file is or not, "/sbin/setfiles" file always works.
Comment 5 Michal Jaegermann 2004-09-10 11:50:03 EDT
> huh?? cannot be... are you sure this message comes after 
> "Making extra nodes" ???

I am confused.  This is a question about what and to whom?
The original report simply stated that 'start_udev' calls something
which may be not yet available because /usr partition will be
mounted only later.  Sticking in a call an explicit path is
obviously of no help.
Comment 6 Michal Jaegermann 2004-09-11 14:36:04 EDT
Unless you mean some other version then udev-030-24 which recently
showed up in rawhide this is still broken although possibly in
a different way.  This detail that you are checking now if
' ... -x /usr/sbin/setfiles -a ...' before trying to run it simply
means that file contexts will be not set properly if selinux is
turned on but /usr not mounted yet when this runs. 

'start_udev' should not run anything from /usr under any circumstances.