#endif
#include <sys/types.h>
#include <dirent.h>
-#include <strings.h>
+#include <string.h>
#include <syslog.h>
#include <limits.h>
#include <ctype.h>
void DLoader_Init(char *pathname)
{
void *fcn_handle;
- char dl_error[256];
+ char dl_error[SIZ];
DIR *dir;
int i;
struct dirent *dptr;
continue;
snprintf(pathbuf, PATH_MAX, "%s/%s", pathname, dptr->d_name);
-#ifdef RTLD_NOW
- if (!(fcn_handle = dlopen(pathbuf, RTLD_NOW)))
+ lprintf(7, "Initializing %s...\n", pathbuf);
+
+#ifdef RTLD_LAZY
+ if (!(fcn_handle = dlopen(pathbuf, RTLD_LAZY)))
#else /* OpenBSD */
if (!(fcn_handle = dlopen(pathbuf, DL_LAZY)))
#endif
void (*h_command_function) (void) )
{
struct ServiceFunctionHook *newfcn;
- char message[256];
+ char message[SIZ];
newfcn = (struct ServiceFunctionHook *)
mallok(sizeof(struct ServiceFunctionHook));
if (sockpath != NULL) {
newfcn->msock = ig_uds_server(sockpath, config.c_maxsessions);
- sprintf(message, "Unix domain socket %s: ", sockpath);
+ sprintf(message, "Unix domain socket '%s': ", sockpath);
}
else if (tcp_port <= 0) { /* port -1 to disable */
lprintf(7, "Service has been manually disabled, skipping\n");