/*
- * udev-node.c - device node handling
- *
* Copyright (C) 2003 Greg Kroah-Hartman <greg@kroah.com>
- * Copyright (C) 2004 Kay Sievers <kay.sievers@vrfy.org>
+ * Copyright (C) 2004-2006 Kay Sievers <kay.sievers@vrfy.org>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
- * 675 Mass Ave, Cambridge, MA 02139, USA.
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
/* preserve node with already correct numbers, to prevent changing the inode number */
if ((stats.st_mode & S_IFMT) == (mode & S_IFMT) && (stats.st_rdev == devt)) {
info("preserve file '%s', because it has correct dev_t", file);
- selinux_setfilecon(file, udev->dev->kernel_name, stats.st_mode);
+ selinux_setfilecon(file, udev->dev->kernel, stats.st_mode);
goto perms;
}
dbg("already present file '%s' unlinked", file);
create:
- selinux_setfscreatecon(file, udev->dev->kernel_name, mode);
+ selinux_setfscreatecon(file, udev->dev->kernel, mode);
retval = mknod(file, mode, devt);
selinux_resetfscreatecon();
if (retval != 0) {
int i;
int retval = 0;
- selinux_init();
-
snprintf(filename, sizeof(filename), "%s/%s", udev_root, udev->name);
filename[sizeof(filename)-1] = '\0';