]> granicus.if.org Git - sudo/commitdiff
Store the debug instance ID for I/O plugins too.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 10 Jul 2017 22:28:10 +0000 (16:28 -0600)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 10 Jul 2017 22:28:10 +0000 (16:28 -0600)
Now iolog_open() is consistent with policy_open().

src/sudo.c

index 5c804ca912bb896b9f0e257954284ec71b191d7c..2d516fde93f7f487a60bd619cbead08a082f8e61 100644 (file)
@@ -1274,7 +1274,11 @@ iolog_open(struct plugin_container *plugin, struct sudo_settings *settings,
            sudo_conversation_printf, plugin_settings, user_info, command_info,
            argc, argv, user_env, plugin->options);
     }
+
+    /* Stash plugin debug instance ID if set in open() function. */
+    plugin->debug_instance = sudo_debug_get_active_instance();
     sudo_debug_set_active_instance(sudo_debug_instance);
+
     debug_return_int(ret);
 }