diff options
Diffstat (limited to 'source3/winbindd/idmap_adex')
-rw-r--r-- | source3/winbindd/idmap_adex/idmap_adex.c | 5 | ||||
-rw-r--r-- | source3/winbindd/idmap_adex/idmap_adex.h | 5 | ||||
-rw-r--r-- | source3/winbindd/idmap_adex/provider_unified.c | 22 |
3 files changed, 19 insertions, 13 deletions
diff --git a/source3/winbindd/idmap_adex/idmap_adex.c b/source3/winbindd/idmap_adex/idmap_adex.c index e2fcda83d3..5ca7df0b4a 100644 --- a/source3/winbindd/idmap_adex/idmap_adex.c +++ b/source3/winbindd/idmap_adex/idmap_adex.c @@ -318,8 +318,9 @@ static NTSTATUS _nss_adex_get_info(struct TALLOC_CTX * ctx, ADS_STRUCT * ads, LDAPMessage * msg, - char **homedir, - char **shell, char **gecos, gid_t * p_gid) + const char **homedir, + const char **shell, + const char **gecos, gid_t * p_gid) { NTSTATUS nt_status; struct likewise_cell *cell; diff --git a/source3/winbindd/idmap_adex/idmap_adex.h b/source3/winbindd/idmap_adex/idmap_adex.h index e068d5c340..6d6881e01d 100644 --- a/source3/winbindd/idmap_adex/idmap_adex.h +++ b/source3/winbindd/idmap_adex/idmap_adex.h @@ -97,8 +97,9 @@ struct cell_provider_api { enum id_type * type, const DOM_SID * sid); NTSTATUS(*get_nss_info) (const DOM_SID * sid, TALLOC_CTX * ctx, - char **homedir, - char **shell, char **gecos, gid_t * p_gid); + const char **homedir, + const char **shell, + const char **gecos, gid_t * p_gid); NTSTATUS(*map_to_alias) (TALLOC_CTX * mem_ctx, const char *domain, const char *name, char **alias); diff --git a/source3/winbindd/idmap_adex/provider_unified.c b/source3/winbindd/idmap_adex/provider_unified.c index 00db018de2..d48989f45f 100644 --- a/source3/winbindd/idmap_adex/provider_unified.c +++ b/source3/winbindd/idmap_adex/provider_unified.c @@ -895,21 +895,25 @@ done: static NTSTATUS pull_nss_info(struct likewise_cell *c, LDAPMessage *msg, TALLOC_CTX *ctx, - char **homedir, - char **shell, - char **gecos, + const char **homedir, + const char **shell, + const char **gecos, gid_t *p_gid) { NTSTATUS nt_status; + char *tmp; - nt_status = get_object_string(c, msg, ctx, ADEX_ATTR_HOMEDIR, homedir); + nt_status = get_object_string(c, msg, ctx, ADEX_ATTR_HOMEDIR, &tmp); BAIL_ON_NTSTATUS_ERROR(nt_status); + *homedir = tmp; - nt_status = get_object_string(c, msg, ctx, ADEX_ATTR_SHELL, shell); + nt_status = get_object_string(c, msg, ctx, ADEX_ATTR_SHELL, &tmp); BAIL_ON_NTSTATUS_ERROR(nt_status); + *shell = tmp; - nt_status = get_object_string(c, msg, ctx, ADEX_ATTR_GECOS, gecos); + nt_status = get_object_string(c, msg, ctx, ADEX_ATTR_GECOS, &tmp); /* Gecos is often not set so ignore failures */ + *gecos = tmp; nt_status = get_object_uint32(c, msg, ADEX_ATTR_GIDNUM, p_gid); BAIL_ON_NTSTATUS_ERROR(nt_status); @@ -1021,9 +1025,9 @@ done: static NTSTATUS _ccp_nss_get_info(const DOM_SID * sid, TALLOC_CTX * ctx, - char **homedir, - char **shell, - char **gecos, gid_t * p_gid) + const char **homedir, + const char **shell, + const char **gecos, gid_t * p_gid) { struct likewise_cell *cell = NULL; LDAPMessage *msg = NULL; |