From 7b9e5ae8574e3964f83084d647be6d6b00c04761 Mon Sep 17 00:00:00 2001 From: Christoph Lohmann <20h@r-36.net> Date: Fri, 18 May 2012 15:20:43 +0200 Subject: Sanitizing env handling for children and using busbox for scripts. --- nldev.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'nldev.c') diff --git a/nldev.c b/nldev.c index 296de4d..3391ed1 100644 --- a/nldev.c +++ b/nldev.c @@ -231,16 +231,8 @@ main(int argc, char *argv[]) buf[sizeof(buf)-1] = '\0'; while (poll(&fds, 1, -1) > -1) { - unsetenv("ACTION"); - unsetenv("DEVPATH"); - unsetenv("SUBSYSTEM"); - unsetenv("SEQNUM"); - unsetenv("MODALIAS"); - unsetenv("DEVNAME"); - unsetenv("DEVTYPE"); - unsetenv("MAJOR"); - unsetenv("MINOR"); - unsetenv("FIRMWARE"); + clearenv(); + setenv("PATH", "/sbin:/bin", 1); iov.iov_base = &buf; iov.iov_len = sizeof(buf); -- cgit v1.2.3