Remove support for converting plugin.so -> plugin.sl on HP-UX when

plugin.so can not be found.  This was a temporary hack for using
an older (pre 1.8.7) sudoers plugin with a newer sudo front-end.
This commit is contained in:
Todd C. Miller
2015-06-08 13:57:14 -06:00
parent c0fa0e248d
commit 7107ce4d1d
2 changed files with 8 additions and 23 deletions

View File

@@ -103,29 +103,6 @@ sudo_stat_plugin(struct plugin_info *info, char *fullpath,
errno = serrno;
}
}
# ifdef __hpux
/* Try .sl instead of .so on HP-UX for backwards compatibility. */
if (status != 0) {
size_t len = strlen(info->path);
if (len >= 3 && info->path[len - 3] == '.' &&
info->path[len - 2] == 's' && info->path[len - 1] == 'o') {
const char *sopath = info->path;
char *slpath = sudo_estrdup(info->path);
int serrno = errno;
slpath[len - 1] = 'l';
info->path = slpath;
status = sudo_stat_plugin(info, fullpath, pathsize, sb);
if (status == 0) {
sudo_efree((void *)sopath);
} else {
sudo_efree(slpath);
info->path = sopath;
errno = serrno;
}
}
}
# endif /* __hpux */
}
done:
debug_return_int(status);