Call set_fqdn() after sudoers has parsed instead of inline as a callback.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 18 Jun 2010 21:47:55 +0000 (17:47 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 18 Jun 2010 21:47:55 +0000 (17:47 -0400)
plugins/sudoers/defaults.c
plugins/sudoers/sudoers.c

index 832c8ad77f390d79df231f0fe9d6fa0eab54a79c..da42a969ecc7aa39d320870b0c8a2c3f577cda89 100644 (file)
@@ -334,10 +334,6 @@ set_default(char *var, char *val, int 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) {
index 0879353ac61a19f9363502c30de97df3d47dba2f..28b28515c0240a0ee5b973abbeba7a15856c562d 100644 (file)
@@ -262,6 +262,9 @@ sudoers_policy_open(unsigned int version, sudo_conv_t conversation,
     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);