diff options
Diffstat (limited to 'source3/sam/get_set_domain.c')
-rw-r--r-- | source3/sam/get_set_domain.c | 45 |
1 files changed, 23 insertions, 22 deletions
diff --git a/source3/sam/get_set_domain.c b/source3/sam/get_set_domain.c index e9e61119cd..9e4d41a49e 100644 --- a/source3/sam/get_set_domain.c +++ b/source3/sam/get_set_domain.c @@ -30,16 +30,16 @@ NTSTATUS sam_get_domain_sid(SAM_DOMAIN_HANDLE *domain, DOM_SID **sid) { if (!domain || !sid) return NT_STATUS_UNSUCCESSFUL; - *sid = &domain->private.sid; + *sid = &(domain->private.sid); return NT_STATUS_OK; } -NTSTATUS sam_get_domain_num_users(SAM_DOMAIN_HANDLE *domain, uint32 *num_users) +NTSTATUS sam_get_domain_num_accounts(SAM_DOMAIN_HANDLE *domain, uint32 *num_accounts) { - if (!domain || !num_users) return NT_STATUS_UNSUCCESSFUL; + if (!domain || !num_accounts) return NT_STATUS_UNSUCCESSFUL; - *num_users = domain->private.num_users; + *num_accounts = domain->private.num_accounts; return NT_STATUS_OK; } @@ -71,15 +71,6 @@ NTSTATUS sam_get_domain_name(SAM_DOMAIN_HANDLE *domain, char **domain_name) return NT_STATUS_OK; } -NTSTATUS sam_set_domain_name(SAM_DOMAIN_HANDLE *domain, char *domain_name) -{ - if (!domain) return NT_STATUS_UNSUCCESSFUL; - - domain->private.name = talloc_strdup(domain->mem_ctx, domain_name); - - return NT_STATUS_OK; -} - NTSTATUS sam_get_domain_server(SAM_DOMAIN_HANDLE *domain, char **server_name) { if (!domain || !server_name) return NT_STATUS_UNSUCCESSFUL; @@ -89,15 +80,6 @@ NTSTATUS sam_get_domain_server(SAM_DOMAIN_HANDLE *domain, char **server_name) return NT_STATUS_OK; } -NTSTATUS sam_set_domain_server(SAM_DOMAIN_HANDLE *domain, char *server_name) -{ - if (!domain) return NT_STATUS_UNSUCCESSFUL; - - domain->private.servername = talloc_strdup(domain->mem_ctx, server_name); - - return NT_STATUS_OK; -} - NTSTATUS sam_get_domain_max_pwdage(SAM_DOMAIN_HANDLE *domain, NTTIME *max_passwordage) { if (!domain || !max_passwordage) return NT_STATUS_UNSUCCESSFUL; @@ -182,6 +164,16 @@ NTSTATUS sam_get_domain_login_pwdchange(SAM_DOMAIN_HANDLE *domain, BOOL *login_p /* Set */ +NTSTATUS sam_set_domain_name(SAM_DOMAIN_HANDLE *domain, char *domain_name) +{ + if (!domain) return NT_STATUS_UNSUCCESSFUL; + + domain->private.name = talloc_strdup(domain->mem_ctx, domain_name); + + return NT_STATUS_OK; +} + + NTSTATUS sam_set_domain_max_pwdage(SAM_DOMAIN_HANDLE *domain, NTTIME max_passwordage) { if (!domain) return NT_STATUS_UNSUCCESSFUL; @@ -261,3 +253,12 @@ NTSTATUS sam_set_domain_login_pwdchange(SAM_DOMAIN_HANDLE *domain, BOOL login_pw return NT_STATUS_OK; } + +NTSTATUS sam_set_domain_server(SAM_DOMAIN_HANDLE *domain, char *server_name) +{ + if (!domain) return NT_STATUS_UNSUCCESSFUL; + + domain->private.servername = talloc_strdup(domain->mem_ctx, server_name); + + return NT_STATUS_OK; +} |