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

don't implement any group mapping functions in the guest sam module

(This used to be commit a354bf4b7e)
This commit is contained in:
Gerald Carter 2003-04-29 05:31:06 +00:00
parent 2aa8a05f33
commit e30c2e18f6
2 changed files with 59 additions and 0 deletions

View File

@ -1331,3 +1331,51 @@ NTSTATUS pdb_default_enum_group_mapping(struct pdb_methods *methods,
NT_STATUS_OK : NT_STATUS_UNSUCCESSFUL;
}
/**********************************************************************
no ops for passdb backends that don't implement group mapping
*********************************************************************/
NTSTATUS pdb_nop_getgrsid(struct pdb_methods *methods, GROUP_MAP *map,
DOM_SID sid, BOOL with_priv)
{
return NT_STATUS_UNSUCCESSFUL;
}
NTSTATUS pdb_nop_getgrgid(struct pdb_methods *methods, GROUP_MAP *map,
gid_t gid, BOOL with_priv)
{
return NT_STATUS_UNSUCCESSFUL;
}
NTSTATUS pdb_nop_getgrnam(struct pdb_methods *methods, GROUP_MAP *map,
char *name, BOOL with_priv)
{
return NT_STATUS_UNSUCCESSFUL;
}
NTSTATUS pdb_nop_add_group_mapping_entry(struct pdb_methods *methods,
GROUP_MAP *map)
{
return NT_STATUS_UNSUCCESSFUL;
}
NTSTATUS pdb_nop_update_group_mapping_entry(struct pdb_methods *methods,
GROUP_MAP *map)
{
return NT_STATUS_UNSUCCESSFUL;
}
NTSTATUS pdb_nop_delete_group_mapping_entry(struct pdb_methods *methods,
DOM_SID sid)
{
return NT_STATUS_UNSUCCESSFUL;
}
NTSTATUS pdb_nop_enum_group_mapping(struct pdb_methods *methods,
enum SID_NAME_USE sid_name_use,
GROUP_MAP **rmap, int *num_entries,
BOOL unix_only, BOOL with_priv)
{
return NT_STATUS_UNSUCCESSFUL;
}

View File

@ -100,6 +100,7 @@ static NTSTATUS guestsam_getsampwsid(struct pdb_methods *my_methods, SAM_ACCOUNT
return guestsam_getsampwrid(my_methods, user, rid);
}
NTSTATUS pdb_init_guestsam(PDB_CONTEXT *pdb_context, PDB_METHODS **pdb_method, const char *location)
{
NTSTATUS nt_status;
@ -118,6 +119,16 @@ NTSTATUS pdb_init_guestsam(PDB_CONTEXT *pdb_context, PDB_METHODS **pdb_method, c
(*pdb_method)->getsampwnam = guestsam_getsampwnam;
(*pdb_method)->getsampwsid = guestsam_getsampwsid;
/* we should do no group mapping here */
(*pdb_method)->getgrsid = pdb_nop_getgrsid;
(*pdb_method)->getgrgid = pdb_nop_getgrgid;
(*pdb_method)->getgrnam = pdb_nop_getgrnam;
(*pdb_method)->add_group_mapping_entry = pdb_nop_add_group_mapping_entry;
(*pdb_method)->update_group_mapping_entry = pdb_nop_update_group_mapping_entry;
(*pdb_method)->delete_group_mapping_entry = pdb_nop_delete_group_mapping_entry;
(*pdb_method)->enum_group_mapping = pdb_nop_enum_group_mapping;
/* There's not very much to initialise here */
return NT_STATUS_OK;
}