From 991b346d4994b4b85981adb35d0dd6e91bedd364 Mon Sep 17 00:00:00 2001 From: Guillaume Cottenceau Date: Mon, 11 Jun 2001 14:46:02 +0000 Subject: have adsl pppoe installation available --- mdk-stage1/ppp/pppd/main.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'mdk-stage1/ppp/pppd/main.c') diff --git a/mdk-stage1/ppp/pppd/main.c b/mdk-stage1/ppp/pppd/main.c index 8789d3b1d..c074938cd 100644 --- a/mdk-stage1/ppp/pppd/main.c +++ b/mdk-stage1/ppp/pppd/main.c @@ -1415,9 +1415,24 @@ device_script(program, in, out, dont_wait) exit(1); } setgid(getgid()); - execl("/bin/sh", "sh", "-c", program, (char *)0); - error("could not exec /bin/sh: %m"); - exit(99); + { + int argc = 0; + char * argv[500]; + char * ptr = program; + while (ptr != NULL) { + argv[argc] = ptr; + argc++; + ptr = strchr(ptr, ' '); + if (ptr) { + ptr[0] = '\0'; + ptr++; + } + } + argv[argc] = NULL; + execv(argv[0], argv); + error("could not exec %s: %m", program); + exit(99); + } /* NOTREACHED */ } -- cgit v1.2.1