ircd: modules: use LT_MODULE_EXT more consistently

This commit is contained in:
William Pitcock 2016-03-20 05:54:48 -05:00
parent 032ef5ef9e
commit 6cb643f4f9

View file

@ -274,8 +274,8 @@ load_core_modules(int warn)
for (i = 0; core_module_table[i]; i++) for (i = 0; core_module_table[i]; i++)
{ {
snprintf(module_name, sizeof(module_name), "%s/%s", MODPATH, snprintf(module_name, sizeof(module_name), "%s/%s%s", MODPATH,
core_module_table[i]); core_module_table[i], LT_MODULE_EXT);
if(load_a_module(module_name, warn, MAPI_ORIGIN_CORE, 1) == -1) if(load_a_module(module_name, warn, MAPI_ORIGIN_CORE, 1) == -1)
{ {
@ -299,7 +299,6 @@ load_one_module(const char *path, int origin, int coremodule)
char modpath[PATH_MAX]; char modpath[PATH_MAX];
rb_dlink_node *pathst; rb_dlink_node *pathst;
const char *mpath; const char *mpath;
struct stat statbuf; struct stat statbuf;
if (server_state_foreground) if (server_state_foreground)
@ -315,7 +314,7 @@ load_one_module(const char *path, int origin, int coremodule)
{ {
mpath = pathst->data; mpath = pathst->data;
snprintf(modpath, sizeof(modpath), "%s/%s", mpath, path); snprintf(modpath, sizeof(modpath), "%s/%s%s", mpath, path, LT_MODULE_EXT);
if((strstr(modpath, "../") == NULL) && (strstr(modpath, "/..") == NULL)) if((strstr(modpath, "../") == NULL) && (strstr(modpath, "/..") == NULL))
{ {
if(stat(modpath, &statbuf) == 0) if(stat(modpath, &statbuf) == 0)