summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Protsenko <semen.protsenko@linaro.org>2018-05-10 22:54:33 +0300
committerSam Protsenko <semen.protsenko@linaro.org>2018-07-04 17:30:55 +0300
commit1c942b8431268a8f3ec1e44f369a67b258c2d38c (patch)
treee32064b52a0629fc1205bf0f623fd77ff0217302
parent90da8c8f15db2c82aece6e4085aaf9c116d481f2 (diff)
downloadppp-1c942b8431268a8f3ec1e44f369a67b258c2d38c.tar.gz
pppd: Remove obsolete way of receiving args from mtpd
Since encrypted way of passing arguments from mtpd to pppd via environment was removed from mtpd, let's remove it in pppd as well. This reverts commit 1661f734 ("Add support to get information from environment variables"). Change-Id: I53bb2b303bf6fd84546bd7f3bfc4fd35421f457f Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
-rw-r--r--pppd/main.c27
1 files changed, 2 insertions, 25 deletions
diff --git a/pppd/main.c b/pppd/main.c
index 5424e42..09f5a53 100644
--- a/pppd/main.c
+++ b/pppd/main.c
@@ -357,39 +357,16 @@ main(argc, argv)
*/
tty_init();
- progname = *argv;
-
#if defined(__ANDROID__)
{
extern void pppox_init();
pppox_init();
privileged = 1;
}
- {
- char *envargs = getenv("envargs");
- if (envargs) {
- int i;
- /* Decode the arguments in-place and count the number of them.
- * They were hex encoded using [A-P] instead of [0-9A-F]. */
- for (argc = 0, i = 0; envargs[i] && envargs[i + 1]; i += 2) {
- char c = ((envargs[i] - 'A') << 4) + (envargs[i + 1] - 'A');
- if (c == 0) {
- ++argc;
- }
- envargs[i / 2 + 1] = c;
- }
- if (argc == 0 || (argv = malloc(sizeof(char *) * argc)) == NULL) {
- fatal("Failed to parse envargs!");
- }
- for (envargs[0] = 0, i = 0; i < argc; ++envargs) {
- if (envargs[0] == 0) {
- argv[i++] = &envargs[1];
- }
- }
- }
- }
#endif
+ progname = *argv;
+
/*
* Parse, in order, the system options file, the user's options file,
* and the command line arguments.