]>
Commit | Line | Data |
---|---|---|
1d13e637 AF |
1 | From c370237f44f91f98e4e5cce81fafeea442573bad Mon Sep 17 00:00:00 2001 |
2 | From: Andreas Schneider <asn@samba.org> | |
3 | Date: Wed, 19 Aug 2015 16:24:08 +0200 | |
4 | Subject: [PATCH 1/2] PATCHSET32: s3-auth: Pass nt_username to check_account() | |
5 | ||
6 | We set nt_username above but do not use it in this function. | |
7 | ||
8 | BUG: https://bugzilla.samba.org/show_bug.cgi?id=9862 | |
9 | ||
10 | Signed-off-by: Andreas Schneider <asn@samba.org> | |
11 | Reviewed-by: Guenther Deschner <gd@samba.org> | |
12 | (cherry picked from commit e8c76932e4ac192a00afa3b9731f5921c4b37da6) | |
13 | --- | |
14 | source3/auth/auth_util.c | 9 ++++++--- | |
15 | 1 file changed, 6 insertions(+), 3 deletions(-) | |
16 | ||
17 | diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c | |
18 | index a548b7b..aa269d6 100644 | |
19 | --- a/source3/auth/auth_util.c | |
20 | +++ b/source3/auth/auth_util.c | |
21 | @@ -1251,9 +1251,12 @@ NTSTATUS make_server_info_info3(TALLOC_CTX *mem_ctx, | |
22 | ||
23 | /* this call will try to create the user if necessary */ | |
24 | ||
25 | - nt_status = check_account(mem_ctx, nt_domain, sent_nt_username, | |
26 | - &found_username, &pwd, | |
27 | - &username_was_mapped); | |
28 | + nt_status = check_account(mem_ctx, | |
29 | + nt_domain, | |
30 | + nt_username, | |
31 | + &found_username, | |
32 | + &pwd, | |
33 | + &username_was_mapped); | |
34 | ||
35 | if (!NT_STATUS_IS_OK(nt_status)) { | |
36 | return nt_status; | |
37 | -- | |
38 | 2.5.0 | |
39 | ||
40 | ||
41 | From 1ab3cd252942b4fa5637d3f98b48ac3ba098de30 Mon Sep 17 00:00:00 2001 | |
42 | From: Andreas Schneider <asn@samba.org> | |
43 | Date: Wed, 19 Aug 2015 16:11:47 +0200 | |
44 | Subject: [PATCH 2/2] PATCHSET32: s3-auth: Fix 'map to guest = Bad Uid' support | |
45 | ||
46 | BUG: https://bugzilla.samba.org/show_bug.cgi?id=9862 | |
47 | ||
48 | Signed-off-by: Andreas Schneider <asn@samba.org> | |
49 | Reviewed-by: Guenther Deschner <gd@samba.org> | |
50 | (cherry picked from commit 34965d4d98d172e848e2b96fad8a9e0b99288ba7) | |
51 | --- | |
52 | source3/auth/auth_util.c | 8 ++++++++ | |
53 | 1 file changed, 8 insertions(+) | |
54 | ||
55 | diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c | |
56 | index aa269d6..cfda8b7 100644 | |
57 | --- a/source3/auth/auth_util.c | |
58 | +++ b/source3/auth/auth_util.c | |
59 | @@ -1259,6 +1259,14 @@ NTSTATUS make_server_info_info3(TALLOC_CTX *mem_ctx, | |
60 | &username_was_mapped); | |
61 | ||
62 | if (!NT_STATUS_IS_OK(nt_status)) { | |
63 | + /* Handle 'map to guest = Bad Uid */ | |
64 | + if (NT_STATUS_EQUAL(nt_status, NT_STATUS_NO_SUCH_USER) && | |
65 | + (lp_security() == SEC_ADS || lp_security() == SEC_DOMAIN) && | |
66 | + lp_map_to_guest() == MAP_TO_GUEST_ON_BAD_UID) { | |
67 | + DEBUG(2, ("Try to map %s to guest account\n", | |
68 | + nt_username)); | |
69 | + return make_server_info_guest(mem_ctx, server_info); | |
70 | + } | |
71 | return nt_status; | |
72 | } | |
73 | ||
74 | -- | |
75 | 2.5.0 | |
76 |