]> granicus.if.org Git - sudo/commitdiff
In set_default_entry() check for unsupported Defaults type.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 12 Aug 2016 15:37:11 +0000 (09:37 -0600)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 12 Aug 2016 15:37:11 +0000 (09:37 -0600)
plugins/sudoers/defaults.c

index cd3bd31597ba1426898d19c4ec5083139a54ce35..3ac489e7656c6446602f5f3733b47ff6e05fdfde 100644 (file)
@@ -358,6 +358,12 @@ set_default_entry(struct sudo_defs_types *def, const char *val, int op, bool qui
                debug_return_bool(false);
            }
            break;
+       default:
+           if (!quiet) {
+               sudo_warnx(U_("invalid Defaults type 0x%x for option `%s'"),
+                   def->type, def->name);
+           }
+           debug_return_bool(false);
     }
     if (do_callback && def->callback)
        debug_return_bool(def->callback(&def->sd_un));