Merge branch 'develop' into 1.2.1-binlog_router_trx

This commit is contained in:
MassimilianoPinto
2015-08-17 12:12:16 +02:00
10 changed files with 270 additions and 60 deletions

View File

@ -85,6 +85,7 @@
#include <ini.h>
#include <sys/wait.h>
#include <sys/prctl.h>
/** for procname */
#if !defined(_GNU_SOURCE)
@ -2218,6 +2219,15 @@ static int set_user(char* user)
pwname->pw_name,errno,strerror(errno));
return rval;
}
if(prctl(PR_GET_DUMPABLE) == 0)
{
if(prctl(PR_SET_DUMPABLE ,1) == -1)
{
printf("Error: Failed to set dumpable flag on for the process '%s': %d %s\n",
pwname->pw_name,errno,strerror(errno));
return -1;
}
}
#ifdef SS_DEBUG
else
{

View File

@ -37,18 +37,6 @@
* @endverbatim
*/
/**
* The hash function we user for storing users.
*
* @param key The key value, i.e. username
* @return The hash key
*/
static int
user_hash(char *key)
{
return (*key + *(key + 1));
}
/**
* Allocate a new users table
*
@ -65,7 +53,7 @@ USERS *rval;
return NULL;
}
if ((rval->data = hashtable_alloc(USERS_HASHTABLE_DEFAULT_SIZE, user_hash, strcmp)) == NULL)
if ((rval->data = hashtable_alloc(USERS_HASHTABLE_DEFAULT_SIZE, simple_str_hash, strcmp)) == NULL)
{
skygw_log_write(LE,"[%s:%d] Error: Memory allocation failed.",__FUNCTION__,__LINE__);
free(rval);