mirror of
https://github.com/webmin/webmin.git
synced 2026-02-03 14:13:29 +00:00
Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
396075b4d9 | ||
|
|
1f7d2b0b88 | ||
|
|
a43ba8cce5 | ||
|
|
c98135b6da | ||
|
|
cbc9c26194 | ||
|
|
abcec01b0c | ||
|
|
3cf18c8807 | ||
|
|
2f2d0d0859 | ||
|
|
645daaf0cd | ||
|
|
3c99bdd9b5 | ||
|
|
5680320c0c |
42
JSON/PP/Boolean.pm
Normal file
42
JSON/PP/Boolean.pm
Normal file
@@ -0,0 +1,42 @@
|
||||
package JSON::PP::Boolean;
|
||||
|
||||
use strict;
|
||||
require overload;
|
||||
local $^W;
|
||||
overload::import('overload',
|
||||
"0+" => sub { ${$_[0]} },
|
||||
"++" => sub { $_[0] = ${$_[0]} + 1 },
|
||||
"--" => sub { $_[0] = ${$_[0]} - 1 },
|
||||
fallback => 1,
|
||||
);
|
||||
|
||||
$JSON::PP::Boolean::VERSION = '4.04';
|
||||
|
||||
1;
|
||||
|
||||
__END__
|
||||
|
||||
=head1 NAME
|
||||
|
||||
JSON::PP::Boolean - dummy module providing JSON::PP::Boolean
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
# do not "use" yourself
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
This module exists only to provide overload resolution for Storable and similar modules. See
|
||||
L<JSON::PP> for more info about this class.
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
This idea is from L<JSON::XS::Boolean> written by Marc Lehmann <schmorp[at]schmorp.de>
|
||||
|
||||
=head1 LICENSE
|
||||
|
||||
This library is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself.
|
||||
|
||||
=cut
|
||||
|
||||
@@ -29,7 +29,7 @@ Webmin can be installed in two different ways:
|
||||
1. By downloading a pre-built package, available for different distributions (CentOS, Fedora, SuSE, Mandriva, Debian, Ubuntu, Solaris and [other](http://www.webmin.com/support.html)) from our [download page](http://webmin.com/download.html);
|
||||
<kbd>Note: It is highly recommended to [add repository](https://doxfer.webmin.com/Webmin/Installation) to your system for having automatic updates.</kbd>
|
||||
|
||||
2. By downloading, extracting [source file](https://prdownloads.sourceforge.net/webadmin/webmin-1.950.tar.gz), and running [_setup.sh_](http://www.webmin.com/tgz.html) script, with no arguments, which will setup to run it directly from this directory, or with a command-line argument, such as targeted directory.
|
||||
2. By downloading, extracting [source file](https://prdownloads.sourceforge.net/webadmin/webmin-1.951.tar.gz), and running [_setup.sh_](http://www.webmin.com/tgz.html) script, with no arguments, which will setup to run it directly from this directory, or with a command-line argument, such as targeted directory.
|
||||
<kbd>Note: If you are installing Webmin [on Windows](http://www.webmin.com/windows.html) system, you must run the command `perl setup.pl` instead. The Windows version depends on several programs, and modules that may not be part of the standard distribution. You will need _process.exe_ commmand, _sc.exe_ command, and _Win32::Daemon_ Perl module.</kbd>
|
||||
|
||||
## Documentation
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#!/usr/local/bin/perl
|
||||
|
||||
require './filemin-lib.pl';
|
||||
use lib './lib';
|
||||
|
||||
&ReadParse();
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#!/usr/local/bin/perl
|
||||
|
||||
require './filemin-lib.pl';
|
||||
use lib './lib';
|
||||
|
||||
&ReadParse();
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#!/usr/local/bin/perl
|
||||
|
||||
require './filemin-lib.pl';
|
||||
use lib './lib';
|
||||
|
||||
use File::Basename;
|
||||
use Cwd 'abs_path';
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
#!/usr/local/bin/perl
|
||||
|
||||
require './filemin-lib.pl';
|
||||
use lib './lib';
|
||||
use File::MimeInfo;
|
||||
|
||||
&ReadParse();
|
||||
|
||||
get_paths();
|
||||
|
||||
$archive_type = mimetype($cwd.'/'.$in{'file'});
|
||||
$archive_type = clean_mimetype($cwd.'/'.$in{'file'});
|
||||
|
||||
if ($archive_type =~ /x-bzip/) {
|
||||
$cmd = "tar xvjfp ".quotemeta("$cwd/$in{'file'}").
|
||||
|
||||
@@ -3,9 +3,12 @@
|
||||
BEGIN { push(@INC, ".."); };
|
||||
use WebminCore;
|
||||
&init_config();
|
||||
|
||||
use lib './lib';
|
||||
use POSIX;
|
||||
use Encode qw(decode encode);
|
||||
use File::Basename;
|
||||
use POSIX;
|
||||
use File::MimeInfo;
|
||||
|
||||
sub get_attr_status {
|
||||
return has_command('lsattr');
|
||||
@@ -433,4 +436,12 @@ $error && &error(&text('notallowed', '`' . &html_escape($file) . '`',
|
||||
'`' . &html_escape(join(" , ", @allowed_paths)) . '`.'));
|
||||
}
|
||||
|
||||
sub clean_mimetype
|
||||
{
|
||||
my ($f) = @_;
|
||||
my $t = mimetype($f);
|
||||
eval { utf8::encode($t) if (utf8::is_utf8($t)) };
|
||||
return $t;
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#!/usr/local/bin/perl
|
||||
|
||||
require './filemin-lib.pl';
|
||||
use lib './lib';
|
||||
|
||||
&ReadParse();
|
||||
get_paths();
|
||||
|
||||
@@ -2,9 +2,6 @@
|
||||
# File manager written in perl
|
||||
|
||||
require './filemin-lib.pl';
|
||||
use lib './lib';
|
||||
|
||||
use File::MimeInfo;
|
||||
|
||||
&ReadParse();
|
||||
get_paths();
|
||||
@@ -58,7 +55,7 @@ unless (opendir ( DIR, $cwd )) {
|
||||
}
|
||||
|
||||
# Get info about directory entries
|
||||
@info = map { [ $_, lstat($_), &mimetype($_), -d, -l $_, $secontext{$_}, $attributes{$_} ] } @list;
|
||||
@info = map { [ $_, lstat($_), &clean_mimetype($_), -d, -l $_, $secontext{$_}, $attributes{$_} ] } @list;
|
||||
|
||||
# Filter out folders
|
||||
@folders = map {$_} grep {$_->[15] == 1 } @info;
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
#!/usr/local/bin/perl
|
||||
|
||||
require './filemin-lib.pl';
|
||||
use lib './lib';
|
||||
use File::MimeInfo;
|
||||
|
||||
&ReadParse();
|
||||
|
||||
@@ -21,7 +19,7 @@ if($in{'caseins'}) {
|
||||
}
|
||||
@list = split('\n', &backquote_logged(
|
||||
"find ".quotemeta($cwd)." $criteria ".quotemeta("*$in{'query'}*")));
|
||||
@list = map { [ $_, stat($_), mimetype($_), -d $_ ] } @list;
|
||||
@list = map { [ $_, stat($_), &clean_mimetype($_), -d $_ ] } @list;
|
||||
|
||||
print_interface();
|
||||
|
||||
|
||||
@@ -2478,7 +2478,7 @@ if (&get_type($full) eq "internal/cgi" && $validated != 4) {
|
||||
if ($@) {
|
||||
# Error in perl!
|
||||
&http_error(500, "Perl execution failed",
|
||||
$config{'noshowstderr'} ? undef : $@);
|
||||
$config{'noshowstderr'} ? undef : "$@");
|
||||
}
|
||||
elsif (!$doneheaders && !$nph_script) {
|
||||
&http_error(500, "Missing Headers");
|
||||
|
||||
35
postfix/save_opts_sni.cgi
Executable file
35
postfix/save_opts_sni.cgi
Executable file
@@ -0,0 +1,35 @@
|
||||
#!/usr/local/bin/perl
|
||||
#
|
||||
# postfix-module by Guillaume Cottenceau <gc@mandrakesoft.com>,
|
||||
# for webmin by Jamie Cameron
|
||||
#
|
||||
# Save Postfix options ; special because for sni tables
|
||||
|
||||
|
||||
require './postfix-lib.pl';
|
||||
|
||||
&ReadParse();
|
||||
|
||||
|
||||
$access{'sni'} || &error($text{'sni_ecannot'});
|
||||
|
||||
&error_setup($text{'opts_err'});
|
||||
|
||||
|
||||
&lock_postfix_files();
|
||||
&before_save();
|
||||
&save_options(\%in);
|
||||
&ensure_map("tls_server_sni_maps");
|
||||
&after_save();
|
||||
&unlock_postfix_files();
|
||||
|
||||
®enerate_sni_table();
|
||||
|
||||
$err = &reload_postfix();
|
||||
&error($err) if ($err);
|
||||
|
||||
&webmin_log("sni");
|
||||
&redirect("");
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user