Skip to content

Commit 4b4d0c2

Browse files
authored
pppd: Make set and unset options privileged (#583)
Since the "set" and "unset" options affect the environment passed to scripts that run as root, and environment variable settings could affect or disrupt the execution of those scripts, these options should be privileged. Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
1 parent 1371451 commit 4b4d0c2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

pppd/options.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,10 +334,10 @@ struct option general_options[] = {
334334

335335
{ "set", o_special, (void *)user_setenv,
336336
"Set user environment variable",
337-
OPT_A2PRINTER | OPT_NOPRINT, (void *)user_setprint },
337+
OPT_A2PRINTER | OPT_NOPRINT | OPT_PRIV, (void *)user_setprint },
338338
{ "unset", o_special, (void *)user_unsetenv,
339339
"Unset user environment variable",
340-
OPT_A2PRINTER | OPT_NOPRINT, (void *)user_unsetprint },
340+
OPT_A2PRINTER | OPT_NOPRINT | OPT_PRIV, (void *)user_unsetprint },
341341

342342
{ "net-init-script", o_string, path_net_init,
343343
"Set pathname of net-init script",

0 commit comments

Comments
 (0)