/[smecontribs]/rpms/smeserver-phpvirtualbox/contribs10/smeserver-phpvirtualbox-5.2.1-samba_share.patch
ViewVC logotype

Annotation of /rpms/smeserver-phpvirtualbox/contribs10/smeserver-phpvirtualbox-5.2.1-samba_share.patch

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


Revision 1.1 - (hide annotations) (download)
Sun Mar 19 03:53:35 2023 UTC (20 months, 2 weeks ago) by trevorb
Branch: MAIN
CVS Tags: smeserver-phpvirtualbox-5_2_1-5_el7_sme, HEAD
samba share patch bugs #12336 and #12337

1 trevorb 1.1 diff -urN smeserver-phpvirtualbox-5.2.1.old/root/etc/e-smith/db/configuration/defaults/phpvirtualbox/samba smeserver-phpvirtualbox-5.2.1/root/etc/e-smith/db/configuration/defaults/phpvirtualbox/samba
2     --- smeserver-phpvirtualbox-5.2.1.old/root/etc/e-smith/db/configuration/defaults/phpvirtualbox/samba 1970-01-01 10:00:00.000000000 +1000
3     +++ smeserver-phpvirtualbox-5.2.1/root/etc/e-smith/db/configuration/defaults/phpvirtualbox/samba 2023-03-19 14:38:18.000000000 +1100
4     @@ -0,0 +1 @@
5     +all
6     \ No newline at end of file
7     diff -urN smeserver-phpvirtualbox-5.2.1.old/root/etc/e-smith/templates/etc/smb.conf/60phpvirtualbox smeserver-phpvirtualbox-5.2.1/root/etc/e-smith/templates/etc/smb.conf/60phpvirtualbox
8     --- smeserver-phpvirtualbox-5.2.1.old/root/etc/e-smith/templates/etc/smb.conf/60phpvirtualbox 2023-03-19 14:43:29.380771500 +1100
9     +++ smeserver-phpvirtualbox-5.2.1/root/etc/e-smith/templates/etc/smb.conf/60phpvirtualbox 2023-03-19 14:37:11.000000000 +1100
10     @@ -1,14 +1,36 @@
11     {
12     + if ($phpvirtualbox{'status'} ne 'enabled') {
13     + return;
14     + }
15     + my $samba = ($phpvirtualbox{'samba'} || 'all');
16     + if ($samba ne 'all' && $samba ne 'adminUser') {
17     + return;
18     + }
19     my $validusers = '';
20     - if ($phpvirtualbox{'adminUser'} || $phpvirtualbox{'userGroups'}) {
21     + my @phpvboxusers = split(",", ($phpvirtualbox{'Users'} || "") );
22     + my @phpvboxgroups = split(",", ($phpvirtualbox{'userGroups'} || "") );
23     + if ($samba eq 'all' || $samba eq 'adminUser') {
24     if ($phpvirtualbox{'adminUser'}) {
25     $validusers = "$phpvirtualbox{'adminUser'}";
26     - if ($phpvirtualbox{'userGroups'}) {
27     - $validusers .= ",+$phpvirtualbox{'userGroups'}";
28     + }
29     + }
30     + if ($samba eq 'all') {
31     + if ($phpvirtualbox{'Users'}) {
32     + foreach my $user (@phpvboxusers) {
33     + if ($validusers) {
34     + $validusers .= ",$user";
35     + } else {
36     + $validusers = "$user";
37     + }
38     }
39     - } else {
40     - if ($phpvirtualbox{'userGroups'}) {
41     - $validusers = "+$phpvirtualbox{'userGroups'}";
42     + }
43     + if ($phpvirtualbox{'userGroups'}) {
44     + foreach my $group (@phpvboxgroups) {
45     + if ($validusers) {
46     + $validusers .= ",\@$group";
47     + } else {
48     + $validusers = "\@$group";
49     + }
50     }
51     }
52     }
53     @@ -22,7 +44,7 @@
54     writable = yes
55     printable = no
56     inherit permissions = yes
57     -create mode = 0640
58     +create mode = 0777
59    
60     _VBOX
61    
62     @@ -30,4 +52,4 @@
63     $OUT .= "valid users = $validusers\n";
64     }
65    
66     -}
67     \ No newline at end of file
68     +}
69     diff -urN smeserver-phpvirtualbox-5.2.1.old/root/etc/e-smith/templates/opt/phpvirtualbox/config.php/config.php smeserver-phpvirtualbox-5.2.1/root/etc/e-smith/templates/opt/phpvirtualbox/config.php/config.php
70     --- smeserver-phpvirtualbox-5.2.1.old/root/etc/e-smith/templates/opt/phpvirtualbox/config.php/config.php 2023-03-19 14:43:29.380771500 +1100
71     +++ smeserver-phpvirtualbox-5.2.1/root/etc/e-smith/templates/opt/phpvirtualbox/config.php/config.php 2023-03-19 14:37:53.000000000 +1100
72     @@ -78,7 +78,7 @@
73    
74     # allow inclusion of any generic parameter stored in config db for phpvirtualbox
75     $OUT .= "# additional parameters defined in configuration DB\n";
76     - my @stdparms = qw(type status Name Users userGroups adminUser adminGroup authtype language vrdeports maxProgressList deleteOnRemove browserRestrictFiles browserRestrictFolders consolresolutions hostMemInfoRefreshInterval consoleKeyboardLayout nicMax);
77     + my @stdparms = qw(type status Name samba Users userGroups adminUser adminGroup authtype language vrdeports maxProgressList deleteOnRemove browserRestrictFiles browserRestrictFolders consolresolutions hostMemInfoRefreshInterval consoleKeyboardLayout nicMax);
78     while (my ($param, $value) = each (%phpvirtualbox)) {
79     next if ( $param ~~ @stdparms );
80     $OUT .= "var \$$param = $value;\n";

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