mirror of
https://github.com/samba-team/samba.git
synced 2025-02-08 05:57:51 +03:00
Don't pass a function to ADS_ERR_OK().
(This used to be commit dff4c93d85717ba29799a0ebaaba8b8539c8d68d)
This commit is contained in:
parent
c73d1fc46e
commit
bf909c0c36
@ -79,6 +79,7 @@ static BOOL map_sz(TALLOC_CTX *ctx, ADS_MODLIST *mods,
|
|||||||
const REGISTRY_VALUE *value)
|
const REGISTRY_VALUE *value)
|
||||||
{
|
{
|
||||||
char *str_value = NULL;
|
char *str_value = NULL;
|
||||||
|
ADS_STATUS status;
|
||||||
|
|
||||||
if (value->type != REG_SZ)
|
if (value->type != REG_SZ)
|
||||||
return False;
|
return False;
|
||||||
@ -86,8 +87,8 @@ static BOOL map_sz(TALLOC_CTX *ctx, ADS_MODLIST *mods,
|
|||||||
if (value->size && *((smb_ucs2_t *) value->data_p)) {
|
if (value->size && *((smb_ucs2_t *) value->data_p)) {
|
||||||
pull_ucs2_talloc(ctx, (void **) &str_value,
|
pull_ucs2_talloc(ctx, (void **) &str_value,
|
||||||
(const smb_ucs2_t *) value->data_p);
|
(const smb_ucs2_t *) value->data_p);
|
||||||
return ADS_ERR_OK(ads_mod_str(ctx, mods, value->valuename,
|
status = ads_mod_str(ctx, mods, value->valuename, str_value);
|
||||||
str_value));
|
return ADS_ERR_OK(status);
|
||||||
}
|
}
|
||||||
return True;
|
return True;
|
||||||
|
|
||||||
@ -100,11 +101,13 @@ static BOOL map_dword(TALLOC_CTX *ctx, ADS_MODLIST *mods,
|
|||||||
const REGISTRY_VALUE *value)
|
const REGISTRY_VALUE *value)
|
||||||
{
|
{
|
||||||
char *str_value = NULL;
|
char *str_value = NULL;
|
||||||
|
ADS_STATUS status;
|
||||||
|
|
||||||
if (value->type != REG_DWORD)
|
if (value->type != REG_DWORD)
|
||||||
return False;
|
return False;
|
||||||
str_value = talloc_asprintf(ctx, "%d", *((uint32 *) value->data_p));
|
str_value = talloc_asprintf(ctx, "%d", *((uint32 *) value->data_p));
|
||||||
return ADS_ERR_OK(ads_mod_str(ctx, mods, value->valuename, str_value));
|
status = ads_mod_str(ctx, mods, value->valuename, str_value);
|
||||||
|
return ADS_ERR_OK(status);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -114,12 +117,14 @@ static BOOL map_bool(TALLOC_CTX *ctx, ADS_MODLIST *mods,
|
|||||||
const REGISTRY_VALUE *value)
|
const REGISTRY_VALUE *value)
|
||||||
{
|
{
|
||||||
char *str_value;
|
char *str_value;
|
||||||
|
ADS_STATUS status;
|
||||||
|
|
||||||
if ((value->type != REG_BINARY) || (value->size != 1))
|
if ((value->type != REG_BINARY) || (value->size != 1))
|
||||||
return False;
|
return False;
|
||||||
str_value = talloc_asprintf(ctx, "%s",
|
str_value = talloc_asprintf(ctx, "%s",
|
||||||
*(value->data_p) ? "TRUE" : "FALSE");
|
*(value->data_p) ? "TRUE" : "FALSE");
|
||||||
return ADS_ERR_OK(ads_mod_str(ctx, mods, value->valuename, str_value));
|
status = ads_mod_str(ctx, mods, value->valuename, str_value);
|
||||||
|
return ADS_ERR_OK(status);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -131,6 +136,7 @@ static BOOL map_multi_sz(TALLOC_CTX *ctx, ADS_MODLIST *mods,
|
|||||||
char **str_values = NULL;
|
char **str_values = NULL;
|
||||||
smb_ucs2_t *cur_str = (smb_ucs2_t *) value->data_p;
|
smb_ucs2_t *cur_str = (smb_ucs2_t *) value->data_p;
|
||||||
uint32 size = 0, num_vals = 0, i=0;
|
uint32 size = 0, num_vals = 0, i=0;
|
||||||
|
ADS_STATUS status;
|
||||||
|
|
||||||
if (value->type != REG_MULTI_SZ)
|
if (value->type != REG_MULTI_SZ)
|
||||||
return False;
|
return False;
|
||||||
@ -153,8 +159,9 @@ static BOOL map_multi_sz(TALLOC_CTX *ctx, ADS_MODLIST *mods,
|
|||||||
(void **) &str_values[i],
|
(void **) &str_values[i],
|
||||||
cur_str);
|
cur_str);
|
||||||
|
|
||||||
return ADS_ERR_OK(ads_mod_strlist(ctx, mods, value->valuename,
|
status = ads_mod_strlist(ctx, mods, value->valuename,
|
||||||
(const char **) str_values));
|
(const char **) str_values);
|
||||||
|
return ADS_ERR_OK(status);
|
||||||
}
|
}
|
||||||
return True;
|
return True;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user