mirror of
https://github.com/sudo-project/sudo.git
synced 2025-09-02 15:25:58 +00:00
Avoid calling dlerror() multiple times since it clear the error
status after printing the error. Problem caused by sudo_warn/sudo_fatal being macros...
This commit is contained in:
@@ -93,7 +93,9 @@ group_plugin_load(char *plugin_info)
|
||||
/* Open plugin and map in symbol. */
|
||||
group_handle = sudo_dso_load(path, SUDO_DSO_LAZY|SUDO_DSO_GLOBAL);
|
||||
if (!group_handle) {
|
||||
sudo_warnx(U_("unable to load %s: %s"), path, sudo_dso_strerror());
|
||||
const char *errstr = sudo_dso_strerror();
|
||||
sudo_warnx(U_("unable to load %s: %s"), path,
|
||||
errstr ? errstr : "unknown error");
|
||||
goto done;
|
||||
}
|
||||
group_plugin = sudo_dso_findsym(group_handle, "group_plugin");
|
||||
|
Reference in New Issue
Block a user