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-14 19:08:35.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-14 19:09:01.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-14 19:08:35.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-14 19:09:01.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-14 19:08:35.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-14 19:09:01.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-14 19:08:35.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-14 19:09:01.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-14 19:08:35.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-14 19:09:01.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-14 19:08:35.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-14 19:09:01.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-14 19:08:35.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-14 19:09:33.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 @@ |
@@ -38,10 +38,8 @@ |
258 |
print_section_bar |
print_section_bar |
259 |
); |
); |
260 |
|
|
261 |
-our $VERSION = sprintf '%d.%03d', q$Revision: 1.8 $ =~ /: (\d+).(\d+)/; |
-our $VERSION = sprintf '%d.%03d', q$Revision: 1.8 $ =~ /: (\d+).(\d+)/; |
262 |
|
- |
263 |
-our $accountdb = esmith::AccountsDB->open(); |
-our $accountdb = esmith::AccountsDB->open(); |
264 |
-our $configdb = esmith::ConfigDB->open(); |
-our $configdb = esmith::ConfigDB->open(); |
265 |
+our $a = esmith::AccountsDB->open(); |
+our $a = esmith::AccountsDB->open(); |
267 |
|
|
268 |
*wherenext = \&CGI::FormMagick::wherenext; |
*wherenext = \&CGI::FormMagick::wherenext; |
269 |
|
|
270 |
@@ -62,12 +61,12 @@ |
@@ -62,12 +60,12 @@ |
271 |
my $name = $self->localise('NAME'); |
my $name = $self->localise('NAME'); |
272 |
my $description = $self->localise('DESCRIPTION'); |
my $description = $self->localise('DESCRIPTION'); |
273 |
my $modify = $self->localise('MODIFY'); |
my $modify = $self->localise('MODIFY'); |
283 |
print $q->Tr($q->td($self->localise('NO_SHARES'))); |
print $q->Tr($q->td($self->localise('NO_SHARES'))); |
284 |
return ""; |
return ""; |
285 |
} |
} |
286 |
@@ -81,22 +80,25 @@ |
@@ -81,22 +79,25 @@ |
287 |
|
|
288 |
my $scriptname = basename($0); |
my $scriptname = basename($0); |
289 |
|
|
313 |
esmith::cgi::genSmallCell($q, $actionModify,"normal"), |
esmith::cgi::genSmallCell($q, $actionModify,"normal"), |
314 |
esmith::cgi::genSmallCell($q, $actionRemove,"normal") |
esmith::cgi::genSmallCell($q, $actionRemove,"normal") |
315 |
); |
); |
316 |
@@ -109,58 +111,55 @@ |
@@ -109,58 +110,55 @@ |
317 |
|
|
318 |
|
|
319 |
sub print_custom_button{ |
sub print_custom_button{ |
386 |
|
|
387 |
# Clear these values to prevent collisions when the page reloads. |
# Clear these values to prevent collisions when the page reloads. |
388 |
$q->delete("cancel"); |
$q->delete("cancel"); |
389 |
@@ -172,12 +171,13 @@ |
@@ -172,12 +170,13 @@ |
390 |
|
|
391 |
sub print_share_name_field { |
sub print_share_name_field { |
392 |
my $self = shift; |
my $self = shift; |
404 |
$q->param(-name=>'encryption',-value=>'disabled'); |
$q->param(-name=>'encryption',-value=>'disabled'); |
405 |
$q->param(-name=>'inactivity',-value=>'30'); |
$q->param(-name=>'inactivity',-value=>'30'); |
406 |
$q->param(-name=>'smbaccess',-value=>'browseable'); |
$q->param(-name=>'smbaccess',-value=>'browseable'); |
407 |
@@ -204,7 +204,7 @@ |
@@ -204,7 +203,7 @@ |
408 |
# Read the values for each field from the accounts db and store |
# Read the values for each field from the accounts db and store |
409 |
# them in the cgi object so our form will have the correct |
# them in the cgi object so our form will have the correct |
410 |
# info displayed. |
# info displayed. |
413 |
if ($rec) |
if ($rec) |
414 |
{ |
{ |
415 |
$q->param(-name=>'description',-value=> |
$q->param(-name=>'description',-value=> |
416 |
@@ -213,10 +213,6 @@ |
@@ -213,10 +212,6 @@ |
417 |
($rec->prop('Encryption') || 'disabled')); |
($rec->prop('Encryption') || 'disabled')); |
418 |
$q->param(-name=>'inactivity',-value=> |
$q->param(-name=>'inactivity',-value=> |
419 |
($rec->prop('InactivityTimeOut') || '30')); |
($rec->prop('InactivityTimeOut') || '30')); |
424 |
$q->param(-name=>'smbaccess',-value=> |
$q->param(-name=>'smbaccess',-value=> |
425 |
($rec->prop('smbAccess') || 'enabled')); |
($rec->prop('smbAccess') || 'enabled')); |
426 |
$q->param(-name=>'recyclebin',-value=> |
$q->param(-name=>'recyclebin',-value=> |
427 |
@@ -233,8 +229,6 @@ |
@@ -233,8 +228,6 @@ |
428 |
($rec->prop('Indexes') || 'enabled')); |
($rec->prop('Indexes') || 'enabled')); |
429 |
$q->param(-name=>'dynamic',-value=> |
$q->param(-name=>'dynamic',-value=> |
430 |
($rec->prop('DynamicContent') || 'disabled')); |
($rec->prop('DynamicContent') || 'disabled')); |
433 |
} |
} |
434 |
} |
} |
435 |
else { |
else { |
436 |
@@ -253,18 +247,19 @@ |
@@ -253,18 +246,19 @@ |
437 |
# If EncFS is available, print encryptions options |
# If EncFS is available, print encryptions options |
438 |
sub print_encryption_fields { |
sub print_encryption_fields { |
439 |
my $self = shift; |
my $self = shift; |
458 |
|
|
459 |
print_section_bar(); |
print_section_bar(); |
460 |
|
|
461 |
@@ -316,13 +311,13 @@ |
@@ -316,13 +310,13 @@ |
462 |
|
|
463 |
# If ajaxplorer is enabled: |
# If ajaxplorer is enabled: |
464 |
sub print_ajaxplorer_fields { |
sub print_ajaxplorer_fields { |
475 |
# If share exists and Ajxplorer is enabled |
# If share exists and Ajxplorer is enabled |
476 |
if ($share){ |
if ($share){ |
477 |
if (($share->prop('Ajaxplorer') || 'disabled') eq 'enabled'){ |
if (($share->prop('Ajaxplorer') || 'disabled') eq 'enabled'){ |
478 |
@@ -345,24 +340,31 @@ |
@@ -345,24 +339,31 @@ |
479 |
return undef; |
return undef; |
480 |
} |
} |
481 |
|
|
518 |
|
|
519 |
foreach my $group ( split ( /[,;]/, $WriteGroups ) ) { |
foreach my $group ( split ( /[,;]/, $WriteGroups ) ) { |
520 |
$WriteGroups{$group} = 1; |
$WriteGroups{$group} = 1; |
521 |
@@ -370,22 +372,31 @@ |
@@ -370,22 +371,31 @@ |
522 |
foreach my $group ( split ( /[,;]/, $ReadGroups ) ) { |
foreach my $group ( split ( /[,;]/, $ReadGroups ) ) { |
523 |
$ReadGroups{$group} = 1; |
$ReadGroups{$group} = 1; |
524 |
} |
} |
555 |
if ( $WriteGroups{$name} ) { |
if ( $WriteGroups{$name} ) { |
556 |
$write = "checked"; |
$write = "checked"; |
557 |
} |
} |
558 |
@@ -395,23 +406,56 @@ |
@@ -395,23 +405,56 @@ |
559 |
|
|
560 |
$out .= $q->Tr( |
$out .= $q->Tr( |
561 |
esmith::cgi::genSmallCell($q, $name, "normal"), |
esmith::cgi::genSmallCell($q, $name, "normal"), |
615 |
print " <tr>\n <td colspan='2'>\n"; |
print " <tr>\n <td colspan='2'>\n"; |
616 |
print "<hr class=\"sectionbar\"/>\n"; |
print "<hr class=\"sectionbar\"/>\n"; |
617 |
return undef; |
return undef; |
618 |
@@ -423,8 +467,8 @@ |
@@ -423,8 +466,8 @@ |
619 |
|
|
620 |
sub smbAccess_list { |
sub smbAccess_list { |
621 |
return { |
return { |
626 |
'non-browseable' => 'ENABLED_NON_BROWSEABLE', |
'non-browseable' => 'ENABLED_NON_BROWSEABLE', |
627 |
}; |
}; |
628 |
} |
} |
629 |
@@ -453,12 +497,13 @@ |
@@ -453,12 +496,13 @@ |
630 |
|
|
631 |
sub max_share_name_length { |
sub max_share_name_length { |
632 |
my ($self, $data) = @_; |
my ($self, $data) = @_; |
643 |
return $self->localise("MAX_SHARE_NAME_LENGTH_ERROR", |
return $self->localise("MAX_SHARE_NAME_LENGTH_ERROR", |
644 |
{acctName => $data, |
{acctName => $data, |
645 |
maxShareNameLength => $max, |
maxShareNameLength => $max, |
646 |
@@ -466,46 +511,20 @@ |
@@ -466,46 +510,20 @@ |
647 |
} |
} |
648 |
} |
} |
649 |
|
|
699 |
$self->modify_share(); |
$self->modify_share(); |
700 |
} |
} |
701 |
} |
} |
702 |
@@ -513,12 +532,13 @@ |
@@ -513,12 +531,13 @@ |
703 |
# Print save or add button |
# Print save or add button |
704 |
|
|
705 |
sub print_save_or_add_button { |
sub print_save_or_add_button { |
715 |
$self->print_button("ADD"); |
$self->print_button("ADD"); |
716 |
} |
} |
717 |
|
|
718 |
@@ -527,79 +547,54 @@ |
@@ -527,79 +546,54 @@ |
719 |
# Create a new shared folder |
# Create a new shared folder |
720 |
|
|
721 |
sub create_share { |
sub create_share { |
821 |
my $source = '/home/e-smith/files/shares/' . $name . '/.store'; |
my $source = '/home/e-smith/files/shares/' . $name . '/.store'; |
822 |
my $dest = '/home/e-smith/files/shares/' . $name . '/files'; |
my $dest = '/home/e-smith/files/shares/' . $name . '/files'; |
823 |
File::Path::mkpath ($source); |
File::Path::mkpath ($source); |
824 |
@@ -614,10 +609,12 @@ |
@@ -614,10 +608,12 @@ |
825 |
|
|
826 |
if (system ("/sbin/e-smith/signal-event", "share-create", $name) == 0) { |
if (system ("/sbin/e-smith/signal-event", "share-create", $name) == 0) { |
827 |
$self->success("SUCCESSFULLY_CREATED_SHARE"); |
$self->success("SUCCESSFULLY_CREATED_SHARE"); |
836 |
$self->error('CANT_CREATE_SHARE'); |
$self->error('CANT_CREATE_SHARE'); |
837 |
} |
} |
838 |
} |
} |
839 |
@@ -625,118 +622,155 @@ |
@@ -625,118 +621,155 @@ |
840 |
# Modify a share. |
# Modify a share. |
841 |
# This sub shares a lot of code with create share |
# This sub shares a lot of code with create share |
842 |
# It should be merged |
# It should be merged |
1084 |
return $self->localise('ACCT_NAME_HAS_INVALID_CHARS', |
return $self->localise('ACCT_NAME_HAS_INVALID_CHARS', |
1085 |
{acctName => $acctName}); |
{acctName => $acctName}); |
1086 |
} |
} |
1087 |
@@ -744,13 +778,10 @@ |
@@ -744,13 +777,10 @@ |
1088 |
} |
} |
1089 |
|
|
1090 |
# Check if inactivity is a number |
# Check if inactivity is a number |
1100 |
return $self->localise('INVALID_INACTIVITY', |
return $self->localise('INVALID_INACTIVITY', |
1101 |
{inactivity => $inac}); |
{inactivity => $inac}); |
1102 |
} |
} |
1103 |
@@ -759,9 +790,7 @@ |
@@ -759,9 +789,7 @@ |
1104 |
|
|
1105 |
# Check if both passwords match |
# Check if both passwords match |
1106 |
# and are more than 8 chars |
# and are more than 8 chars |