summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone/fileshareset
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2001-11-29 16:28:41 +0000
committerPascal Rigaux <pixel@mandriva.com>2001-11-29 16:28:41 +0000
commit687a9e6fa2f60f07fa9126504ebde02cf905aaf6 (patch)
tree7c9ae3e0703d1d334d5b6a994f69d573f467ea1b /perl-install/standalone/fileshareset
parentd866c49497b07c598960c22c7d150824086465aa (diff)
downloaddrakx-687a9e6fa2f60f07fa9126504ebde02cf905aaf6.tar
drakx-687a9e6fa2f60f07fa9126504ebde02cf905aaf6.tar.gz
drakx-687a9e6fa2f60f07fa9126504ebde02cf905aaf6.tar.bz2
drakx-687a9e6fa2f60f07fa9126504ebde02cf905aaf6.tar.xz
drakx-687a9e6fa2f60f07fa9126504ebde02cf905aaf6.zip
- allow root to export everything
- remove empty mntpoint (from smb)
Diffstat (limited to 'perl-install/standalone/fileshareset')
-rwxr-xr-xperl-install/standalone/fileshareset4
1 files changed, 2 insertions, 2 deletions
diff --git a/perl-install/standalone/fileshareset b/perl-install/standalone/fileshareset
index 4a0ecc78a..e2185b07a 100755
--- a/perl-install/standalone/fileshareset
+++ b/perl-install/standalone/fileshareset
@@ -91,11 +91,11 @@ if ($0 =~ /fileshareset/) {
$export->update_server;
}
}
-my @mntpoints = uniq(map { map { $_->{mntpoint} } @$_ } @exports);
+my @mntpoints = grep {$_} uniq(map { map { $_->{mntpoint} } @$_ } @exports);
print "$_\n" foreach grep { own($_) } @mntpoints;
-sub own { (stat($_[0]))[4] == $uid }
+sub own { $uid == 0 || (stat($_[0]))[4] == $uid }
sub verify_mntpoint {
local ($_) = @_;