From 897e7f4b094eb84a3f3737310d71ab48da83235b Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Fri, 18 Jun 2010 17:47:17 -0400 Subject: [PATCH] Call set_fqdn() after sudoers has parsed instead of inline as a callback. --HG-- branch : 1.7 --- defaults.c | 4 ---- sudo.c | 3 +++ 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/defaults.c b/defaults.c index daa30019f..67d638e39 100644 --- a/defaults.c +++ b/defaults.c @@ -327,10 +327,6 @@ set_default(var, val, op) return(FALSE); } cur->sd_un.flag = op; - - /* Special action for I_FQDN. Move to own switch if we get more */ - if (num == I_FQDN && op) - set_fqdn(); break; case T_LIST: if (!val) { diff --git a/sudo.c b/sudo.c index e1bc6c3bd..7fecdfc05 100644 --- a/sudo.c +++ b/sudo.c @@ -300,6 +300,9 @@ main(argc, argv, envp) if (!update_defaults(SETDEF_RUNAS)) log_error(NO_STDERR|NO_EXIT, "problem with defaults entries"); + if (def_fqdn) + set_fqdn(); /* deferred until after sudoers is parsed */ + /* Set login class if applicable. */ set_loginclass(sudo_user.pw); -- 2.40.0