All of lore.kernel.org
 help / color / mirror / Atom feed
* [uml-devel] [RFC][PATCH] include /usr/lib/uml in PATH
@ 2006-04-02 17:34 Mattia Dongili
  2006-04-02 18:29 ` Geert Uytterhoeven
  0 siblings, 1 reply; 12+ messages in thread
From: Mattia Dongili @ 2006-04-02 17:34 UTC (permalink / raw)
  To: UML-devel

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

Hello,

some time ago it's been proposed to let uml_net live in /usr/lib/uml to
comply the FHS (I have version 2.3 at hand):

  /usr/lib includes object files, libraries, and internal binaries that
  are not intended to be executed directly by users or shell scripts.

see chapter 4.7.1
The attached patch implements it and keeps backward compatibility.
It's kind of brutal because putenv will wipe any user-defined PATH, if
this is a problem I can provide an improved patch that appends
/usr/lib/uml to the existing PATH. Is this the way to go?

Signed-off-by: Mattia Dongili <malattia@linux.it>
-- 
mattia
:wq!

[-- Attachment #2: 01_uml_net.diff --]
[-- Type: text/plain, Size: 656 bytes --]

--- a/arch/um/os-Linux/helper.c	2006-04-02 16:32:38.340801686 +0200
+++ b/arch/um/os-Linux/helper.c	2006-04-02 16:34:13.454745936 +0200
@@ -22,6 +22,9 @@ struct helper_data {
 	int fd;
 };
 
+/* PATH variable to find uml helpers  installed in FHS compliant locations */
+static char *alt_path = "PATH=:/bin:/usr/bin:/usr/lib/uml"; 
+
 /* Debugging aid, changed only from gdb */
 int helper_pause = 0;
 
@@ -41,6 +44,7 @@ static int helper_child(void *arg)
 	}
 	if(data->pre_exec != NULL)
 		(*data->pre_exec)(data->pre_data);
+	putenv(alt_path);
 	execvp(argv[0], argv);
 	errval = errno;
 	printk("execvp of '%s' failed - errno = %d\n", argv[0], errno);

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2006-04-21 21:19 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-02 17:34 [uml-devel] [RFC][PATCH] include /usr/lib/uml in PATH Mattia Dongili
2006-04-02 18:29 ` Geert Uytterhoeven
2006-04-02 19:54   ` Mattia Dongili
2006-04-04  0:39     ` Blaisorblade
2006-04-05 21:11       ` Mattia Dongili
2006-04-07  6:45         ` Blaisorblade
2006-04-07 16:52           ` Mattia Dongili
2006-04-09 12:52             ` Stefano Melchior
2006-04-19  9:52               ` Blaisorblade
2006-04-19 19:07                 ` Mattia Dongili
2006-04-21 18:34                   ` Blaisorblade
2006-04-21 21:18             ` Blaisorblade

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.