summaryrefslogtreecommitdiff
path: root/source3/auth
diff options
context:
space:
mode:
Diffstat (limited to 'source3/auth')
-rw-r--r--source3/auth/auth_util.c3
-rw-r--r--source3/auth/proto.h3
-rw-r--r--source3/auth/server_info.c16
3 files changed, 17 insertions, 5 deletions
diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c
index dbc7d24dc17..585afd31386 100644
--- a/source3/auth/auth_util.c
+++ b/source3/auth/auth_util.c
@@ -671,7 +671,8 @@ NTSTATUS make_server_info_pw(TALLOC_CTX *mem_ctx,
status = passwd_to_SamInfo3(result,
unix_username,
pwd,
- &result->info3);
+ &result->info3,
+ &result->extra);
if (!NT_STATUS_IS_OK(status)) {
goto done;
}
diff --git a/source3/auth/proto.h b/source3/auth/proto.h
index da3c0996a29..792e96d1fac 100644
--- a/source3/auth/proto.h
+++ b/source3/auth/proto.h
@@ -305,7 +305,8 @@ NTSTATUS samu_to_SamInfo3(TALLOC_CTX *mem_ctx,
NTSTATUS passwd_to_SamInfo3(TALLOC_CTX *mem_ctx,
const char *unix_username,
const struct passwd *pwd,
- struct netr_SamInfo3 **pinfo3);
+ struct netr_SamInfo3 **pinfo3,
+ struct extra_auth_info *extra);
struct netr_SamInfo3 *copy_netr_SamInfo3(TALLOC_CTX *mem_ctx,
const struct netr_SamInfo3 *orig);
diff --git a/source3/auth/server_info.c b/source3/auth/server_info.c
index 9f992ffa103..7b1cdd574b4 100644
--- a/source3/auth/server_info.c
+++ b/source3/auth/server_info.c
@@ -539,7 +539,8 @@ NTSTATUS samu_to_SamInfo3(TALLOC_CTX *mem_ctx,
NTSTATUS passwd_to_SamInfo3(TALLOC_CTX *mem_ctx,
const char *unix_username,
const struct passwd *pwd,
- struct netr_SamInfo3 **pinfo3)
+ struct netr_SamInfo3 **pinfo3,
+ struct extra_auth_info *extra)
{
struct netr_SamInfo3 *info3;
NTSTATUS status;
@@ -635,8 +636,17 @@ NTSTATUS passwd_to_SamInfo3(TALLOC_CTX *mem_ctx,
ZERO_STRUCT(domain_sid);
- sid_copy(&domain_sid, &user_sid);
- sid_split_rid(&domain_sid, &info3->base.rid);
+ status = SamInfo3_handle_sids(unix_username,
+ &user_sid,
+ &group_sid,
+ info3,
+ &domain_sid,
+ extra);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ goto done;
+ }
+
info3->base.domain_sid = dom_sid_dup(info3, &domain_sid);
ok = sid_peek_check_rid(&domain_sid, &group_sid,