linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* selinux
@ 2004-04-06 15:15 Harald Hoyer
  0 siblings, 0 replies; only message in thread
From: Harald Hoyer @ 2004-04-06 15:15 UTC (permalink / raw)
  To: linux-hotplug

[-- Attachment #1: Type: text/plain, Size: 133 bytes --]

In extras there is udev_selinux. From where is this supposed to be called?

Attached is a totally untested patch to make it compile.

[-- Attachment #2: udev-024-selinux.patch --]
[-- Type: text/x-patch, Size: 1183 bytes --]

--- udev-024/extras/selinux/Makefile.sel	2004-04-05 17:59:22.640630568 +0200
+++ udev-024/extras/selinux/Makefile	2004-04-05 17:59:48.421711248 +0200
@@ -54,6 +54,7 @@
 
 
 install: all
+	$(INSTALL_PROGRAM) -D $(PROG) $(DESTDIR)$(sbindir)/$(PROG)
 
 uninstall: 
 
--- udev-024/extras/selinux/udev_selinux.c.sel	2004-04-03 00:47:28.000000000 +0200
+++ udev-024/extras/selinux/udev_selinux.c	2004-04-05 17:59:05.962166080 +0200
@@ -12,17 +12,32 @@
 
 #ifdef LOG
 unsigned char logname[LOGNAME_SIZE];
-void log_message(int level, const char *format, ...)
+static int debug;
+void log_message (int level, const char *format, ...)
 {
-	va_list args;
+	va_list	args;
 
-	if (!udev_log)
+	if (!debug && level == LOG_DEBUG)
 		return;
 
-	va_start(args, format);
-	vsyslog(level, format, args);
-	va_end(args);
+	va_start (args, format);
+	{
+		static int logging_init = 0;
+		if (!logging_init) {
+			/*
+			 * klibc does not have LOG_PID.
+			 */
+			snprintf(logname, 32, "udev_selinux[%d]", getpid());
+			openlog (logname, 0, LOG_DAEMON);
+			logging_init = 1;
+		}
+
+		vsyslog(level, format, args);
+	}
+	va_end (args);
+	return;
 }
+
 #endif
 
 void selinux_add_node(char *filename)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-04-06 15:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-06 15:15 selinux Harald Hoyer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).