removed paranoid module checking
This commit is contained in:
@@ -129,15 +129,8 @@ static iterator_t* create_iterator(private_backend_manager_t *this)
|
|||||||
static void load_backends(private_backend_manager_t *this)
|
static void load_backends(private_backend_manager_t *this)
|
||||||
{
|
{
|
||||||
struct dirent* entry;
|
struct dirent* entry;
|
||||||
struct stat stb;
|
|
||||||
DIR* dir;
|
DIR* dir;
|
||||||
|
|
||||||
if (stat(IPSEC_BACKENDDIR, &stb) == -1 || !(stb.st_mode & S_IFDIR))
|
|
||||||
{
|
|
||||||
DBG1(DBG_CFG, "error opening backend modules directory "IPSEC_BACKENDDIR);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
dir = opendir(IPSEC_BACKENDDIR);
|
dir = opendir(IPSEC_BACKENDDIR);
|
||||||
if (dir == NULL)
|
if (dir == NULL)
|
||||||
{
|
{
|
||||||
@@ -157,12 +150,6 @@ static void load_backends(private_backend_manager_t *this)
|
|||||||
|
|
||||||
snprintf(file, sizeof(file), IPSEC_BACKENDDIR"/%s", entry->d_name);
|
snprintf(file, sizeof(file), IPSEC_BACKENDDIR"/%s", entry->d_name);
|
||||||
|
|
||||||
if (stat(file, &stb) == -1 || !(stb.st_mode & S_IFREG))
|
|
||||||
{
|
|
||||||
DBG2(DBG_CFG, " skipping %s, doesn't look like a file",
|
|
||||||
entry->d_name);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
ending = entry->d_name + strlen(entry->d_name) - 3;
|
ending = entry->d_name + strlen(entry->d_name) - 3;
|
||||||
if (ending <= entry->d_name || !streq(ending, ".so"))
|
if (ending <= entry->d_name || !streq(ending, ".so"))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -608,15 +608,8 @@ static status_t unroute(interface_manager_t *this, u_int32_t reqid,
|
|||||||
static void load_interfaces(private_interface_manager_t *this)
|
static void load_interfaces(private_interface_manager_t *this)
|
||||||
{
|
{
|
||||||
struct dirent* entry;
|
struct dirent* entry;
|
||||||
struct stat stb;
|
|
||||||
DIR* dir;
|
DIR* dir;
|
||||||
|
|
||||||
if (stat(IPSEC_INTERFACEDIR, &stb) == -1 || !(stb.st_mode & S_IFDIR))
|
|
||||||
{
|
|
||||||
DBG1(DBG_CFG, "error opening interface modules directory "IPSEC_INTERFACEDIR);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
dir = opendir(IPSEC_INTERFACEDIR);
|
dir = opendir(IPSEC_INTERFACEDIR);
|
||||||
if (dir == NULL)
|
if (dir == NULL)
|
||||||
{
|
{
|
||||||
@@ -636,12 +629,6 @@ static void load_interfaces(private_interface_manager_t *this)
|
|||||||
|
|
||||||
snprintf(file, sizeof(file), IPSEC_INTERFACEDIR"/%s", entry->d_name);
|
snprintf(file, sizeof(file), IPSEC_INTERFACEDIR"/%s", entry->d_name);
|
||||||
|
|
||||||
if (stat(file, &stb) == -1 || !(stb.st_mode & S_IFREG))
|
|
||||||
{
|
|
||||||
DBG2(DBG_CFG, " skipping %s, doesn't look like a file",
|
|
||||||
entry->d_name);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
ending = entry->d_name + strlen(entry->d_name) - 3;
|
ending = entry->d_name + strlen(entry->d_name) - 3;
|
||||||
if (ending <= entry->d_name || !streq(ending, ".so"))
|
if (ending <= entry->d_name || !streq(ending, ".so"))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user