/[smeserver]/rpms/samba/sme10/samba-v4-6-fix_path_substitutions.patch
ViewVC logotype

Contents of /rpms/samba/sme10/samba-v4-6-fix_path_substitutions.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (show annotations) (download)
Wed Aug 9 04:48:51 2023 UTC (9 months, 3 weeks ago) by jpp
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
FILE REMOVED
Initial import

1 From d80f5dc85d6fb9ebfef807932bef10e6c0c86468 Mon Sep 17 00:00:00 2001
2 From: Volker Lendecke <vl@samba.org>
3 Date: Fri, 17 Mar 2017 13:52:57 +0100
4 Subject: [PATCH 1/3] s3:winbind: Use the correct talloc context for user
5 information
6
7 This fixes the substitution for 'template homedir'.
8
9 BUG: https://bugzilla.samba.org/show_bug.cgi?id=12699
10
11 Signed-off-by: Volker Lendecke <vl@samba.org>
12 Reviewed-by: Andreas Schneider <asn@samba.org>
13
14 Autobuild-User(master): Volker Lendecke <vl@samba.org>
15 Autobuild-Date(master): Sat Mar 18 19:47:40 CET 2017 on sn-devel-144
16
17 (cherry picked from commit ece5e67bbc027432aeb3d97205ef093a0acda8d5)
18 ---
19 source3/winbindd/wb_queryuser.c | 2 +-
20 1 file changed, 1 insertion(+), 1 deletion(-)
21
22 diff --git a/source3/winbindd/wb_queryuser.c b/source3/winbindd/wb_queryuser.c
23 index be4d3d3e665..69b4c8dad5a 100644
24 --- a/source3/winbindd/wb_queryuser.c
25 +++ b/source3/winbindd/wb_queryuser.c
26 @@ -329,7 +329,7 @@ static void wb_queryuser_got_group_name(struct tevent_req *subreq)
27 NTSTATUS status;
28 const char *domain_name;
29
30 - status = wb_lookupsid_recv(subreq, state, &type, &domain_name,
31 + status = wb_lookupsid_recv(subreq, state->info, &type, &domain_name,
32 &state->info->primary_group_name);
33 TALLOC_FREE(subreq);
34 if (tevent_req_nterror(req, status)) {
35 --
36 2.12.0
37
38
39 From 80fddd3572702bd45565fcc53e75d098c4fb0cf3 Mon Sep 17 00:00:00 2001
40 From: Andreas Schneider <asn@samba.org>
41 Date: Wed, 15 Mar 2017 12:37:08 +0100
42 Subject: [PATCH 2/3] s3:tests: Add a subsitution test for %D %u %g
43
44 BUG: https://bugzilla.samba.org/show_bug.cgi?id=12699
45
46 Signed-off-by: Andreas Schneider <asn@samba.org>
47 Reviewed-by: Jeremy Allison <jra@samba.org>
48 (cherry picked from commit 2be02fdd1ed1d565e28f50d02ff5216391ac0660)
49 ---
50 selftest/target/Samba3.pm | 19 ++++++++++++++++++-
51 source3/script/tests/test_substitutions.sh | 9 +++++++--
52 2 files changed, 25 insertions(+), 3 deletions(-)
53
54 diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm
55 index f5b2c510224..1e053f12297 100755
56 --- a/selftest/target/Samba3.pm
57 +++ b/selftest/target/Samba3.pm
58 @@ -394,16 +394,33 @@ sub setup_admember($$$$)
59 $substitution_path = "$share_dir/D_SAMBADOMAIN/U_alice/G_domain users";
60 push(@dirs, $substitution_path);
61
62 + # Using '/' as the winbind separator is a bad idea ...
63 + $substitution_path = "$share_dir/D_SAMBADOMAIN/u_SAMBADOMAIN";
64 + push(@dirs, $substitution_path);
65 +
66 + $substitution_path = "$share_dir/D_SAMBADOMAIN/u_SAMBADOMAIN/alice";
67 + push(@dirs, $substitution_path);
68 +
69 + $substitution_path = "$share_dir/D_SAMBADOMAIN/u_SAMBADOMAIN/alice/g_SAMBADOMAIN";
70 + push(@dirs, $substitution_path);
71 +
72 + $substitution_path = "$share_dir/D_SAMBADOMAIN/u_SAMBADOMAIN/alice/g_SAMBADOMAIN/domain users";
73 + push(@dirs, $substitution_path);
74 +
75 my $member_options = "
76 security = ads
77 workgroup = $dcvars->{DOMAIN}
78 realm = $dcvars->{REALM}
79 netbios aliases = foo bar
80
81 -[subDUG]
82 +[sub_dug]
83 path = $share_dir/D_%D/U_%U/G_%G
84 writeable = yes
85
86 +[sub_dug2]
87 + path = $share_dir/D_%D/u_%u/g_%g
88 + writeable = yes
89 +
90 ";
91
92 my $ret = $self->provision($prefix,
93 diff --git a/source3/script/tests/test_substitutions.sh b/source3/script/tests/test_substitutions.sh
94 index 0852ad969f0..1a46f11c85d 100755
95 --- a/source3/script/tests/test_substitutions.sh
96 +++ b/source3/script/tests/test_substitutions.sh
97 @@ -24,9 +24,14 @@ smbclient="$samba_bindir/smbclient"
98 . $samba_srcdir/testprogs/blackbox/subunit.sh
99 . $samba_srcdir/testprogs/blackbox/common_test_fns.inc
100
101 -SMB_UNC="//$SERVER/subDUG"
102 +SMB_UNC="//$SERVER/sub_dug"
103
104 -test_smbclient "Test login to share with substitution" \
105 +test_smbclient "Test login to share with substitution (DUG)" \
106 + "ls" "$SMB_UNC" "-U$USERNAME%$PASSWORD" || failed=$(expr $failed + 1)
107 +
108 +SMB_UNC="//$SERVER/sub_dug2"
109 +
110 +test_smbclient "Test login to share with substitution (Dug)" \
111 "ls" "$SMB_UNC" "-U$USERNAME%$PASSWORD" || failed=$(expr $failed + 1)
112
113 exit $failed
114 --
115 2.12.0
116
117
118 From 3868c86ec0800b08c0ef1bf8328b6c1f3cd9437c Mon Sep 17 00:00:00 2001
119 From: Andreas Schneider <asn@samba.org>
120 Date: Fri, 17 Mar 2017 10:04:19 +0100
121 Subject: [PATCH 3/3] selftest: Define template homedir for 'ad_member' env
122
123 BUG: https://bugzilla.samba.org/show_bug.cgi?id=12699
124
125 With this set, the samba3.local.nss test for ad_member will ensure that
126 we correctly substitute those smb.conf options.
127
128 Signed-off-by: Andreas Schneider <asn@samba.org>
129 Reviewed-by: Jeremy Allison <jra@samba.org>
130
131 Autobuild-User(master): Jeremy Allison <jra@samba.org>
132 Autobuild-Date(master): Thu Mar 30 04:26:18 CEST 2017 on sn-devel-144
133
134 (cherry picked from commit 5f4979509950547e68af7f64ac263d0e0705ee03)
135 ---
136 nsswitch/tests/test_wbinfo.sh | 17 +++++++++++------
137 selftest/target/Samba3.pm | 1 +
138 2 files changed, 12 insertions(+), 6 deletions(-)
139
140 diff --git a/nsswitch/tests/test_wbinfo.sh b/nsswitch/tests/test_wbinfo.sh
141 index cfe582df068..f9c040e5f43 100755
142 --- a/nsswitch/tests/test_wbinfo.sh
143 +++ b/nsswitch/tests/test_wbinfo.sh
144 @@ -205,13 +205,18 @@ subunit_start_test "$test_name"
145 # The full name (GECOS) is based on name (the RDN, in this case CN)
146 # and displayName in winbindd_ads, and is based only on displayName in
147 # winbindd_msrpc and winbindd_rpc. Allow both versions.
148 -expected_line="$DOMAIN/administrator:*:$admin_uid:$gid:Administrator:/home/$DOMAIN/administrator:/bin/false"
149 -expected2_line="$DOMAIN/administrator:*:$admin_uid:$gid::/home/$DOMAIN/administrator:/bin/false"
150 +if test "$TARGET" = "ad_member"; then
151 + expected1_line="$DOMAIN/administrator:*:$admin_uid:$gid:Administrator:/home/$DOMAIN/Domain Users/administrator:/bin/false"
152 + expected2_line="$DOMAIN/administrator:*:$admin_uid:$gid::/home/$DOMAIN/Domain Users/administrator:/bin/false"
153 +else
154 + expected1_line="$DOMAIN/administrator:*:$admin_uid:$gid:Administrator:/home/$DOMAIN/administrator:/bin/false"
155 + expected2_line="$DOMAIN/administrator:*:$admin_uid:$gid::/home/$DOMAIN/administrator:/bin/false"
156 +fi
157
158 -if test x$passwd_line = x"$expected_line" -o x$passwd_line = x"$expected2_line"; then
159 +if test "x$passwd_line" = "x$expected1_line" -o "x$passwd_line" = "x$expected2_line"; then
160 subunit_pass_test "$test_name"
161 else
162 - echo "expected '$expected_line' or '$expected2_line' got '$passwd_line'" | subunit_fail_test "$test_name"
163 + echo "expected '$expected1_line' or '$expected2_line' got '$passwd_line'" | subunit_fail_test "$test_name"
164 failed=`expr $failed + 1`
165 fi
166
167 @@ -227,10 +232,10 @@ fi
168
169 test_name="confirm output of wbinfo --uid-info against $TARGET"
170 subunit_start_test "$test_name"
171 -if test x$passwd_line = x"$expected_line" -o x$passwd_line = x"$expected2_line"; then
172 +if test "x$passwd_line" = "x$expected1_line" -o "x$passwd_line" = "x$expected2_line"; then
173 subunit_pass_test "$test_name"
174 else
175 - echo "expected '$expected_line' or '$expected2_line' got '$passwd_line'" | subunit_fail_test "$test_name"
176 + echo "expected '$expected1_line' or '$expected2_line' got '$passwd_line'" | subunit_fail_test "$test_name"
177 failed=`expr $failed + 1`
178 fi
179
180 diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm
181 index 1e053f12297..cb4970828a5 100755
182 --- a/selftest/target/Samba3.pm
183 +++ b/selftest/target/Samba3.pm
184 @@ -412,6 +412,7 @@ sub setup_admember($$$$)
185 workgroup = $dcvars->{DOMAIN}
186 realm = $dcvars->{REALM}
187 netbios aliases = foo bar
188 + template homedir = /home/%D/%G/%U
189
190 [sub_dug]
191 path = $share_dir/D_%D/U_%U/G_%G
192 --
193 2.12.0
194

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed