Signed-off-by: INSUN PYO <insun.pyo@samsung.com>
Change-Id: I4c97fe67a8d4771b0e0fc8ca56e7b7d235f334aa
struct passwd *pwent = NULL;
struct passwd buf_pwent;
gchar *buf = NULL, *tmp = NULL, *pw_name = NULL;
struct passwd *pwent = NULL;
struct passwd buf_pwent;
gchar *buf = NULL, *tmp = NULL, *pw_name = NULL;
- gsize size = sysconf(_SC_GETPW_R_SIZE_MAX);
- if (size <= sizeof(struct passwd))
+ gsize size;
+ glong pw_size_max = sysconf(_SC_GETPW_R_SIZE_MAX);
+ if (pw_size_max <= sizeof(struct passwd))
+ else
+ size = pw_size_max;
for (; NULL != (tmp = realloc(buf, size)); size*=2)
{
for (; NULL != (tmp = realloc(buf, size)); size*=2)
{
__uid_t pw_uid = -1;
int ret = -1;
gchar *buf = NULL, *tmp = NULL;
__uid_t pw_uid = -1;
int ret = -1;
gchar *buf = NULL, *tmp = NULL;
- gsize size = sysconf(_SC_GETPW_R_SIZE_MAX);
- if (size < sizeof(struct passwd))
+ gsize size;
+ glong pw_size_max = sysconf(_SC_GETPW_R_SIZE_MAX);
+ if (pw_size_max <= sizeof(struct passwd))
+ else
+ size = pw_size_max;
for (; NULL != (tmp = realloc(buf, size)); size*=2)
{
for (; NULL != (tmp = realloc(buf, size)); size*=2)
{
__gid_t pw_gid = -1;
int ret = -1;
gchar *buf = NULL, *tmp = NULL;
__gid_t pw_gid = -1;
int ret = -1;
gchar *buf = NULL, *tmp = NULL;
- gsize size = sysconf(_SC_GETPW_R_SIZE_MAX);
- if (size <= sizeof(struct passwd))
+ gsize size;
+ glong pw_size_max = sysconf(_SC_GETPW_R_SIZE_MAX);
+ if (pw_size_max <= sizeof(struct passwd))
+ else
+ size = pw_size_max;
for (; NULL != (tmp = realloc(buf, size)); size*=2)
{
for (; NULL != (tmp = realloc(buf, size)); size*=2)
{
struct passwd *pwent = NULL;
struct passwd buf_pwent;
gchar *buf = NULL, *tmp = NULL, *pw_dir = NULL;
struct passwd *pwent = NULL;
struct passwd buf_pwent;
gchar *buf = NULL, *tmp = NULL, *pw_dir = NULL;
- gsize size = sysconf(_SC_GETPW_R_SIZE_MAX);
- if (size <= sizeof(struct passwd))
+ gsize size;
+ glong pw_size_max = sysconf(_SC_GETPW_R_SIZE_MAX);
+ if (pw_size_max <= sizeof(struct passwd))
+ else
+ size = pw_size_max;
for (; NULL != (tmp = realloc(buf, size)); size*=2)
{
for (; NULL != (tmp = realloc(buf, size)); size*=2)
{
struct passwd *pwent = NULL;
struct passwd buf_pwent;
gchar *buf = NULL, *tmp = NULL, *pw_shell = NULL;
struct passwd *pwent = NULL;
struct passwd buf_pwent;
gchar *buf = NULL, *tmp = NULL, *pw_shell = NULL;
- gsize size = sysconf(_SC_GETPW_R_SIZE_MAX);
- if (size <= sizeof(struct passwd))
+ gsize size;
+ glong pw_size_max = sysconf(_SC_GETPW_R_SIZE_MAX);
+ if (pw_size_max <= sizeof(struct passwd))
+ else
+ size = pw_size_max;
for (; NULL != (tmp = realloc(buf, size)); size*=2)
{
for (; NULL != (tmp = realloc(buf, size)); size*=2)
{
struct passwd buf_pwd;
gboolean res;
gchar *buf = NULL, *tmp = NULL;
struct passwd buf_pwd;
gboolean res;
gchar *buf = NULL, *tmp = NULL;
-
- gsize size = sysconf(_SC_GETPW_R_SIZE_MAX);
- if (size < sizeof(struct passwd))
+ gsize size;
+ glong pw_size_max = sysconf(_SC_GETPW_R_SIZE_MAX);
+ if (pw_size_max <= sizeof(struct passwd))
+ else
+ size = pw_size_max;
struct passwd *pwd_entry = NULL;
struct passwd pwd_buf;
gchar *buf = NULL, *tmp = NULL;
struct passwd *pwd_entry = NULL;
struct passwd pwd_buf;
gchar *buf = NULL, *tmp = NULL;
- gsize size = sysconf(_SC_GETPW_R_SIZE_MAX);
- if (size < sizeof(struct passwd))
+ gsize size;
+ glong pw_size_max = sysconf(_SC_GETPW_R_SIZE_MAX);
+ if (pw_size_max <= sizeof(struct passwd))
+ else
+ size = pw_size_max;
g_return_val_if_fail (plugin, FALSE);
g_return_val_if_fail (TLM_IS_ACCOUNT_PLUGIN_DEFAULT(plugin), FALSE);
g_return_val_if_fail (plugin, FALSE);
g_return_val_if_fail (TLM_IS_ACCOUNT_PLUGIN_DEFAULT(plugin), FALSE);