mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
s3:passdb expose pdb_create_builtin function
this one first tries to map the principal before allocating a new gid Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
This commit is contained in:
parent
6a048b424a
commit
df41835eea
@ -942,6 +942,7 @@ bool pdb_is_responsible_for_unix_groups(void);
|
|||||||
|
|
||||||
/* The following definitions come from passdb/pdb_util.c */
|
/* The following definitions come from passdb/pdb_util.c */
|
||||||
|
|
||||||
|
NTSTATUS pdb_create_builtin(uint32_t rid);
|
||||||
NTSTATUS create_builtin_users(const struct dom_sid *sid);
|
NTSTATUS create_builtin_users(const struct dom_sid *sid);
|
||||||
NTSTATUS create_builtin_administrators(const struct dom_sid *sid);
|
NTSTATUS create_builtin_administrators(const struct dom_sid *sid);
|
||||||
|
|
||||||
|
@ -19,6 +19,7 @@ algorithmic_rid_base: int (void)
|
|||||||
builtin_domain_name: const char *(void)
|
builtin_domain_name: const char *(void)
|
||||||
cache_account_policy_get: bool (enum pdb_policy_type, uint32_t *)
|
cache_account_policy_get: bool (enum pdb_policy_type, uint32_t *)
|
||||||
cache_account_policy_set: bool (enum pdb_policy_type, uint32_t)
|
cache_account_policy_set: bool (enum pdb_policy_type, uint32_t)
|
||||||
|
pdb_create_builtin: NTSTATUS (uint32_t)
|
||||||
create_builtin_administrators: NTSTATUS (const struct dom_sid *)
|
create_builtin_administrators: NTSTATUS (const struct dom_sid *)
|
||||||
create_builtin_users: NTSTATUS (const struct dom_sid *)
|
create_builtin_users: NTSTATUS (const struct dom_sid *)
|
||||||
decode_account_policy_name: const char *(enum pdb_policy_type)
|
decode_account_policy_name: const char *(enum pdb_policy_type)
|
||||||
|
@ -67,7 +67,7 @@ static NTSTATUS add_sid_to_builtin(const struct dom_sid *builtin_sid,
|
|||||||
* @param[in] rid BUILTIN rid to create
|
* @param[in] rid BUILTIN rid to create
|
||||||
* @return Normal NTSTATUS return.
|
* @return Normal NTSTATUS return.
|
||||||
*/
|
*/
|
||||||
static NTSTATUS create_builtin(uint32 rid)
|
NTSTATUS pdb_create_builtin(uint32_t rid)
|
||||||
{
|
{
|
||||||
NTSTATUS status = NT_STATUS_OK;
|
NTSTATUS status = NT_STATUS_OK;
|
||||||
struct dom_sid sid;
|
struct dom_sid sid;
|
||||||
@ -94,7 +94,7 @@ NTSTATUS create_builtin_users(const struct dom_sid *dom_sid)
|
|||||||
NTSTATUS status;
|
NTSTATUS status;
|
||||||
struct dom_sid dom_users;
|
struct dom_sid dom_users;
|
||||||
|
|
||||||
status = create_builtin(BUILTIN_RID_USERS);
|
status = pdb_create_builtin(BUILTIN_RID_USERS);
|
||||||
if ( !NT_STATUS_IS_OK(status) ) {
|
if ( !NT_STATUS_IS_OK(status) ) {
|
||||||
DEBUG(5,("create_builtin_users: Failed to create Users\n"));
|
DEBUG(5,("create_builtin_users: Failed to create Users\n"));
|
||||||
return status;
|
return status;
|
||||||
@ -123,7 +123,7 @@ NTSTATUS create_builtin_administrators(const struct dom_sid *dom_sid)
|
|||||||
TALLOC_CTX *ctx;
|
TALLOC_CTX *ctx;
|
||||||
bool ret;
|
bool ret;
|
||||||
|
|
||||||
status = create_builtin(BUILTIN_RID_ADMINISTRATORS);
|
status = pdb_create_builtin(BUILTIN_RID_ADMINISTRATORS);
|
||||||
if ( !NT_STATUS_IS_OK(status) ) {
|
if ( !NT_STATUS_IS_OK(status) ) {
|
||||||
DEBUG(5,("create_builtin_administrators: Failed to create Administrators\n"));
|
DEBUG(5,("create_builtin_administrators: Failed to create Administrators\n"));
|
||||||
return status;
|
return status;
|
||||||
|
Loading…
Reference in New Issue
Block a user