diff --git a/custom/custom-lib.pl b/custom/custom-lib.pl index d4d92208e..45e96a266 100755 --- a/custom/custom-lib.pl +++ b/custom/custom-lib.pl @@ -308,7 +308,9 @@ if ($file !~ /^\// && $file !~ /\|\s*$/) { $file = "$uinfo[7]/$file"; } } -open(FILE, "<".$file); +my $h; +$h = "<" if ($file =~ /^\// && $file !~ /\|\s*$/); +open(FILE, "$h".$file); while() { s/\r|\n//g; next if (/^#/); diff --git a/makedist.pl b/makedist.pl index dc1054898..1f130176e 100755 --- a/makedist.pl +++ b/makedist.pl @@ -52,34 +52,14 @@ if ($min) { } else { # All the modules - @mlist = - ("cron", "dfsadmin", "exports", "inetd", "init", - "mount", "samba", "useradmin", "fdisk", "format", "proc", "webmin", - "quota", "software", "pap", "acl", "apache", "lpadmin", "bind8", - "sendmail", "squid", "bsdexports", "hpuxexports", - "net", "dhcpd", "custom", "telnet", "servers", - "time", "wuftpd", "syslog", "mysql", "man", - "inittab", "raid", "postfix", "webminlog", "postgresql", "xinetd", - "status", "cpan", "pam", "nis", "shell", "grub", - "fetchmail", "passwd", "at", "proftpd", "sshd", - "heartbeat", "cluster-software", "cluster-useradmin", "qmailadmin", - "mon", "jabber", "stunnel", "usermin", - "fsdump", "lvm", "procmail", - "cluster-webmin", "firewall", "sgiexports", "vgetty", "openslp", - "webalizer", "shorewall", "adsl-client", "updown", "ppp-client", - "pptp-server", "pptp-client", "ipsec", "ldap-useradmin", - "change-user", "cluster-shell", "cluster-cron", "spam", - "htaccess-htpasswd", "logrotate", "cluster-passwd", "mailboxes", - "ipfw", "sarg", "bandwidth", "cluster-copy", "backup-config", - "smart-status", "idmapd", "krb5", "smf", "ipfilter", "rbac", - "tunnel", "zones", "cluster-usermin", "dovecot", "syslog-ng", - "mailcap", "blue-theme", "ldap-client", "phpini", "filter", - "bacula-backup", "ldap-server", "exim", "tcpwrappers", - "package-updates", "system-status", "webmincron", "ajaxterm", - "shorewall6", "iscsi-server", "iscsi-client", "gray-theme", - "iscsi-target", "iscsi-tgtd", "bsdfdisk", "fail2ban", - "authentic-theme", "firewalld", "filemin", "firewall6", - ); + my $mod_def_list; + my $curr_dir = $0; + ($curr_dir) = $curr_dir =~ /^(.+)\/[^\/]+$/; + $curr_dir = "." if ($curr_dir !~ /^\//); + open(my $fh, '<', "$curr_dir/mod_def_list.txt") || die "Error opening \"mod_def_list.txt\" : $!\n"; + $mod_def_list = do { local $/; <$fh> }; + close($fh); + @mlist = split(/\s+/, $mod_def_list); } @dirlist = ( "WebminUI", "JSON" ); diff --git a/makemoduledeb.pl b/makemoduledeb.pl index e8318f475..6c8ab9db6 100755 --- a/makemoduledeb.pl +++ b/makemoduledeb.pl @@ -231,9 +231,18 @@ if ($debdepends && exists($minfo{'depends'})) { # If the module is part of Webmin, we don't need to depend on it if ($dmod) { - my %dinfo; - read_file("$dmod/module.info", \%dinfo); - next if ($dinfo{'longdesc'}); + my $mod_def_list; + my @mod_def_list; + my $curr_dir = $0; + ($curr_dir) = $curr_dir =~ /^(.+)\/[^\/]+$/; + $curr_dir = "." if ($curr_dir !~ /^\//); + open(my $fh, '<', "$curr_dir/mod_def_list.txt") || die "Error opening \"mod_def_list.txt\" : $!\n"; + $mod_def_list = do { local $/; <$fh> }; + close($fh); + @mod_def_list = split(/\s+/, $mod_def_list); + if ( grep( /^$dmod$/, @mod_def_list ) ) { + next; + } } push(@rdeps, $dwebmin ? ("$product (>= $dwebmin)") : $dver ? ("$prefix$dmod (>= $dver)") : diff --git a/makemodulerpm.pl b/makemodulerpm.pl index 3246671dc..e4719e656 100755 --- a/makemodulerpm.pl +++ b/makemodulerpm.pl @@ -246,9 +246,18 @@ if ($rpmdepends && defined($minfo{'depends'})) { # If the module is part of Webmin, we don't need to depend on it if ($dmod) { - my %dinfo; - &read_file("$dmod/module.info", \%dinfo) || die "Failed to read $dmod/module.info for depenendency check"; - next if ($dinfo{'longdesc'}); + my $mod_def_list; + my @mod_def_list; + my $curr_dir = $0; + ($curr_dir) = $curr_dir =~ /^(.+)\/[^\/]+$/; + $curr_dir = "." if ($curr_dir !~ /^\//); + open(my $fh, '<', "$curr_dir/mod_def_list.txt") || die "Error opening \"mod_def_list.txt\" : $!\n"; + $mod_def_list = do { local $/; <$fh> }; + close($fh); + @mod_def_list = split(/\s+/, $mod_def_list); + if ( grep( /^$dmod$/, @mod_def_list ) ) { + next; + } } push(@rdeps, $dwebmin ? ("webmin", ">=", $dwebmin) : $dver ? ($prefix.$dmod, ">=", $dver) : diff --git a/miniserv.pl b/miniserv.pl index aac5d44b8..0bfbeb8a1 100755 --- a/miniserv.pl +++ b/miniserv.pl @@ -1533,6 +1533,11 @@ $portstr = $redirport == 80 && !$ssl ? "" : $redirhost = $config{'redirect_host'} || $host; $hostport = &check_ip6address($redirhost) ? "[".$redirhost."]".$portstr : $redirhost.$portstr; + +# If the redirect_prefix exists change redirect base to include the prefix #1271 +if ($config{'redirect_prefix'}) { + $hostport .= $config{'redirect_prefix'} + } $prot = $ssl ? "https" : "http"; undef(%in); diff --git a/mod_def_list.txt b/mod_def_list.txt new file mode 100644 index 000000000..f56bf1a3a --- /dev/null +++ b/mod_def_list.txt @@ -0,0 +1 @@ +cron dfsadmin exports inetd init mount samba useradmin fdisk format proc webmin quota software pap acl apache lpadmin bind8 sendmail squid bsdexports hpuxexports net dhcpd custom telnet servers time wuftpd syslog mysql man inittab raid postfix webminlog postgresql xinetd status cpan pam nis shell grub fetchmail passwd at proftpd sshd heartbeat cluster-software cluster-useradmin qmailadmin mon jabber stunnel usermin fsdump lvm procmail cluster-webmin firewall sgiexports vgetty openslp webalizer shorewall adsl-client updown ppp-client pptp-server pptp-client ipsec ldap-useradmin change-user cluster-shell cluster-cron spam htaccess-htpasswd logrotate cluster-passwd mailboxes ipfw sarg bandwidth cluster-copy backup-config smart-status idmapd krb5 smf ipfilter rbac tunnel zones cluster-usermin dovecot syslog-ng mailcap blue-theme ldap-client phpini filter bacula-backup ldap-server exim tcpwrappers package-updates system-status webmincron ajaxterm shorewall6 iscsi-server iscsi-client gray-theme iscsi-target iscsi-tgtd bsdfdisk fail2ban authentic-theme firewalld filemin firewall6 \ No newline at end of file