/[smecontribs]/rpms/smeserver-tw-logonscript/contribs10/smeserver-tw-logonscript-1.5-bz11039-bz6511.patch
ViewVC logotype

Annotation of /rpms/smeserver-tw-logonscript/contribs10/smeserver-tw-logonscript-1.5-bz11039-bz6511.patch

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


Revision 1.1 - (hide annotations) (download)
Mon Apr 19 02:05:58 2021 UTC (3 years, 6 months ago) by jpp
Branch: MAIN
CVS Tags: smeserver-tw-logonscript-1_5-7_el7_sme
* Sun Apr 18 2021 Jean-Philippe Pialasse <tests@pialasse.com> 1.5-7.sme
- fix pannel warnings and errors [SME: 11039]
- Incorrect file premission netlogon *.bat [SME: 6511]

1 jpp 1.1 diff -Nur --no-dereference smeserver-tw-logonscript-1.5.old/root/home/e-smith/files/samba/netlogon/logon_script smeserver-tw-logonscript-1.5/root/home/e-smith/files/samba/netlogon/logon_script
2     --- smeserver-tw-logonscript-1.5.old/root/home/e-smith/files/samba/netlogon/logon_script 2015-09-08 10:18:48.000000000 -0400
3     +++ smeserver-tw-logonscript-1.5/root/home/e-smith/files/samba/netlogon/logon_script 2021-04-18 22:02:43.480000000 -0400
4     @@ -79,4 +79,5 @@
5     print PAMCONF "</pam_mount>\n";
6     close PAMCONF;
7     close LOGON;
8     + chmod(0755, "$netlogon_root/users/$username.bat");
9     close LOG;
10     diff -Nur --no-dereference smeserver-tw-logonscript-1.5.old/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/ibayletters.pm smeserver-tw-logonscript-1.5/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/ibayletters.pm
11     --- smeserver-tw-logonscript-1.5.old/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/ibayletters.pm 2021-04-18 17:39:53.245000000 -0400
12     +++ smeserver-tw-logonscript-1.5/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/ibayletters.pm 2021-04-18 22:02:43.222000000 -0400
13     @@ -155,9 +155,11 @@
14    
15     print $q->end_table,"\n";
16     print $q->hidden (-name => 'IbayLettersSave', -override => 1, -default => 1);
17     - print $q->hidden (-name => 'WorkgroupSave', -override => 1, -default => 0);
18     - print $q->submit (-name => 'sendbutton', -value => 'Save');
19     - print "<a class=\"button-like\" onClick=\"return confirm('".$self->localise('SMB_NEEDS_RESTART_PROCEED')."')\" href=\"ibayletters?WorkgroupSave=1&page=0\">".$self->localise('RELOAD_WORKGROUP_SETTINGS')."</a>";
20     + #now we force reload on every save, previously was default 0 and you needed to use second button
21     + print $q->hidden (-name => 'WorkgroupSave', -override => 1, -default => 1);
22     + print $q->submit (-name => 'sendbutton', -value => $self->localise('SAVE') );
23     + #print "<p>".$self->localise('SMB_NEEDS_RESTART_PROCEED')." </p>";
24     + #print "<input type=\"button\" class=\"button-like\" onClick=\"document.getElementsByName('WorkgroupSave').value = 1; this.form.submit(); \" value=\"".$self->localise('RELOAD_WORKGROUP_SETTINGS')."\">";
25     return "";
26     }
27    
28     @@ -169,20 +171,19 @@
29    
30     my $batchfileName = "/home/e-smith/files/samba/netlogon/custom/$group_name.bat";
31     my @batchfileTemp;
32     - my $batchfileContents;
33     + my $batchfileContents="";
34     my $returnValue;
35     my $q = $self->{cgi};
36    
37     -
38     - open(BATCHFILE,"<$batchfileName") or print $self->localise('FILE_DOES_NOT_EXIT_WILL_BE_CREATED')." $batchfileName";
39     - while(<BATCHFILE>){
40     - push(@batchfileTemp,$_);
41     + if ( -f $batchfileName) {
42     + open(BATCHFILE,"<$batchfileName") or print $self->localise('FILE_DOES_NOT_EXIT_WILL_BE_CREATED')." $batchfileName";
43     + while(<BATCHFILE>){
44     + push(@batchfileTemp,$_);
45     + }
46     + close(BATCHFILE);
47     +
48     + $batchfileContents .= join ("",@batchfileTemp);
49     }
50     - close(BATCHFILE);
51     -
52     -
53     - $batchfileContents .= join ("",@batchfileTemp);
54     -
55     $returnValue ='<textarea name="batchfilecontents" rows="30" cols="60">';
56     $returnValue .= $batchfileContents;
57     $returnValue .= '</textarea><br>';
58     @@ -199,12 +200,12 @@
59     sub save_info {
60     my ($self) = @_;
61    
62     - if( $self->cgi->param('wherenext') eq "CustomBatchGroup"){
63     + if( defined $self->cgi->param('wherenext') && $self->cgi->param('wherenext') eq "CustomBatchGroup"){
64     $self->wherenext('CustomBatchGroup');
65     return;
66     }
67    
68     - if( $self->cgi->param('saveBatchFile') eq "1"){
69     + if( defined $self->cgi->param('saveBatchFile') && $self->cgi->param('saveBatchFile') eq "1"){
70    
71     my $group_name = $self->cgi->param('groupname');
72    
73     @@ -232,6 +233,7 @@
74     open BATCHFILE,">$batchfileName";
75     print BATCHFILE "$batchContents";
76     close(BATCHFILE);
77     + chmod(0755, "$batchfileName");
78     $self->success($self->localise('BATCH_FILE_SAVED_SUCCESSFULLY')." $batchfileName");
79     $self->wherenext('First');
80     return;

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