1 |
diff -Nur -x '*.orig' -x '*.rej' smeserver-shared-folders-0.1/createlinks mezzanine_patched_smeserver-shared-folders-0.1/createlinks |
diff -Nur smeserver-shared-folders-0.1/createlinks smeserver-shared-folders-0.1_mod/createlinks |
2 |
--- smeserver-shared-folders-0.1/createlinks 2012-02-13 20:08:07.000000000 +0100 |
--- smeserver-shared-folders-0.1/createlinks 2012-02-17 18:12:49.000000000 +0100 |
3 |
+++ mezzanine_patched_smeserver-shared-folders-0.1/createlinks 2012-02-13 20:08:04.000000000 +0100 |
+++ smeserver-shared-folders-0.1_mod/createlinks 2012-02-17 17:28:33.000000000 +0100 |
4 |
@@ -11,12 +11,12 @@ |
@@ -11,12 +11,12 @@ |
5 |
panel_link("userpanel-encfs", $panel); |
panel_link("userpanel-encfs", $panel); |
6 |
|
|
18 |
|
|
19 |
#-------------------------------------------------- |
#-------------------------------------------------- |
20 |
# actions for share-delete event |
# actions for share-delete event |
21 |
diff -Nur -x '*.orig' -x '*.rej' smeserver-shared-folders-0.1/root/etc/e-smith/events/actions/group-share-modify mezzanine_patched_smeserver-shared-folders-0.1/root/etc/e-smith/events/actions/group-share-modify |
diff -Nur smeserver-shared-folders-0.1/root/etc/e-smith/events/actions/group-share-modify smeserver-shared-folders-0.1_mod/root/etc/e-smith/events/actions/group-share-modify |
22 |
--- smeserver-shared-folders-0.1/root/etc/e-smith/events/actions/group-share-modify 2012-02-13 20:08:07.000000000 +0100 |
--- smeserver-shared-folders-0.1/root/etc/e-smith/events/actions/group-share-modify 2012-02-17 18:12:49.000000000 +0100 |
23 |
+++ mezzanine_patched_smeserver-shared-folders-0.1/root/etc/e-smith/events/actions/group-share-modify 2012-02-08 15:39:15.000000000 +0100 |
+++ smeserver-shared-folders-0.1_mod/root/etc/e-smith/events/actions/group-share-modify 2012-02-17 17:28:33.000000000 +0100 |
24 |
@@ -7,40 +7,47 @@ |
@@ -7,40 +7,47 @@ |
25 |
my $accounts = esmith::AccountsDB->open() or |
my $accounts = esmith::AccountsDB->open() or |
26 |
die "Unable to open accounts db: $!"; |
die "Unable to open accounts db: $!"; |
84 |
event_signal("share-modify-files", $share->key) or |
event_signal("share-modify-files", $share->key) or |
85 |
die ("Error occurred while updating shared folder.\n"); |
die ("Error occurred while updating shared folder.\n"); |
86 |
} |
} |
87 |
diff -Nur -x '*.orig' -x '*.rej' smeserver-shared-folders-0.1/root/etc/e-smith/events/actions/share-modify mezzanine_patched_smeserver-shared-folders-0.1/root/etc/e-smith/events/actions/share-modify |
diff -Nur smeserver-shared-folders-0.1/root/etc/e-smith/events/actions/share-modify smeserver-shared-folders-0.1_mod/root/etc/e-smith/events/actions/share-modify |
88 |
--- smeserver-shared-folders-0.1/root/etc/e-smith/events/actions/share-modify 2012-02-13 20:08:07.000000000 +0100 |
--- smeserver-shared-folders-0.1/root/etc/e-smith/events/actions/share-modify 2012-02-17 18:12:49.000000000 +0100 |
89 |
+++ mezzanine_patched_smeserver-shared-folders-0.1/root/etc/e-smith/events/actions/share-modify 2012-02-08 15:18:24.000000000 +0100 |
+++ smeserver-shared-folders-0.1_mod/root/etc/e-smith/events/actions/share-modify 2012-02-17 17:28:33.000000000 +0100 |
90 |
@@ -90,8 +90,10 @@ |
@@ -90,8 +90,10 @@ |
91 |
#-------------------------------------------------- |
#-------------------------------------------------- |
92 |
|
|
135 |
|
|
136 |
system($setfacl, |
system($setfacl, |
137 |
'-m', |
'-m', |
138 |
diff -Nur -x '*.orig' -x '*.rej' smeserver-shared-folders-0.1/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/shares mezzanine_patched_smeserver-shared-folders-0.1/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/shares |
diff -Nur smeserver-shared-folders-0.1/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/shares smeserver-shared-folders-0.1_mod/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/shares |
139 |
--- smeserver-shared-folders-0.1/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/shares 2012-02-13 20:08:07.000000000 +0100 |
--- smeserver-shared-folders-0.1/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/shares 2012-02-17 18:12:49.000000000 +0100 |
140 |
+++ mezzanine_patched_smeserver-shared-folders-0.1/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/shares 2012-02-11 02:06:41.000000000 +0100 |
+++ smeserver-shared-folders-0.1_mod/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/shares 2012-02-17 17:28:33.000000000 +0100 |
141 |
@@ -155,7 +155,7 @@ |
@@ -155,7 +155,7 @@ |
142 |
<entry> |
<entry> |
143 |
<base>DESC_PERMISSIONS</base> |
<base>DESC_PERMISSIONS</base> |
164 |
+ </entry> |
+ </entry> |
165 |
+ |
+ |
166 |
</lexicon> |
</lexicon> |
167 |
diff -Nur -x '*.orig' -x '*.rej' smeserver-shared-folders-0.1/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/90e-smithAccess50shares mezzanine_patched_smeserver-shared-folders-0.1/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/90e-smithAccess50shares |
diff -Nur smeserver-shared-folders-0.1/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/90e-smithAccess50shares smeserver-shared-folders-0.1_mod/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/90e-smithAccess50shares |
168 |
--- smeserver-shared-folders-0.1/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/90e-smithAccess50shares 2012-02-13 20:08:07.000000000 +0100 |
--- smeserver-shared-folders-0.1/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/90e-smithAccess50shares 2012-02-17 18:12:49.000000000 +0100 |
169 |
+++ mezzanine_patched_smeserver-shared-folders-0.1/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/90e-smithAccess50shares 2012-02-08 15:17:54.000000000 +0100 |
+++ smeserver-shared-folders-0.1_mod/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/90e-smithAccess50shares 2012-02-17 17:28:33.000000000 +0100 |
170 |
@@ -16,7 +16,7 @@ |
@@ -16,7 +16,7 @@ |
171 |
my $satisfy; |
my $satisfy; |
172 |
my $webdav = (($properties{'WebDav'} || 'disabled') =~ m/^(enabled|on|yes)$/i) ? 1 : 0; |
my $webdav = (($properties{'WebDav'} || 'disabled') =~ m/^(enabled|on|yes)$/i) ? 1 : 0; |
208 |
|
|
209 |
my %seen = (); |
my %seen = (); |
210 |
@readers = sort (grep { ! $seen{ $_ }++ } (@readers,@writers)); |
@readers = sort (grep { ! $seen{ $_ }++ } (@readers,@writers)); |
211 |
diff -Nur -x '*.orig' -x '*.rej' smeserver-shared-folders-0.1/root/etc/e-smith/web/functions/shares mezzanine_patched_smeserver-shared-folders-0.1/root/etc/e-smith/web/functions/shares |
diff -Nur smeserver-shared-folders-0.1/root/etc/e-smith/web/functions/shares smeserver-shared-folders-0.1_mod/root/etc/e-smith/web/functions/shares |
212 |
--- smeserver-shared-folders-0.1/root/etc/e-smith/web/functions/shares 2012-02-13 20:08:07.000000000 +0100 |
--- smeserver-shared-folders-0.1/root/etc/e-smith/web/functions/shares 2012-02-17 18:12:49.000000000 +0100 |
213 |
+++ mezzanine_patched_smeserver-shared-folders-0.1/root/etc/e-smith/web/functions/shares 2012-02-11 01:57:28.000000000 +0100 |
+++ smeserver-shared-folders-0.1_mod/root/etc/e-smith/web/functions/shares 2012-02-17 17:28:33.000000000 +0100 |
214 |
@@ -51,16 +51,6 @@ |
@@ -51,16 +51,6 @@ |
215 |
|
|
216 |
<field |
<field |
242 |
+ </page> |
+ </page> |
243 |
</form> |
</form> |
244 |
|
|
245 |
diff -Nur -x '*.orig' -x '*.rej' smeserver-shared-folders-0.1/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/shares.pm mezzanine_patched_smeserver-shared-folders-0.1/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/shares.pm |
diff -Nur smeserver-shared-folders-0.1/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/shares.pm smeserver-shared-folders-0.1_mod/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/shares.pm |
246 |
--- smeserver-shared-folders-0.1/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/shares.pm 2012-02-13 20:08:07.000000000 +0100 |
--- smeserver-shared-folders-0.1/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/shares.pm 2012-02-17 18:12:49.000000000 +0100 |
247 |
+++ mezzanine_patched_smeserver-shared-folders-0.1/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/shares.pm 2012-02-11 01:56:52.000000000 +0100 |
+++ smeserver-shared-folders-0.1_mod/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/shares.pm 2012-02-17 18:13:09.000000000 +0100 |
248 |
@@ -26,7 +26,7 @@ |
@@ -26,7 +26,7 @@ |
249 |
print_share_name_field |
print_share_name_field |
250 |
print_encryption_fields |
print_encryption_fields |
254 |
smbAccess_list |
smbAccess_list |
255 |
httpAccess_list |
httpAccess_list |
256 |
max_share_name_length |
max_share_name_length |
257 |
@@ -38,10 +38,9 @@ |
@@ -40,8 +40,8 @@ |
|
print_section_bar |
|
|
); |
|
258 |
|
|
259 |
-our $VERSION = sprintf '%d.%03d', q$Revision: 1.8 $ =~ /: (\d+).(\d+)/; |
our $VERSION = sprintf '%d.%03d', q$Revision: 1.8 $ =~ /: (\d+).(\d+)/; |
260 |
|
|
261 |
-our $accountdb = esmith::AccountsDB->open(); |
-our $accountdb = esmith::AccountsDB->open(); |
262 |
-our $configdb = esmith::ConfigDB->open(); |
-our $configdb = esmith::ConfigDB->open(); |
265 |
|
|
266 |
*wherenext = \&CGI::FormMagick::wherenext; |
*wherenext = \&CGI::FormMagick::wherenext; |
267 |
|
|
268 |
@@ -62,12 +61,12 @@ |
@@ -62,12 +62,12 @@ |
269 |
my $name = $self->localise('NAME'); |
my $name = $self->localise('NAME'); |
270 |
my $description = $self->localise('DESCRIPTION'); |
my $description = $self->localise('DESCRIPTION'); |
271 |
my $modify = $self->localise('MODIFY'); |
my $modify = $self->localise('MODIFY'); |
281 |
print $q->Tr($q->td($self->localise('NO_SHARES'))); |
print $q->Tr($q->td($self->localise('NO_SHARES'))); |
282 |
return ""; |
return ""; |
283 |
} |
} |
284 |
@@ -81,22 +80,25 @@ |
@@ -81,22 +81,25 @@ |
285 |
|
|
286 |
my $scriptname = basename($0); |
my $scriptname = basename($0); |
287 |
|
|
311 |
esmith::cgi::genSmallCell($q, $actionModify,"normal"), |
esmith::cgi::genSmallCell($q, $actionModify,"normal"), |
312 |
esmith::cgi::genSmallCell($q, $actionRemove,"normal") |
esmith::cgi::genSmallCell($q, $actionRemove,"normal") |
313 |
); |
); |
314 |
@@ -109,58 +111,55 @@ |
@@ -109,58 +112,55 @@ |
315 |
|
|
316 |
|
|
317 |
sub print_custom_button{ |
sub print_custom_button{ |
384 |
|
|
385 |
# Clear these values to prevent collisions when the page reloads. |
# Clear these values to prevent collisions when the page reloads. |
386 |
$q->delete("cancel"); |
$q->delete("cancel"); |
387 |
@@ -172,12 +171,13 @@ |
@@ -172,12 +172,13 @@ |
388 |
|
|
389 |
sub print_share_name_field { |
sub print_share_name_field { |
390 |
my $self = shift; |
my $self = shift; |
402 |
$q->param(-name=>'encryption',-value=>'disabled'); |
$q->param(-name=>'encryption',-value=>'disabled'); |
403 |
$q->param(-name=>'inactivity',-value=>'30'); |
$q->param(-name=>'inactivity',-value=>'30'); |
404 |
$q->param(-name=>'smbaccess',-value=>'browseable'); |
$q->param(-name=>'smbaccess',-value=>'browseable'); |
405 |
@@ -204,7 +204,7 @@ |
@@ -204,7 +205,7 @@ |
406 |
# Read the values for each field from the accounts db and store |
# Read the values for each field from the accounts db and store |
407 |
# them in the cgi object so our form will have the correct |
# them in the cgi object so our form will have the correct |
408 |
# info displayed. |
# info displayed. |
411 |
if ($rec) |
if ($rec) |
412 |
{ |
{ |
413 |
$q->param(-name=>'description',-value=> |
$q->param(-name=>'description',-value=> |
414 |
@@ -213,10 +213,6 @@ |
@@ -213,10 +214,6 @@ |
415 |
($rec->prop('Encryption') || 'disabled')); |
($rec->prop('Encryption') || 'disabled')); |
416 |
$q->param(-name=>'inactivity',-value=> |
$q->param(-name=>'inactivity',-value=> |
417 |
($rec->prop('InactivityTimeOut') || '30')); |
($rec->prop('InactivityTimeOut') || '30')); |
422 |
$q->param(-name=>'smbaccess',-value=> |
$q->param(-name=>'smbaccess',-value=> |
423 |
($rec->prop('smbAccess') || 'enabled')); |
($rec->prop('smbAccess') || 'enabled')); |
424 |
$q->param(-name=>'recyclebin',-value=> |
$q->param(-name=>'recyclebin',-value=> |
425 |
@@ -233,8 +229,6 @@ |
@@ -233,8 +230,6 @@ |
426 |
($rec->prop('Indexes') || 'enabled')); |
($rec->prop('Indexes') || 'enabled')); |
427 |
$q->param(-name=>'dynamic',-value=> |
$q->param(-name=>'dynamic',-value=> |
428 |
($rec->prop('DynamicContent') || 'disabled')); |
($rec->prop('DynamicContent') || 'disabled')); |
431 |
} |
} |
432 |
} |
} |
433 |
else { |
else { |
434 |
@@ -253,18 +247,19 @@ |
@@ -253,18 +248,19 @@ |
435 |
# If EncFS is available, print encryptions options |
# If EncFS is available, print encryptions options |
436 |
sub print_encryption_fields { |
sub print_encryption_fields { |
437 |
my $self = shift; |
my $self = shift; |
456 |
|
|
457 |
print_section_bar(); |
print_section_bar(); |
458 |
|
|
459 |
@@ -316,13 +311,13 @@ |
@@ -316,13 +312,13 @@ |
460 |
|
|
461 |
# If ajaxplorer is enabled: |
# If ajaxplorer is enabled: |
462 |
sub print_ajaxplorer_fields { |
sub print_ajaxplorer_fields { |
473 |
# If share exists and Ajxplorer is enabled |
# If share exists and Ajxplorer is enabled |
474 |
if ($share){ |
if ($share){ |
475 |
if (($share->prop('Ajaxplorer') || 'disabled') eq 'enabled'){ |
if (($share->prop('Ajaxplorer') || 'disabled') eq 'enabled'){ |
476 |
@@ -345,24 +340,31 @@ |
@@ -345,24 +341,31 @@ |
477 |
return undef; |
return undef; |
478 |
} |
} |
479 |
|
|
516 |
|
|
517 |
foreach my $group ( split ( /[,;]/, $WriteGroups ) ) { |
foreach my $group ( split ( /[,;]/, $WriteGroups ) ) { |
518 |
$WriteGroups{$group} = 1; |
$WriteGroups{$group} = 1; |
519 |
@@ -370,22 +372,31 @@ |
@@ -370,22 +373,31 @@ |
520 |
foreach my $group ( split ( /[,;]/, $ReadGroups ) ) { |
foreach my $group ( split ( /[,;]/, $ReadGroups ) ) { |
521 |
$ReadGroups{$group} = 1; |
$ReadGroups{$group} = 1; |
522 |
} |
} |
553 |
if ( $WriteGroups{$name} ) { |
if ( $WriteGroups{$name} ) { |
554 |
$write = "checked"; |
$write = "checked"; |
555 |
} |
} |
556 |
@@ -395,23 +406,56 @@ |
@@ -395,23 +407,56 @@ |
557 |
|
|
558 |
$out .= $q->Tr( |
$out .= $q->Tr( |
559 |
esmith::cgi::genSmallCell($q, $name, "normal"), |
esmith::cgi::genSmallCell($q, $name, "normal"), |
613 |
print " <tr>\n <td colspan='2'>\n"; |
print " <tr>\n <td colspan='2'>\n"; |
614 |
print "<hr class=\"sectionbar\"/>\n"; |
print "<hr class=\"sectionbar\"/>\n"; |
615 |
return undef; |
return undef; |
616 |
@@ -423,8 +467,8 @@ |
@@ -423,8 +468,8 @@ |
617 |
|
|
618 |
sub smbAccess_list { |
sub smbAccess_list { |
619 |
return { |
return { |
624 |
'non-browseable' => 'ENABLED_NON_BROWSEABLE', |
'non-browseable' => 'ENABLED_NON_BROWSEABLE', |
625 |
}; |
}; |
626 |
} |
} |
627 |
@@ -453,12 +497,13 @@ |
@@ -453,12 +498,13 @@ |
628 |
|
|
629 |
sub max_share_name_length { |
sub max_share_name_length { |
630 |
my ($self, $data) = @_; |
my ($self, $data) = @_; |
641 |
return $self->localise("MAX_SHARE_NAME_LENGTH_ERROR", |
return $self->localise("MAX_SHARE_NAME_LENGTH_ERROR", |
642 |
{acctName => $data, |
{acctName => $data, |
643 |
maxShareNameLength => $max, |
maxShareNameLength => $max, |
644 |
@@ -466,46 +511,20 @@ |
@@ -466,46 +512,20 @@ |
645 |
} |
} |
646 |
} |
} |
647 |
|
|
697 |
$self->modify_share(); |
$self->modify_share(); |
698 |
} |
} |
699 |
} |
} |
700 |
@@ -513,12 +532,13 @@ |
@@ -513,12 +533,13 @@ |
701 |
# Print save or add button |
# Print save or add button |
702 |
|
|
703 |
sub print_save_or_add_button { |
sub print_save_or_add_button { |
713 |
$self->print_button("ADD"); |
$self->print_button("ADD"); |
714 |
} |
} |
715 |
|
|
716 |
@@ -527,79 +547,54 @@ |
@@ -527,79 +548,54 @@ |
717 |
# Create a new shared folder |
# Create a new shared folder |
718 |
|
|
719 |
sub create_share { |
sub create_share { |
819 |
my $source = '/home/e-smith/files/shares/' . $name . '/.store'; |
my $source = '/home/e-smith/files/shares/' . $name . '/.store'; |
820 |
my $dest = '/home/e-smith/files/shares/' . $name . '/files'; |
my $dest = '/home/e-smith/files/shares/' . $name . '/files'; |
821 |
File::Path::mkpath ($source); |
File::Path::mkpath ($source); |
822 |
@@ -614,10 +609,12 @@ |
@@ -614,10 +610,12 @@ |
823 |
|
|
824 |
if (system ("/sbin/e-smith/signal-event", "share-create", $name) == 0) { |
if (system ("/sbin/e-smith/signal-event", "share-create", $name) == 0) { |
825 |
$self->success("SUCCESSFULLY_CREATED_SHARE"); |
$self->success("SUCCESSFULLY_CREATED_SHARE"); |
834 |
$self->error('CANT_CREATE_SHARE'); |
$self->error('CANT_CREATE_SHARE'); |
835 |
} |
} |
836 |
} |
} |
837 |
@@ -625,118 +622,155 @@ |
@@ -625,118 +623,155 @@ |
838 |
# Modify a share. |
# Modify a share. |
839 |
# This sub shares a lot of code with create share |
# This sub shares a lot of code with create share |
840 |
# It should be merged |
# It should be merged |
1082 |
return $self->localise('ACCT_NAME_HAS_INVALID_CHARS', |
return $self->localise('ACCT_NAME_HAS_INVALID_CHARS', |
1083 |
{acctName => $acctName}); |
{acctName => $acctName}); |
1084 |
} |
} |
1085 |
@@ -744,13 +778,10 @@ |
@@ -744,13 +779,10 @@ |
1086 |
} |
} |
1087 |
|
|
1088 |
# Check if inactivity is a number |
# Check if inactivity is a number |
1098 |
return $self->localise('INVALID_INACTIVITY', |
return $self->localise('INVALID_INACTIVITY', |
1099 |
{inactivity => $inac}); |
{inactivity => $inac}); |
1100 |
} |
} |
1101 |
@@ -759,9 +790,7 @@ |
@@ -759,9 +791,7 @@ |
1102 |
|
|
1103 |
# Check if both passwords match |
# Check if both passwords match |
1104 |
# and are more than 8 chars |
# and are more than 8 chars |