/[smeserver]/rpms/e-smith-samba/sme8/e-smith-samba-2.2.0-sambaRole.patch
ViewVC logotype

Annotation of /rpms/e-smith-samba/sme8/e-smith-samba-2.2.0-sambaRole.patch

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


Revision 1.1 - (hide annotations) (download)
Mon Oct 13 21:48:33 2008 UTC (16 years ago) by slords
Branch: MAIN
CVS Tags: e-smith-samba-2_2_0-2_el5_sme
Add samba roles patch

1 slords 1.1 diff -ruN e-smith-samba-2.0.0.sambaRole/root/etc/e-smith/db/configuration/defaults/smb/DomainMaster e-smith-samba-2.0.0/root/etc/e-smith/db/configuration/defaults/smb/DomainMaster
2     --- e-smith-samba-2.0.0.sambaRole/root/etc/e-smith/db/configuration/defaults/smb/DomainMaster 2005-02-17 15:11:34.000000000 -0700
3     +++ e-smith-samba-2.0.0/root/etc/e-smith/db/configuration/defaults/smb/DomainMaster 1969-12-31 17:00:00.000000000 -0700
4     @@ -1 +0,0 @@
5     -no
6     diff -ruN e-smith-samba-2.0.0.sambaRole/root/etc/e-smith/db/configuration/defaults/smb/OsLevel e-smith-samba-2.0.0/root/etc/e-smith/db/configuration/defaults/smb/OsLevel
7     --- e-smith-samba-2.0.0.sambaRole/root/etc/e-smith/db/configuration/defaults/smb/OsLevel 1969-12-31 17:00:00.000000000 -0700
8     +++ e-smith-samba-2.0.0/root/etc/e-smith/db/configuration/defaults/smb/OsLevel 2008-10-13 15:17:03.000000000 -0600
9     @@ -0,0 +1 @@
10     +35
11     diff -ruN e-smith-samba-2.0.0.sambaRole/root/etc/e-smith/db/configuration/defaults/smb/ServerRole e-smith-samba-2.0.0/root/etc/e-smith/db/configuration/defaults/smb/ServerRole
12     --- e-smith-samba-2.0.0.sambaRole/root/etc/e-smith/db/configuration/defaults/smb/ServerRole 1969-12-31 17:00:00.000000000 -0700
13     +++ e-smith-samba-2.0.0/root/etc/e-smith/db/configuration/defaults/smb/ServerRole 2008-10-13 15:17:03.000000000 -0600
14     @@ -0,0 +1 @@
15     +WS
16     diff -ruN e-smith-samba-2.0.0.sambaRole/root/etc/e-smith/db/configuration/migrate/20smb e-smith-samba-2.0.0/root/etc/e-smith/db/configuration/migrate/20smb
17     --- e-smith-samba-2.0.0.sambaRole/root/etc/e-smith/db/configuration/migrate/20smb 2007-12-15 08:53:08.000000000 -0700
18     +++ e-smith-samba-2.0.0/root/etc/e-smith/db/configuration/migrate/20smb 2008-10-13 15:17:03.000000000 -0600
19     @@ -4,7 +4,7 @@
20    
21     my %new_props = ();
22    
23     - foreach my $prop (qw(DomainMaster RoamingProfiles ServerName Workgroup))
24     + foreach my $prop (qw(RoamingProfiles ServerName Workgroup))
25     {
26     my $old = $DB->get("Samba$prop");
27     if (defined $old)
28     @@ -14,6 +14,16 @@
29     }
30     }
31    
32     + foreach my $prop (qw(DomainMaster SambaDomainMaster))
33     + {
34     + my $old = $DB->get($prop);
35     + if (defined $old)
36     + {
37     + $new_props{ServerRole} = 'PDC' unless $old eq 'no';
38     + $old->delete;
39     + }
40     + }
41     +
42     ###Migrage CharacterSet->DisplayCharSet
43     my $CharacterSet = $smb->prop('CharacterSet');
44     if ($CharacterSet)
45     diff -ruN e-smith-samba-2.0.0.sambaRole/root/etc/e-smith/templates/etc/smb.conf/02setupDomainMaster e-smith-samba-2.0.0/root/etc/e-smith/templates/etc/smb.conf/02setupDomainMaster
46     --- e-smith-samba-2.0.0.sambaRole/root/etc/e-smith/templates/etc/smb.conf/02setupDomainMaster 2003-06-18 14:32:48.000000000 -0600
47     +++ e-smith-samba-2.0.0/root/etc/e-smith/templates/etc/smb.conf/02setupDomainMaster 1969-12-31 17:00:00.000000000 -0700
48     @@ -1,5 +0,0 @@
49     -{
50     - $SMB_DomainMaster = $smb{DomainMaster} || "no";
51     -
52     - "";
53     -}
54     diff -ruN e-smith-samba-2.0.0.sambaRole/root/etc/e-smith/templates/etc/smb.conf/11domainLogons e-smith-samba-2.0.0/root/etc/e-smith/templates/etc/smb.conf/11domainLogons
55     --- e-smith-samba-2.0.0.sambaRole/root/etc/e-smith/templates/etc/smb.conf/11domainLogons 2003-06-18 14:32:48.000000000 -0600
56     +++ e-smith-samba-2.0.0/root/etc/e-smith/templates/etc/smb.conf/11domainLogons 2008-10-13 15:17:03.000000000 -0600
57     @@ -1,3 +1,3 @@
58     {
59     - "domain logons = " . $SMB_DomainMaster;
60     + "domain logons = " . ( $smb{ServerRole} =~ m{^(PDC|BDC|ADS)$} ? "yes" : "no" );
61     }
62     diff -ruN e-smith-samba-2.0.0.sambaRole/root/etc/e-smith/templates/etc/smb.conf/11domainMaster e-smith-samba-2.0.0/root/etc/e-smith/templates/etc/smb.conf/11domainMaster
63     --- e-smith-samba-2.0.0.sambaRole/root/etc/e-smith/templates/etc/smb.conf/11domainMaster 2003-06-18 14:32:48.000000000 -0600
64     +++ e-smith-samba-2.0.0/root/etc/e-smith/templates/etc/smb.conf/11domainMaster 2008-10-13 15:17:03.000000000 -0600
65     @@ -1,13 +1,3 @@
66     {
67     - # If there is a WINSServer set and it is not this system, we
68     - # shouldn't be domain master, even if we're configured to be.
69     -
70     - my $domainMaster = $SMB_DomainMaster;
71     -
72     - if (defined $SMB_WINSServer)
73     - {
74     - $domainMaster = 'no' unless ($SMB_WINSServer eq $LocalIP);
75     - }
76     -
77     - return "domain master = $domainMaster";
78     + "domain master = " . ( $smb{ServerRole} =~ m{^(PDC|ADS)$} ? "yes" : "no" );
79     }
80     diff -ruN e-smith-samba-2.0.0.sambaRole/root/etc/e-smith/templates/etc/smb.conf/11logonHome e-smith-samba-2.0.0/root/etc/e-smith/templates/etc/smb.conf/11logonHome
81     --- e-smith-samba-2.0.0.sambaRole/root/etc/e-smith/templates/etc/smb.conf/11logonHome 2005-02-17 16:04:02.000000000 -0700
82     +++ e-smith-samba-2.0.0/root/etc/e-smith/templates/etc/smb.conf/11logonHome 2008-10-13 15:17:03.000000000 -0600
83     @@ -6,7 +6,7 @@
84     # WinNT/W2K uses logon path
85     # Win9x uses logon home
86    
87     - return "" unless ($SMB_DomainMaster eq "yes");
88     + return "" unless $smb{ServerRole} =~ m{^(PDC|BDC|ADS)$};
89    
90     my $roamingProfiles = $smb{RoamingProfiles} || "no";
91    
92     diff -ruN e-smith-samba-2.0.0.sambaRole/root/etc/e-smith/templates/etc/smb.conf/11logonPath e-smith-samba-2.0.0/root/etc/e-smith/templates/etc/smb.conf/11logonPath
93     --- e-smith-samba-2.0.0.sambaRole/root/etc/e-smith/templates/etc/smb.conf/11logonPath 2005-02-17 16:04:02.000000000 -0700
94     +++ e-smith-samba-2.0.0/root/etc/e-smith/templates/etc/smb.conf/11logonPath 2008-10-13 15:17:03.000000000 -0600
95     @@ -6,7 +6,7 @@
96     # WinNT/W2K uses logon path
97     # Win9x uses logon home
98    
99     - return "" unless ($SMB_DomainMaster eq "yes");
100     + return "" unless $smb{ServerRole} =~ m{^(PDC|BDC|ADS)$};
101    
102     my $roamingProfiles = $smb{RoamingProfiles} || "no";
103    
104     diff -ruN e-smith-samba-2.0.0.sambaRole/root/etc/e-smith/templates/etc/smb.conf/11logonScript e-smith-samba-2.0.0/root/etc/e-smith/templates/etc/smb.conf/11logonScript
105     --- e-smith-samba-2.0.0.sambaRole/root/etc/e-smith/templates/etc/smb.conf/11logonScript 2003-06-18 14:32:48.000000000 -0600
106     +++ e-smith-samba-2.0.0/root/etc/e-smith/templates/etc/smb.conf/11logonScript 2008-10-13 15:17:03.000000000 -0600
107     @@ -6,7 +6,7 @@
108     # run a specific logon batch file per username
109     # ; logon script = %U.bat\n\n";
110    
111     - return "" unless ($SMB_DomainMaster eq "yes");
112     + return "" unless $smb{ServerRole} =~ m{^(PDC|BDC|ADS)$};
113    
114     'logon script = netlogon.bat';
115     }
116     diff -ruN e-smith-samba-2.0.0.sambaRole/root/etc/e-smith/templates/etc/smb.conf/11osLevel e-smith-samba-2.0.0/root/etc/e-smith/templates/etc/smb.conf/11osLevel
117     --- e-smith-samba-2.0.0.sambaRole/root/etc/e-smith/templates/etc/smb.conf/11osLevel 2008-10-07 11:37:32.000000000 -0600
118     +++ e-smith-samba-2.0.0/root/etc/e-smith/templates/etc/smb.conf/11osLevel 2008-10-13 15:17:03.000000000 -0600
119     @@ -3,9 +3,7 @@
120     # elections. The default value should be reasonable
121     # os level = 33
122    
123     - return "" unless ($SMB_DomainMaster eq "yes");
124     -
125     my $os_level = $smb{OsLevel} || "65";
126    
127     - "os level = $os_level";
128     + "os level = " . ( $smb{ServerRole} =~ m{^(PDC|BDC|ADS)$} ? $os_level : "65" );
129     }
130     diff -ruN e-smith-samba-2.0.0.sambaRole/root/etc/e-smith/templates/etc/smb.conf/11passwordServer e-smith-samba-2.0.0/root/etc/e-smith/templates/etc/smb.conf/11passwordServer
131     --- e-smith-samba-2.0.0.sambaRole/root/etc/e-smith/templates/etc/smb.conf/11passwordServer 2002-03-12 15:19:39.000000000 -0700
132     +++ e-smith-samba-2.0.0/root/etc/e-smith/templates/etc/smb.conf/11passwordServer 2008-10-13 15:17:03.000000000 -0600
133     @@ -1,4 +1,7 @@
134     {
135     # Use password server option only with security = server
136     # ; password server = <NT-Server-Name>
137     + return "" unless $smb{ServerRole} =~ m{^(DM|ADM)$};
138     +
139     + return "password server = $SMB_WINSServer";
140     }
141     diff -ruN e-smith-samba-2.0.0.sambaRole/root/etc/e-smith/templates/etc/smb.conf/11preferredMaster e-smith-samba-2.0.0/root/etc/e-smith/templates/etc/smb.conf/11preferredMaster
142     --- e-smith-samba-2.0.0.sambaRole/root/etc/e-smith/templates/etc/smb.conf/11preferredMaster 1969-12-31 17:00:00.000000000 -0700
143     +++ e-smith-samba-2.0.0/root/etc/e-smith/templates/etc/smb.conf/11preferredMaster 2008-10-13 15:17:03.000000000 -0600
144     @@ -0,0 +1,3 @@
145     +{
146     + "preferred master = " . ( $smb{ServerRole} =~ m{^(PDC|BDC|ADS)$} ? "yes" : "auto" );
147     +}
148     diff -ruN e-smith-samba-2.0.0.sambaRole/root/etc/e-smith/templates/etc/smb.conf/11remoteAnnounce e-smith-samba-2.0.0/root/etc/e-smith/templates/etc/smb.conf/11remoteAnnounce
149     --- e-smith-samba-2.0.0.sambaRole/root/etc/e-smith/templates/etc/smb.conf/11remoteAnnounce 2002-03-12 15:19:38.000000000 -0700
150     +++ e-smith-samba-2.0.0/root/etc/e-smith/templates/etc/smb.conf/11remoteAnnounce 2008-10-13 15:17:03.000000000 -0600
151     @@ -1,4 +1,7 @@
152     {
153     # Cause this host to announce itself to local subnets here
154     # ; remote announce = 192.168.1.255 192.168.2.44
155     + return "" if $SMB_WINSServer eq $LocalIP;
156     +
157     + return "remote announce = $SMB_WINSServer";
158     }
159     diff -ruN e-smith-samba-2.0.0.sambaRole/root/etc/e-smith/templates/etc/smb.conf/11remoteBrowseSync e-smith-samba-2.0.0/root/etc/e-smith/templates/etc/smb.conf/11remoteBrowseSync
160     --- e-smith-samba-2.0.0.sambaRole/root/etc/e-smith/templates/etc/smb.conf/11remoteBrowseSync 2002-03-12 15:19:38.000000000 -0700
161     +++ e-smith-samba-2.0.0/root/etc/e-smith/templates/etc/smb.conf/11remoteBrowseSync 2008-10-13 15:17:03.000000000 -0600
162     @@ -3,4 +3,7 @@
163     # request announcement to, or browse list sync from:
164     # a specific host or from / to a whole subnet (see below)
165     # ; remote browse sync = 192.168.3.25 192.168.5.255
166     + return "" if $SMB_WINSServer eq $LocalIP;
167     +
168     + return "remote browse sync = $SMB_WINSServer";
169     }
170     diff -ruN e-smith-samba-2.0.0.sambaRole/root/etc/e-smith/templates/etc/smb.conf/11security e-smith-samba-2.0.0/root/etc/e-smith/templates/etc/smb.conf/11security
171     --- e-smith-samba-2.0.0.sambaRole/root/etc/e-smith/templates/etc/smb.conf/11security 2002-03-12 15:19:38.000000000 -0700
172     +++ e-smith-samba-2.0.0/root/etc/e-smith/templates/etc/smb.conf/11security 2008-10-13 15:17:03.000000000 -0600
173     @@ -2,4 +2,12 @@
174     # Security mode. Most people will want user level security. See
175     # security_level.txt for details.
176     }
177     -security = user
178     +security = {
179     + if ($smb{ServerRole} eq "DM") {
180     + "domain";
181     + } elsif ($smb{ServerRole} eq "ADS") {
182     + "ADS";
183     + } else {
184     + "user";
185     + }
186     +}
187     diff -ruN e-smith-samba-2.0.0.sambaRole/root/etc/e-smith/templates/etc/smb.conf/11winsServer e-smith-samba-2.0.0/root/etc/e-smith/templates/etc/smb.conf/11winsServer
188     --- e-smith-samba-2.0.0.sambaRole/root/etc/e-smith/templates/etc/smb.conf/11winsServer 2003-07-02 15:23:35.000000000 -0600
189     +++ e-smith-samba-2.0.0/root/etc/e-smith/templates/etc/smb.conf/11winsServer 2008-10-13 15:18:22.000000000 -0600
190     @@ -6,9 +6,8 @@
191     # WINS Support - Tells the NMBD component of Samba to enable its WINS Server
192     # WINS Server - Tells the NMBD components of Samba to be a WINS Client
193     #------------------------------------------------------------------
194     - return "wins support = no" unless (defined $SMB_WINSServer);
195     + return "wins support = yes" if $SMB_WINSServer eq $LocalIP;
196    
197     - return "wins support = yes" if ($SMB_DomainMaster eq 'yes');
198     -
199     - return "wins server = $SMB_WINSServer";
200     + $OUT .= "wins support = no\n";
201     + $OUT .= "wins server = $SMB_WINSServer";
202     }
203     diff -ruN e-smith-samba-2.0.0.sambaRole/root/etc/e-smith/templates/etc/smb.conf/61netlogonshare e-smith-samba-2.0.0/root/etc/e-smith/templates/etc/smb.conf/61netlogonshare
204     --- e-smith-samba-2.0.0.sambaRole/root/etc/e-smith/templates/etc/smb.conf/61netlogonshare 2003-06-18 14:32:48.000000000 -0600
205     +++ e-smith-samba-2.0.0/root/etc/e-smith/templates/etc/smb.conf/61netlogonshare 2008-10-13 15:17:56.000000000 -0600
206     @@ -1,5 +1,5 @@
207     {
208     - return "" unless ($SMB_DomainMaster eq "yes");
209     + return "" unless $smb{ServerRole} =~ m{^(PDC|ADS|BDC)$};
210    
211     $OUT .= <<HERE;
212     [netlogon]
213     diff -ruN e-smith-samba-2.0.0.sambaRole/root/etc/e-smith/web/functions/workgroup e-smith-samba-2.0.0/root/etc/e-smith/web/functions/workgroup
214     --- e-smith-samba-2.0.0.sambaRole/root/etc/e-smith/web/functions/workgroup 2007-12-15 08:53:08.000000000 -0700
215     +++ e-smith-samba-2.0.0/root/etc/e-smith/web/functions/workgroup 2008-10-13 15:17:03.000000000 -0600
216     @@ -69,8 +69,8 @@
217     'Finding the Samba RoamingProfiles field');
218     ok ($ua->{form}->find_input('ServerName'),
219     'Finding the Samba ServerName field');
220     -ok ($ua->{form}->find_input('DomainMaster'),
221     - 'Finding the Samba DomainMaster field');
222     +ok ($ua->{form}->find_input('ServerRole'),
223     + 'Finding the Samba ServerRole field');
224    
225     SKIP: {
226     skip 7, "Unsafe!" unless destruction_ok();
227     @@ -78,7 +78,7 @@
228     $ua->field('Workgroup' => 'foo');
229     $ua->field('RoamingProfiles' => 'yes');
230     $ua->field('ServerName' => 'Blah');
231     - $ua->field('DomainMaster' => 'yes');
232     + $ua->field('ServerRole' => 'PDC');
233    
234    
235     ok ($ua->click("Save"), "Click Save");
236     @@ -91,7 +91,7 @@
237     is ($db->get('smb')->value('Workgroup'), 'foo', 'Validated value for Samba Workgroup');
238     is ($db->get('smb')->prop('RoamingProfiles'), 'yes', 'Validated value for Samba RoamingProfiles');
239     is ($db->get('smb')->prop('ServerName'), 'Blah', 'Validated value for Samba ServerName');
240     - is ($db->get('smb')->prop('DomainMaster'), 'yes', 'Validated value for Samba DomainMaster');
241     + is ($db->get('smb')->prop('ServerRole'), 'PDC', 'Validated value for Samba ServerRole');
242     }
243    
244     ok ($ua->get_panel($panel), "Testing panel retrieval");
245     @@ -127,9 +127,9 @@
246     <description>DESC_SERVERNAME</description>
247     </field>
248     <field type="select"
249     - id="DomainMaster"
250     - options="'yes' => 'YES', 'no' => 'NO'"
251     - value="get_value('DomainMaster')">
252     + id="ServerRole"
253     + options="'PDC' => 'YES', 'WS' => 'NO'"
254     + value="get_value('ServerRole')">
255     <label>LABEL_PDC</label>
256     <description>DESC_PDC</description>
257     </field>
258     diff -ruN e-smith-samba-2.0.0.sambaRole/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/workgroup.pm e-smith-samba-2.0.0/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/workgroup.pm
259     --- e-smith-samba-2.0.0.sambaRole/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/workgroup.pm 2007-12-15 08:53:08.000000000 -0700
260     +++ e-smith-samba-2.0.0/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/workgroup.pm 2008-10-13 15:17:03.000000000 -0600
261     @@ -178,10 +178,10 @@
262     my $q = $self->{'cgi'};
263    
264     my $RoamingProfiles = ($q->param('RoamingProfiles') || 'no');
265     - my $DomainMaster = ($q->param('DomainMaster') || 'yes');
266     + my $ServerRole = ($q->param('ServerRole') || 'WS');
267    
268     $db->get('smb')->set_prop('Workgroup', $q->param('Workgroup'));
269     - $db->get('smb')->set_prop('DomainMaster', $DomainMaster);
270     + $db->get('smb')->set_prop('ServerRole', $ServerRole);
271     $db->get('smb')->set_prop('ServerName', $q->param('ServerName'));
272     $db->get('smb')->set_prop("RoamingProfiles", $RoamingProfiles);
273    

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