1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

winbindd/idmap: apply const to struct nss_info_methods pointers

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14539

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
This commit is contained in:
Stefan Metzmacher 2019-03-21 12:30:37 +01:00 committed by Andrew Bartlett
parent 95b0dac0af
commit 7518a0ca32
4 changed files with 11 additions and 10 deletions

View File

@ -38,7 +38,7 @@ struct nss_function_entry {
struct nss_function_entry *prev, *next;
const char *name;
struct nss_info_methods *methods;
const struct nss_info_methods *methods;
};
/* List of configured domains. Each domain points
@ -50,7 +50,7 @@ struct nss_domain_entry {
const char *domain;
NTSTATUS init_status;
struct nss_function_entry *backend;
const struct nss_function_entry *backend;
/* hold state on a per domain basis */
@ -75,7 +75,7 @@ struct nss_info_methods {
NTSTATUS smb_register_idmap_nss(int version,
const char *name,
struct nss_info_methods *methods);
const struct nss_info_methods *methods);
NTSTATUS nss_map_to_alias( TALLOC_CTX *mem_ctx, const char *domain,
const char *name, char **alias );

View File

@ -370,19 +370,19 @@ done:
/* The SFU and RFC2307 NSS plugins share everything but the init
function which sets the intended schema model to use */
static struct nss_info_methods nss_rfc2307_methods = {
static const struct nss_info_methods nss_rfc2307_methods = {
.init = nss_rfc2307_init,
.map_to_alias = nss_ad_map_to_alias,
.map_from_alias = nss_ad_map_from_alias,
};
static struct nss_info_methods nss_sfu_methods = {
static const struct nss_info_methods nss_sfu_methods = {
.init = nss_sfu_init,
.map_to_alias = nss_ad_map_to_alias,
.map_from_alias = nss_ad_map_from_alias,
};
static struct nss_info_methods nss_sfu20_methods = {
static const struct nss_info_methods nss_sfu20_methods = {
.init = nss_sfu20_init,
.map_to_alias = nss_ad_map_to_alias,
.map_from_alias = nss_ad_map_from_alias,

View File

@ -337,7 +337,7 @@ static const struct idmap_methods hash_idmap_methods = {
.sids_to_unixids = sids_to_unixids,
};
static struct nss_info_methods hash_nss_methods = {
static const struct nss_info_methods hash_nss_methods = {
.init = nss_hash_init,
.map_to_alias = nss_hash_map_to_alias,
.map_from_alias = nss_hash_map_from_alias,

View File

@ -46,7 +46,8 @@ static struct nss_function_entry *nss_get_backend(const char *name )
Allow a module to register itself as a backend.
**********************************************************************/
NTSTATUS smb_register_idmap_nss(int version, const char *name, struct nss_info_methods *methods)
NTSTATUS smb_register_idmap_nss(int version, const char *name,
const struct nss_info_methods *methods)
{
struct nss_function_entry *entry;
@ -319,7 +320,7 @@ static struct nss_domain_entry *find_nss_domain( const char *domain )
const char *name, char **alias )
{
struct nss_domain_entry *p;
struct nss_info_methods *m;
const struct nss_info_methods *m;
if ( (p = find_nss_domain( domain )) == NULL ) {
DEBUG(4,("nss_map_to_alias: Failed to find nss domain pointer for %s\n",
@ -340,7 +341,7 @@ static struct nss_domain_entry *find_nss_domain( const char *domain )
const char *alias, char **name )
{
struct nss_domain_entry *p;
struct nss_info_methods *m;
const struct nss_info_methods *m;
if ( (p = find_nss_domain( domain )) == NULL ) {
DEBUG(4,("nss_map_from_alias: Failed to find nss domain pointer for %s\n",