Compare commits

...

396 Commits
2.001 ... 2.003

Author SHA1 Message Date
iliajie
b6211aff2e Merge remote-tracking branch 'origin/master' 2022-11-26 23:16:37 +02:00
iliajie
afebdc912c Update CHANGELOG.md (2.010) 2022-11-26 23:16:15 +02:00
Jamie Cameron
96395b1592 Clean up code 2022-11-26 12:10:18 -08:00
Jamie Cameron
e158eb6005 Merge branch 'master' of github.com:webmin/webmin 2022-11-25 19:22:02 -08:00
Jamie Cameron
38d0188a66 New version bump 2022-11-25 19:19:39 -08:00
Jamie Cameron
8f29bb20e4 Merge pull request #1796 from webmin/dev/factor-out-websockets-funcs
Fix to factor out Webmin Websockets subs
2022-11-25 18:31:38 -08:00
iliajie
d84df45886 Fix to factor out Webmin Websockets subs 2022-11-25 17:06:13 +02:00
Jamie Cameron
ad61b5972b Merge pull request #1794 from saintman23/patch-3
Update missing RU translations
2022-11-24 22:57:34 -08:00
saintman23
90c002ae8c Update missing RU translations
Corrected missing translations to russian language for Cron Module.
2022-11-24 23:54:38 +00:00
Jamie Cameron
38a80244db Merge branch 'master' of github.com:webmin/webmin 2022-11-24 12:43:44 -08:00
Jamie Cameron
3d314a24dc Remove obsolete check for protocols on startup https://github.com/webmin/webmin/issues/1793 2022-11-24 12:43:29 -08:00
iliajie
4b92766495 Fix Webmin Samba module support for openSUSE Leap and Tumbleweed 2022-11-24 22:08:18 +02:00
iliajie
1705bab13e Add proper support for openSUSE Tumbleweed 2022-11-24 21:58:55 +02:00
Jamie Cameron
4ede4520e4 Merge branch 'master' of github.com:webmin/webmin 2022-11-23 21:15:28 -08:00
Jamie Cameron
61806a8799 Remove obsolete code to fix use of -f 2022-11-23 21:15:23 -08:00
Jamie Cameron
82be6e142f Merge pull request #1792 from webmin/dev/add-buffer-size-for-transfers
Add API to get buffer size for file transfers
2022-11-23 21:00:08 -08:00
Jamie Cameron
aa5443881c Merge branch 'master' of github.com:webmin/webmin 2022-11-23 15:27:33 -08:00
Jamie Cameron
617b731671 If source for cert is a link, copy the underlying file https://github.com/webmin/webmin/issues/1505 2022-11-23 15:27:26 -08:00
iliajie
166df0cb92 Fix openSUSE Squid server config 2022-11-23 23:50:02 +02:00
iliajie
b32c5a01c7 Fix openSUSE SSH server config 2022-11-23 23:38:51 +02:00
iliajie
4e21e753f4 Fix openSUSE Postfix config 2022-11-23 23:28:19 +02:00
iliajie
c0c993efec Fix openSUSE reload config command for BIND 2022-11-23 22:56:25 +02:00
iliajie
14b5ae8b4f Fix openSUSE Apache pid file location 2022-11-23 22:52:50 +02:00
iliajie
f4c367f2ae Add support for contemporary OpenSUSE Leap Linux 2022-11-23 22:30:51 +02:00
iliajie
c4a2bb6cd7 Fix to exclude file list as well
https://github.com/webmin/authentic-theme/issues/1632#issuecomment-1325125910
2022-11-23 16:12:35 +02:00
iliajie
06beb70568 Fix modules test 2022-11-22 21:04:31 +02:00
iliajie
d03dcf02d2 Add Linux Lite support
https://sourceforge.net/p/webadmin/discussion/600155/thread/adfe8e949f/?limit=25#57c9
2022-11-22 20:01:33 +02:00
iliajie
e9d58bdd42 Add API to get buffer size for file transfers 2022-11-21 21:07:00 +02:00
iliajie
61000107b8 If IO::Pty->set_winsize failed make ioctl directly
f550ffe799 (r89288344)
2022-11-21 20:24:55 +02:00
iliajie
8f6a2ac462 Add Webmin repository setup script 2022-11-20 18:19:35 +02:00
Jamie Cameron
291ba25691 Merge pull request #1662 from webmin/dev/gray-theme-replace
Simply replace Gray Framed with Virtualmin Framed theme
2022-11-18 21:52:44 -08:00
iliajie
1550e9e639 Revert "Fix to place the checkbox the same way"
This reverts commit 7ac4a389fb.
2022-11-18 20:44:24 +02:00
iliajie
7ac4a389fb Fix to place the checkbox the same way 2022-11-18 20:43:51 +02:00
iliajie
394ca56f4b Add more space before the checkbox 2022-11-18 20:41:11 +02:00
Jamie Cameron
612e2ceb21 Merge branch 'master' of github.com:webmin/webmin 2022-11-17 20:57:30 -08:00
Jamie Cameron
76f9bea696 Fix display of multiple buttons https://sourceforge.net/p/webadmin/bugs/5561/ 2022-11-17 20:56:07 -08:00
iliajie
011e76c90a Fix missing lib call for forms library 2022-11-17 21:25:42 +02:00
iliajie
65a0ced403 Fix to let zone have its old WebminUI dependency 2022-11-17 21:12:20 +02:00
iliajie
85d303def9 Add Digest:HMAC as can be missing outside of Virtualmin install 2022-11-17 20:19:27 +02:00
iliajie
a57af8c481 Add missing vendor_perl to include 2022-11-17 15:49:45 +02:00
iliajie
5f5a2b606f Fix to add complete set of libraries from Type-Tiny package 2022-11-17 15:13:55 +02:00
iliajie
76f15dd28f Fix to remove manual and pods 2022-11-17 15:11:26 +02:00
iliajie
7abb43c67f Add Authen:OATH, Moo and Type-Tiny 2022-11-17 14:55:36 +02:00
iliajie
0533ce55c4 Fix to remove JSON and Authen as part of vendor_perl now 2022-11-17 14:47:18 +02:00
iliajie
745261d663 Update all vendor_perl modules from upstream (MetaCPAN) 2022-11-17 14:25:44 +02:00
iliajie
894beb251e Add to bundle modules from Authentic 2022-11-17 13:37:17 +02:00
Jamie Cameron
bd12983a77 Merge branch 'master' of github.com:webmin/webmin 2022-11-16 17:21:32 -08:00
Jamie Cameron
8df0c4dc41 RHEL versions can have decimals https://github.com/virtualmin/virtualmin-gpl/issues/477 2022-11-16 17:21:03 -08:00
Jamie Cameron
bcf2e0879a Merge pull request #1791 from webmin/dev/combined-perl-vendors
Fix to use unified path for all third party Perl modules
2022-11-16 17:06:12 -08:00
iliajie
023f1b88b1 Fix to place package always at the top 2022-11-16 23:29:22 +02:00
iliajie
4c0ac21dc7 Fix to remove Authen::OATH 2022-11-16 23:21:39 +02:00
iliajie
8de2847fe5 Fix to call JSON after WebminCore 2022-11-16 22:54:56 +02:00
iliajie
a294083e12 Fix to use unified path for all third party Perl modules 2022-11-16 22:42:00 +02:00
Jamie Cameron
52588da598 Merge branch 'master' of github.com:webmin/webmin 2022-11-15 19:54:36 -08:00
Jamie Cameron
094f6e3f03 Fix query-source field https://sourceforge.net/p/webadmin/bugs/5590/ 2022-11-15 19:54:23 -08:00
iliajie
f15a13bb38 Fix URL to file name conversion 2022-11-15 22:59:07 +02:00
iliajie
0edfee6da2 Fix to use get_webprefix directly 2022-11-15 21:29:12 +02:00
iliajie
ef40015214 Fix CSS file name 2022-11-15 21:24:52 +02:00
Jamie Cameron
6a2125a891 Merge pull request #1789 from webmin/dev/xterm-fixes
Add minor clean ups
2022-11-14 15:04:15 -08:00
Ilia
94a3c27166 Merge pull request #1790 from krouma/master
Fix connecting to external IPv6 LDAP server
2022-11-14 14:16:00 +02:00
iliajie
d0511685a7 Fix to create a separate allocate_miniserv_websocket sub 2022-11-14 14:08:05 +02:00
Matyáš Kroupa
4b57b06b04 Fix connecting to external IPv6 LDAP server 2022-11-14 12:55:22 +01:00
iliajie
381aedcafe Fix { to be on the new line 2022-11-14 13:20:17 +02:00
iliajie
2c86164b6b Add Authen:OATH module 2022-11-14 12:09:01 +02:00
iliajie
dbb09b5278 Fix to adjust functions names 2022-11-14 00:04:25 +02:00
iliajie
4907aeb2dd Fix to save miniserv websocket after we have the pid from PTY 2022-11-13 23:57:10 +02:00
iliajie
b62fb504ac Fix to clean up others sockets if the shell server 2022-11-13 23:43:58 +02:00
iliajie
e6795f28f9 Fix to place cleanup_miniserv to the lib file 2022-11-13 23:40:58 +02:00
Jamie Cameron
0a6c67e55f Fix check for open ports 2022-11-13 09:31:25 -08:00
Jamie Cameron
3d443b378a Clean up leftover websocket proxies occasionally 2022-11-12 18:26:21 -08:00
Jamie Cameron
f698c0c548 Always check for modification when reading miniserv.conf 2022-11-12 18:25:27 -08:00
Jamie Cameron
87d7eec743 Minor code cleanups 2022-11-12 17:48:25 -08:00
Jamie Cameron
d82e89fb6b Merge pull request #1786 from webmin/xterm-enhancements-supreme
Add support for loading shell initialization file directly
2022-11-12 17:43:15 -08:00
iliajie
39bfa013f5 Fix to add a new line (for consistency with other configs) 2022-11-13 00:08:58 +02:00
iliajie
2687db85c7 Fix default 2022-11-13 00:07:10 +02:00
iliajie
a659146025 Fix to remove redundant line 2022-11-13 00:03:30 +02:00
iliajie
eb998dc84d Fix to use env for zsh 2022-11-13 00:02:32 +02:00
iliajie
e92a17c417 Fix to remove .shrc ; other cleans 2022-11-12 23:57:21 +02:00
iliajie
d754624baa Fix to remove loading globals as already loaded 2022-11-12 23:44:04 +02:00
iliajie
295f98c694 Fix to remove aliases 2022-11-12 23:13:33 +02:00
Ilia
74716f5d3f Merge branch 'master' into xterm-enhancements-supreme 2022-11-12 23:06:03 +02:00
iliajie
37453226da Fix to merge proc-lib.pl with master 2022-11-12 23:01:13 +02:00
iliajie
05475f051c Add default initialization file for zsh ; move scripts to rc/ dir 2022-11-12 21:42:56 +02:00
Jamie Cameron
7b2456aba5 Set PS1 and aliases via a shell rc file, rather than command injection 2022-11-12 11:09:14 -08:00
Jamie Cameron
3f1a9a5d8b Fix exec with a custom binary when the command has args 2022-11-12 11:04:30 -08:00
iliajie
0d1ced583f Fix missing HISTCONTROL 2022-11-12 20:48:06 +02:00
iliajie
d1fa6cea55 Fix comments 2022-11-12 20:47:54 +02:00
iliajie
e7f7aaaad5 Fix for better logging 2022-11-12 19:56:55 +02:00
iliajie
5991d905e3 Add support for user profiles too 2022-11-12 19:48:49 +02:00
iliajie
7062406267 Add more respect to user config 2022-11-12 19:40:21 +02:00
iliajie
a249e9be00 Fix to correctly support setting login shell mixed with params
There is no way to make it work correctly across all shell, i.e. param sequence which work with `bash` will fail with `csh`, as `-l` (login shell) can be the only flag specified
2022-11-12 19:32:56 +02:00
iliajie
e3212d7f94 Add default initialization file for sh 2022-11-12 17:58:33 +02:00
iliajie
c39b7fdc50 Fix to improve default config file name 2022-11-12 16:54:18 +02:00
iliajie
1ff0ee36e4 Add support for loading shell initialization file directly 2022-11-12 14:31:38 +02:00
iliajie
1763f9e4cc Fix to always prioritize module config over hardcoded shell flavors 2022-11-12 11:39:38 +02:00
iliajie
ec622fdf95 Add code comments 2022-11-12 11:32:39 +02:00
iliajie
ab00e4c7df Fix to check if internally sourced file is under user home 2022-11-12 10:56:55 +02:00
iliajie
825842267a Fix to check if given shell has init files set in our meta 2022-11-12 10:38:24 +02:00
iliajie
c75346ec93 Fix indent 2022-11-12 01:13:32 +02:00
iliajie
4f49d74def Fix typo 2022-11-12 01:11:46 +02:00
iliajie
6a97bf2ebf Add support to set in config user custom envs and commands 2022-11-12 00:56:36 +02:00
iliajie
dd4adbba77 Add respect to shell init files (depending on shell, bash only yet) 2022-11-12 00:32:04 +02:00
Jamie Cameron
a7ca787c16 Set HOME to correct path for the user being run as 2022-11-11 10:07:08 -08:00
iliajie
782f9ca351 Merge branch 'master' of github.com:webmin/webmin 2022-11-11 10:51:02 +02:00
Jamie Cameron
ad70a474d9 Run shell as a login shell 2022-11-10 21:38:05 -08:00
iliajie
79badb6f58 Revert "Fix to clean up as we should source user profile"
This reverts commit 29517915f9.
2022-11-11 00:53:41 +02:00
iliajie
b67f7c1e65 Fix to clean up old code 2022-11-10 22:56:54 +02:00
iliajie
29517915f9 Fix to clean up as we should source user profile 2022-11-10 22:27:52 +02:00
iliajie
9cef9452d1 Fix PS1 set directly (conditionally) https://github.com/webmin/webmin/discussions/1781 2022-11-10 22:12:26 +02:00
iliajie
661bb957f9 Update translations 2022-11-10 15:18:24 +02:00
iliajie
f42b7436f3 Add support to display and select yescrypt hashing scheme 2022-11-10 15:10:48 +02:00
Jamie Cameron
f6adfaa856 Merge pull request #1779 from marclaporte/patch-1
Fix a typo
2022-11-09 20:01:26 -08:00
Marc Laporte
42d1bfaf96 Fix a typo 2022-11-09 22:57:02 -05:00
Jamie Cameron
04a9b8785d Merge pull request #1778 from webmin/dev/xterm-further-improvements
Add further terminal improvements
2022-11-09 13:15:43 -08:00
iliajie
424c475b5f Fix terminal auto-fit feature for framed themes 2022-11-09 22:57:19 +02:00
iliajie
45e5049012 Fix to send user info 2022-11-09 21:02:28 +02:00
iliajie
26d19cb0d7 Fix other flavors to run by default only in bash 2022-11-09 21:01:13 +02:00
Ilia
38e9df8f48 Merge pull request #1776 from webmin/dev/xterm-escape-sequence
Fix to check for resize escape sequence explicitly
2022-11-09 20:50:35 +02:00
iliajie
b4603b6030 Fix to drop output suppress feature for now 2022-11-09 20:48:48 +02:00
iliajie
163480b859 Fix regex exclude chars logic
https://github.com/webmin/webmin/pull/1776#discussion_r1017431635
2022-11-09 20:04:29 +02:00
iliajie
ad9a5d7871 Fix incorrectly reverted send_binary (fixed before 3f1c4a23ad) 2022-11-08 20:16:53 +02:00
iliajie
693eda3971 Fix to remove debug 2022-11-08 17:32:00 +02:00
iliajie
d2932b3ed7 Fix not to send to display special calls (commands) 2022-11-08 17:25:50 +02:00
iliajie
7fc6336f8f Fix to check for resize escape sequence explicitly 2022-11-08 16:04:44 +02:00
iliajie
49bbb04750 Fix to re-added accidentally remove clear screen on initial load 2022-11-08 15:12:16 +02:00
iliajie
d5892ed348 Fix indent - convert spaces to tabs 2022-11-08 15:09:39 +02:00
Jamie Cameron
f550ffe799 Send special message on resize, and use set_winsize to apply it 2022-11-07 17:53:09 -08:00
Jamie Cameron
9ab8908710 Merge pull request #1775 from webmin/dev/xterm-resize
Add first steps to support Terminal resize
2022-11-07 17:17:50 -08:00
iliajie
88de56f447 Add missing addon-fit.js file 2022-11-08 01:26:43 +02:00
iliajie
f7fb861e73 Add first steps to support Terminal resize 2022-11-08 01:19:06 +02:00
Jamie Cameron
21c47af212 Merge branch 'master' of github.com:webmin/webmin 2022-11-07 11:49:05 -08:00
Jamie Cameron
2c6533146d Use Digest::SHA if SHA1 isn't installed 2022-11-07 11:48:02 -08:00
iliajie
44909997d0 Fix to adjust columns and rows offset consistently (both server and UI) 2022-11-07 13:36:26 +02:00
Jamie Cameron
b0c26867fe Expand hostname from /etc/hosts if needed 2022-11-06 20:45:51 -08:00
Jamie Cameron
1a953bf2fe Completed support for editing multiple extension lines 2022-11-06 18:28:24 -08:00
Jamie Cameron
3a67aa1071 Work on support for selecting extensions 2022-11-06 17:31:45 -08:00
Jamie Cameron
676f369cd3 ui-lib conversion 2022-11-06 14:17:35 -08:00
iliajie
e65a5718d6 Merge remote-tracking branch 'origin/master' 2022-11-06 19:05:37 +02:00
iliajie
8daba09826 Fix to support more headers 2022-11-06 19:05:18 +02:00
Jamie Cameron
f74ef12e70 Use new ui library 2022-11-05 21:12:26 -07:00
Jamie Cameron
5a818ce701 Use new ui library 2022-11-05 21:04:37 -07:00
Jamie Cameron
ca35844f82 Merge branch 'master' of github.com:webmin/webmin 2022-11-05 20:55:45 -07:00
Jamie Cameron
3672394e2e Use new ui library 2022-11-05 20:55:22 -07:00
iliajie
cd341663a1 Update translations 2022-11-05 15:49:34 +02:00
iliajie
3c15d076d5 Add better on load UX 2022-11-05 15:45:44 +02:00
iliajie
8779372aec Fix to check if defined as 0 is a value too 2022-11-05 13:43:46 +02:00
Jamie Cameron
187914b069 Merge pull request #1774 from webmin/dev/shell-auto
Add automatic option for command prompt color customization
2022-11-04 15:28:54 -07:00
Jamie Cameron
30b9858417 Merge pull request #1773 from webmin/dev/drop-obsolete-dnssectools
Drop obsolete DNSSEC-Tools
2022-11-04 15:07:50 -07:00
iliajie
19070f3383 Fix to call getpwnam once 2022-11-05 00:07:14 +02:00
iliajie
7a5e917d34 Add automatic option for command prompt color customization 2022-11-04 21:01:34 +02:00
iliajie
3b86ebed97 Fix indent 2022-11-04 11:38:18 +02:00
Jamie Cameron
6fb8de6e37 Encode utf-8 input into binary before sending to the shell 2022-11-03 21:50:32 -07:00
iliajie
9a06472017 Drop obsolete DNSSEC-Tools 2022-11-03 18:49:06 +02:00
Jamie Cameron
2b77a405ff Merge branch 'master' of github.com:webmin/webmin 2022-11-02 23:22:50 -07:00
Jamie Cameron
e3792a48e0 Check for timeouts at more places when reading headers https://github.com/webmin/webmin/issues/1767 2022-11-02 23:21:59 -07:00
iliajie
389d107a39 Add support for maximum input variables limit
https://forum.virtualmin.com/t/php-fpm-do-not-work/117593/8?u=ilia
2022-11-02 20:48:53 +02:00
Jamie Cameron
7142ae8620 Merge pull request #1771 from webmin/dev/xterm-add-special-flavor
Add special flavors to a new Terminal module
2022-10-31 16:12:10 -07:00
iliajie
1d414e1533 Fix to actually add an option with 0 value 2022-10-31 23:49:52 +02:00
iliajie
2e4d3c8ccf Fix to make it off by default 2022-10-31 23:44:45 +02:00
iliajie
f2687a20d1 Revert "Fix to make sure that feature is available by default (server owners)"
This reverts commit 027578312a.
2022-10-31 23:17:23 +02:00
Jamie Cameron
9f42eaf58f Read more than 1 character at a time 2022-10-31 14:10:58 -07:00
iliajie
027578312a Fix to make sure that feature is available by default (server owners) 2022-10-31 22:21:53 +02:00
iliajie
f144517e6c Fix HISTCONTROL always be called as we use clear command uncond 2022-10-31 17:45:26 +02:00
iliajie
41f6eaf1f1 Fix to send commands in a list to the theme 2022-10-31 17:15:24 +02:00
iliajie
fa0fcf52c1 Fix to make sure skipping command history works 2022-10-31 17:06:40 +02:00
iliajie
c6419a471e Fix not to store init commands in history 2022-10-31 16:45:54 +02:00
iliajie
1a296d9579 Fix to tell SPA themes what's up 2022-10-31 16:29:58 +02:00
iliajie
bf74599502 Add much smoother terminal initial load 2022-10-31 16:27:10 +02:00
iliajie
8c2ae56298 Add actual config option 2022-10-31 16:26:49 +02:00
iliajie
ccace2ce81 Add config option to make bash prompt look nice (user dependent) 2022-10-31 16:25:50 +02:00
Jamie Cameron
f1b2adaa59 Fixes for CentOS 8 2022-10-30 22:05:17 -07:00
Jamie Cameron
e5e4b65faf Add support for parameter for directory to start in, and make sure user param is preserved 2022-10-30 16:05:07 -07:00
Jamie Cameron
d3d33af3c0 Clean up code and prevent HTML attacks on untrusted inputs 2022-10-30 15:55:21 -07:00
Jamie Cameron
13db341e50 Merge pull request #1770 from webmin/dev/add-support-for-switch-user
Add an ability for a master admin to switch to specific user
2022-10-30 15:46:21 -07:00
iliajie
16859a87fd Remove redundant error message (already had one) 2022-10-31 00:23:24 +02:00
iliajie
27e3b7cbed Fix user test 2022-10-31 00:21:12 +02:00
iliajie
e1816a9e3c Update language 2022-10-31 00:19:18 +02:00
iliajie
d625a5d2f9 Show error if user doesn't exists 2022-10-31 00:14:01 +02:00
iliajie
43832c8ed9 Add an ability for a master admin to switch to specific user 2022-10-30 21:52:44 +02:00
iliajie
c8e94c8cdc Fix to use Digest::SHA instead 2022-10-30 21:49:52 +02:00
Jamie Cameron
f2ca4e1fdd Merge pull request #1769 from webmin/dev/xterm-deps-bundle
Bundle dependencies for a new Terminal module
2022-10-30 12:47:23 -07:00
iliajie
b014291882 Fix to revert not fully related change 2022-10-30 21:31:38 +02:00
Jamie Cameron
6d96dd6a13 Add option to use existing websockets key instead of session ID 2022-10-30 12:21:34 -07:00
iliajie
3d73e2faae Revert "Fix to always use use Digest::SHA"
This reverts commit 7fb5e74e2b.
2022-10-30 20:56:32 +02:00
iliajie
d180b0a0f4 Revert "Add support to switch to given user"
This reverts commit 62d2a6d0e8.
2022-10-30 20:53:33 +02:00
iliajie
62d2a6d0e8 Add support to switch to given user 2022-10-30 20:46:04 +02:00
iliajie
a57151c7bd Fix to also remove telnet module from defaults 2022-10-30 20:03:40 +02:00
iliajie
5c7494cccd Fix to change dependency to Digest::SHA 2022-10-30 19:35:16 +02:00
iliajie
7fb5e74e2b Fix to always use use Digest::SHA 2022-10-30 18:24:17 +02:00
iliajie
e098d614cb Add xterm and remove ajaxterm 2022-10-30 18:11:58 +02:00
iliajie
2a01e93371 Fix dependency module name for Debian package 2022-10-30 18:09:34 +02:00
iliajie
c57fba5b57 Add to bundle Protocols:WebSocket and Net:WebSocket 2022-10-30 17:50:47 +02:00
iliajie
cd5616a6c0 Fix to move module check at the top 2022-10-30 13:30:02 +02:00
Jamie Cameron
7bceedfe42 Make code cleaner and stop using float() for validation 2022-10-29 13:23:22 -07:00
Jamie Cameron
669af033d1 Merge branch 'master' of github.com:webmin/webmin 2022-10-29 13:16:40 -07:00
Jamie Cameron
eef79887ee Clean up leftover connections in more cases 2022-10-29 13:16:30 -07:00
iliajie
25f01179a3 Add is_int and is_float subs 2022-10-29 18:15:39 +03:00
Jamie Cameron
0185397a0c Merge branch 'master' of github.com:webmin/webmin 2022-10-28 16:07:25 -07:00
Jamie Cameron
e8a875fc29 Check ports in use in miniserv.conf, even if they haven't been opened yet 2022-10-28 16:07:19 -07:00
iliajie
ec216a0115 Fix to parse float 2022-10-28 22:36:56 +03:00
iliajie
87c8146698 Add parse float API 2022-10-28 22:35:57 +03:00
Jamie Cameron
9f2ef4c91a Background process when its ready to open a socket 2022-10-28 11:31:29 -07:00
Jamie Cameron
20f40d0d38 Merge branch 'master' of github.com:webmin/webmin 2022-10-27 18:26:45 -07:00
Jamie Cameron
9ea1f0ad52 Make boxes bigger 2022-10-27 18:19:20 -07:00
Jamie Cameron
989e15d4cd Merge pull request #1766 from webmin/dev/dont-expose-socket-as-global-variable
Fix not to expose active `socket` to a global scope
2022-10-27 13:06:36 -07:00
iliajie
5204bd1a1b Add to support onclose event handler (for connection lost) 2022-10-27 21:49:08 +03:00
iliajie
72cce4349b Add error handling 2022-10-27 20:43:03 +03:00
iliajie
2574e2012f Fix to always clear screen as sometimes command-prompt is eaten up 2022-10-27 20:32:39 +03:00
iliajie
fbef076ebc Fix not to expose active socket to a global scope 2022-10-27 20:29:39 +03:00
Jamie Cameron
3c5e065edc Cleanup todos 2022-10-26 23:17:02 -07:00
iliajie
84a7279442 Rename module to Terminal 2022-10-27 03:07:05 +03:00
iliajie
435c55039e Fix error message wording 2022-10-27 03:06:31 +03:00
iliajie
4aa80112c4 Send port too 2022-10-27 01:10:33 +03:00
Jamie Cameron
a1d09c977f Don't terminate existing shell because of socket probe from a new shell 2022-10-26 11:35:57 -07:00
Jamie Cameron
67f8f9ccd6 Merge branch 'master' of github.com:webmin/webmin 2022-10-26 09:47:57 -07:00
Jamie Cameron
c23c334eed Connection: header may be more than just upgrade 2022-10-26 09:47:27 -07:00
iliajie
e94b819b7b Fix to detect terminal width and height only for regular themes 2022-10-26 19:19:31 +03:00
Jamie Cameron
4c7eb9ccb2 Clean out webmin environment vars 2022-10-26 09:08:01 -07:00
Jamie Cameron
a1b497dc72 Merge branch 'master' of github.com:webmin/webmin 2022-10-26 09:06:58 -07:00
Jamie Cameron
7064fc4708 Start in user's home dir 2022-10-26 09:06:43 -07:00
iliajie
29960cfe92 Fix indent 2022-10-26 13:06:40 +03:00
iliajie
ec1a1ed023 Fix cap 2022-10-26 12:34:41 +03:00
Jamie Cameron
a97bf30bd8 Make module name consistent 2022-10-25 23:35:08 -07:00
Jamie Cameron
b640e87969 Fix user switching 2022-10-25 23:34:59 -07:00
Jamie Cameron
3026a51a1f Code cleanup 2022-10-25 22:44:39 -07:00
Jamie Cameron
e9bcccfc8c getpwnam can return 0 for root 2022-10-25 22:13:34 -07:00
Jamie Cameron
b32fb2da61 Fix up merge conflict 2022-10-25 13:40:58 -07:00
Jamie Cameron
b7758a8bcd Support using remote user 2022-10-25 13:38:38 -07:00
Jamie Cameron
65aaf7ad92 Merge pull request #1765 from webmin/dev/xterm.js
Interactive shell improvements
2022-10-25 13:32:02 -07:00
iliajie
296a904e78 Fix to pass only clear data to the theme 2022-10-25 21:32:45 +03:00
iliajie
5f32e6e80e Fix to clear left overs (after removed fit addon) 2022-10-25 21:08:54 +03:00
iliajie
a29a356689 Change module name to Terminal 2022-10-25 21:03:54 +03:00
iliajie
1cb39a681c Add further improvements to the xterm module:
1. Drop fit addon, as we always pass cols and rows (even in auto mode)
   2. Fix terminal fit by columns and lines (rows)
   3. Add CSS only based pre-loader
   4. Refactor and improve code
2022-10-25 20:50:04 +03:00
iliajie
e1a61d7815 Fix indent (properly) 2022-10-25 13:08:59 +03:00
iliajie
8b60a24251 Fix indent 2022-10-25 13:06:52 +03:00
iliajie
bf46fe67b8 Fix offset to be 5 as appears to be best with various scaling modes 2022-10-25 04:17:02 +03:00
iliajie
760e0e3152 Fix to always pass cols and rows options ; fix adjustments 2022-10-25 04:02:10 +03:00
iliajie
b1a2b5dfc9 Add support for SPA themes 2022-10-25 03:00:37 +03:00
iliajie
86e1493dee Fix not to use barewords for file handler 2022-10-25 00:49:08 +03:00
iliajie
74e37099fd Fix to use headers when set to avoid initial redirect 2022-10-25 00:35:07 +03:00
iliajie
fe81978900 Fix rows (lines) to be browser dependent (i.e. to fit nano controls) 2022-10-25 00:00:23 +03:00
iliajie
3f1c4a23ad Fix UTF-8 support (don't double encode) 2022-10-24 23:38:30 +03:00
iliajie
21faef0804 Fix indent and proper code formatting 2022-10-24 23:26:22 +03:00
iliajie
ed7997d306 Fix to use xterm-256color .. as it works on all contemporary systems 2022-10-24 23:14:09 +03:00
iliajie
ba10eb4173 Add support to setup column size from UI (or work automatically) 2022-10-24 23:07:04 +03:00
iliajie
ea741f002d Fix to add config option to set width and height 2022-10-24 21:44:58 +03:00
iliajie
6948205ebe Fix to auto-focus terminal 2022-10-24 20:06:33 +03:00
iliajie
4c686dbd1d Fix to actually load to fit the page ; remove tables 2022-10-24 18:43:13 +03:00
iliajie
6ad8c64c31 Drop rows and columns as terminal will fit the container automatically 2022-10-24 18:30:29 +03:00
iliajie
cc70ab2f39 Add to load auto-fit module ; load with serial 2022-10-24 18:24:04 +03:00
iliajie
1019a2697a Add new module to auto-fit container size 2022-10-24 18:21:27 +03:00
iliajie
214b5f3e61 Drop .map files 2022-10-24 18:21:12 +03:00
iliajie
379cf53076 Update to the latest Xterm.js 5.0.0 2022-10-24 18:20:44 +03:00
Jamie Cameron
285815cab2 Merge pull request #1762 from webmin/dev/fix-systemd-lost-properties
Fix `systemd` unit lost properties
2022-10-23 12:35:13 -07:00
Jamie Cameron
8cdd3eeeab Add config options for width and height 2022-10-22 23:17:21 -07:00
Jamie Cameron
acec438536 Pretent to be a vt100 2022-10-22 18:19:02 -07:00
Jamie Cameron
98c2ce24c1 Include the session ID in the websockets key so that it can be verified on the backend to prevent misuse of the session 2022-10-22 18:17:15 -07:00
Jamie Cameron
b049ba6c3b Add more debug info 2022-10-22 12:13:27 -07:00
Jamie Cameron
f153590cf2 Merge branch 'master' of github.com:webmin/webmin 2022-10-22 12:09:29 -07:00
Jamie Cameron
0c5cbaef3f Launching a shell actually works now! 2022-10-22 12:07:25 -07:00
iliajie
cb98164c82 Fix to only get specific properties for speed 2022-10-22 19:07:05 +03:00
iliajie
0930bdde32 Fix indent 2022-10-22 14:33:42 +03:00
iliajie
debcde489d Abstract systemd unit types 2022-10-22 14:32:02 +03:00
iliajie
bf0a3a109b Fix to filter out all possible templates 2022-10-22 14:18:46 +03:00
Ilia
231c8fcbd3 Merge branch 'master' into dev/fix-systemd-lost-properties 2022-10-22 13:57:02 +03:00
iliajie
831abe0812 Fix to run systemctl show individually for each unit instead 2022-10-22 13:51:40 +03:00
iliajie
429cf742be Sync with master 2022-10-22 13:48:46 +03:00
iliajie
e2438029ab Fir to preformat error message 2022-10-22 13:40:57 +03:00
Jamie Cameron
532e1150ce Asking for properties causes some units to be skipped 2022-10-21 22:22:05 -07:00
Jamie Cameron
70546895cd Columns in index might be quoted https://sourceforge.net/p/webadmin/bugs/5588/ 2022-10-21 19:48:02 -07:00
Jamie Cameron
3758aec710 Merge branch 'master' of github.com:webmin/webmin 2022-10-21 19:32:18 -07:00
Jamie Cameron
5224603d0a Show key state 2022-10-21 19:31:14 -07:00
Ilia
8d7731e72b Merge pull request #1763 from 7Adrian/patch-1
Some fixes in polish translation
2022-10-21 14:39:12 +03:00
7Adrian
8db0de4f9c Merge branch 'webmin:master' into patch-1 2022-10-21 13:09:25 +02:00
Jamie Cameron
d7c34eab2b Limit a connection to a user 2022-10-20 22:22:45 -07:00
Jamie Cameron
a87f3fbf89 No need for forked command mode for now 2022-10-20 21:41:14 -07:00
Jamie Cameron
9c56426ccd Start of work on xterm shell over websockets 2022-10-20 21:39:38 -07:00
iliajie
5404142690 Fix to run systemctl show for each unit 2022-10-20 13:33:01 +03:00
Jamie Cameron
9350bd79cd Separate units in systemctl show by the spaces between them 2022-10-19 22:06:50 -07:00
Jamie Cameron
854d34bda2 Revert "Fix stop loosing systemd units https://github.com/webmin/webmin/issues/1745"
This reverts commit 5a53efb560.
2022-10-19 22:01:33 -07:00
Jamie Cameron
0ec465cfb0 Also check dynamic status before editing 2022-10-19 17:04:35 -07:00
Jamie Cameron
f7441d2c22 Include dynamic zone status in cache, and use this to determined whether a freeze/thaw is needed 2022-10-19 17:01:31 -07:00
Jamie Cameron
65a00792aa Merge branch 'master' of github.com:webmin/webmin 2022-10-19 16:39:49 -07:00
7Adrian
6495b12ddc Fix polish translation
Some polish chars were bad converted in ASCII.
2022-10-20 01:04:57 +02:00
7Adrian
561763d610 Fixed typo mistake 2022-10-20 00:21:00 +02:00
7Adrian
758370c84c Fixed typo mistake 2022-10-20 00:16:49 +02:00
7Adrian
8d5f43d73b Fix polish translation
Some polish chars were bad converted in ASCII.
2022-10-20 00:10:20 +02:00
Ilia
4b9e7831af Merge pull request #1761 from kwadrat/master
Fix: Doręczać
2022-10-19 16:02:44 +03:00
iliajie
b9e6ceecfc Fix systemd lost properties 2022-10-19 15:19:11 +03:00
iliajie
60349eb62e Protect Webmin from being deleted or stopped, and restart properly 2022-10-19 14:25:43 +03:00
iliajie
18a84c643e Update translations 2022-10-19 13:44:49 +03:00
iliajie
6a38dd89d1 Fix precedence is very important, especially when service is masked
* Unit must be enabled (and unmasked) first before starting
  * Therefore a service cannot be started before it's enabled in Webmin
2022-10-19 13:40:40 +03:00
Piotr Kasprzyk
f1924ddf81 Fix: Doręczać 2022-10-19 12:27:38 +02:00
iliajie
3456f581de Fix to prevent masked services from being edited 2022-10-19 12:40:20 +03:00
iliajie
460ba7d8cd Add support to display No (masked) state 2022-10-19 12:33:08 +03:00
iliajie
d16b6433f3 Fix to display stopped, disable and masked in orange 2022-10-19 12:28:14 +03:00
Jamie Cameron
a4d5956291 Fix new group CN 2022-10-18 22:45:42 -07:00
Jamie Cameron
afb8b9971a Merge branch 'master' of github.com:webmin/webmin 2022-10-18 20:56:33 -07:00
Jamie Cameron
de53c5acc0 Add back freeze and thaw when reloading zones https://sourceforge.net/p/webadmin/bugs/5587/ 2022-10-18 20:56:17 -07:00
iliajie
79f485d81d Fix to test if unit exists before masking ; add return codes 2022-10-18 19:05:45 +03:00
iliajie
783ba32a48 Fix detection of systemd unit (more than just .service) 2022-10-18 18:27:11 +03:00
iliajie
5a53efb560 Fix stop loosing systemd units https://github.com/webmin/webmin/issues/1745 2022-10-18 18:25:16 +03:00
iliajie
fa57718bf8 Fix for systemd types tests (more than just .service) 2022-10-18 18:14:03 +03:00
iliajie
b863134d61 Add new {mask|unmask}_actions for systemd systems 2022-10-18 13:54:02 +03:00
iliajie
e6a2bb15b0 Fix to test on a newly added API sub 2022-10-17 21:59:46 +03:00
Jamie Cameron
6546ad5e4a Merge branch 'master' of github.com:webmin/webmin 2022-10-17 11:26:46 -07:00
Jamie Cameron
8919aafc19 Use correct cert and key file when there is a hostname-specific cert 2022-10-17 11:26:20 -07:00
iliajie
9603792ab3 Fix not to test size 16e4a750b1 (r87054057) 2022-10-17 20:51:39 +03:00
iliajie
16e4a750b1 Fix a new miniserv_using_default_cert sub tests 2022-10-17 19:21:53 +03:00
iliajie
d3fe07cecc Fix typo 2022-10-17 17:36:13 +03:00
iliajie
ae99d7a862 Fix to use a new sub to test default cert 2022-10-17 14:39:49 +03:00
Jamie Cameron
81376eb3fc PID file may be in a different location on SuSE 15.4 https://sourceforge.net/p/webadmin/bugs/5586/ 2022-10-16 22:19:37 -07:00
Jamie Cameron
e8d971243f Handle a different tar password input 2022-10-16 17:23:52 -07:00
Jamie Cameron
ced2b98dde Use actual cert file when comparing with the default 2022-10-16 17:23:33 -07:00
Jamie Cameron
0895b4724f Pass SSL cert and key files for this connection on to CGI scripts 2022-10-16 17:20:58 -07:00
Jamie Cameron
2180c77d9a Add function to check for default cert 2022-10-16 13:27:04 -07:00
Jamie Cameron
f00a322d94 Actually forward the websockets protocol properly in proxy mode 2022-10-15 16:27:27 -07:00
Jamie Cameron
340b883f92 Don't lose debug log on reload 2022-10-14 23:35:24 -07:00
Jamie Cameron
2fad122571 Delete obsolete inets support 2022-10-14 16:22:30 -07:00
Jamie Cameron
e423216731 SHA1 digest is needed for websockets support 2022-10-14 16:15:35 -07:00
Jamie Cameron
85ec6381a1 Start of work to create an LDAP group when adding a user 2022-10-14 16:15:12 -07:00
Jamie Cameron
5507f501df Log SSL redirects 2022-10-14 15:30:05 -07:00
Jamie Cameron
60a93b9f55 Version bump for new features 2022-10-14 12:34:35 -07:00
Jamie Cameron
1cea2dfdd6 Merge branch 'master' of github.com:webmin/webmin 2022-10-14 12:31:40 -07:00
Jamie Cameron
273100ec6e Add support for websockets proxying via Webmin 2022-10-14 12:31:32 -07:00
iliajie
71fb561694 Fix to support displaying $miniserv::defcert warning message 2022-10-14 16:16:17 +03:00
iliajie
2d2bac1804 Fix to consider timers 2022-10-14 13:28:04 +03:00
iliajie
dd937476e3 Fix to drop removed PHP save mode controls
"This feature has been DEPRECATED as of PHP 5.3.0 and REMOVED as of PHP 5.4.0."
2022-10-12 14:37:44 +03:00
Jamie Cameron
22af3160c0 Merge branch 'master' of github.com:webmin/webmin 2022-10-11 23:24:44 -07:00
Jamie Cameron
94c64c2308 Freeze and thaw domain before editing 2022-10-11 23:24:35 -07:00
iliajie
8e18120cbd Fix to support older versions of OpenSSL 2022-10-11 00:43:38 +03:00
iliajie
8410db5a1f Update default miniserv.pem cert 2022-10-11 00:29:38 +03:00
iliajie
ea0e66cff5 Fix self-signed certificate work in Chrome (on MacOS) 2022-10-10 21:32:44 +03:00
iliajie
bbef983d2f Fix to drop debug lines 2022-10-10 20:55:40 +03:00
iliajie
fd7102ce81 Fix self-signed certificate generation 2022-10-10 18:01:41 +03:00
Jamie Cameron
62c3e4b3cd Include localhost and hostname in SSL alt names 2022-10-09 19:31:46 -07:00
Jamie Cameron
57801818b9 Handle time-only log format 2022-10-09 00:04:24 -07:00
Jamie Cameron
84808c3a3b Fix perl warning 2022-10-08 23:50:01 -07:00
Jamie Cameron
4ae46dbe83 Also fix MySQL strings in PHP-INI module https://github.com/virtualmin/virtualmin-gpl/issues/464 2022-10-08 23:22:52 -07:00
Jamie Cameron
06094e22f4 Change date automatically 2022-10-07 23:15:00 -07:00
Jamie Cameron
7eb0821606 Version bump 2022-10-07 23:08:34 -07:00
Jamie Cameron
d3d6901a23 Add UI to show past playtime 2022-10-07 23:08:14 -07:00
Jamie Cameron
57537ef282 Include localhost and hostname in altnames 2022-10-05 17:19:09 -07:00
Jamie Cameron
f13d6347a6 Merge branch 'master' of github.com:webmin/webmin 2022-10-05 17:10:30 -07:00
Jamie Cameron
1d7cd7da24 Include localhost and the hostname in altnames 2022-10-05 17:10:05 -07:00
iliajie
7c301848cb Fix setting hostname for Debian and Ubuntu using hostnamectl 2022-10-05 22:32:29 +03:00
Jamie Cameron
feb87e2b53 tcp-wrappers is pretty obsolete, so stop suggesting we install a perl module for it https://github.com/webmin/webmin/issues/1749 2022-10-04 23:38:13 -07:00
Jamie Cameron
c28e60951b Merge branch 'master' of github.com:webmin/webmin 2022-10-04 20:52:34 -07:00
Jamie Cameron
90e164671f We are only reading named.conf, not writing here 2022-10-04 20:52:10 -07:00
iliajie
7d24ac3841 Fix indent 2022-10-04 23:02:57 +03:00
Jamie Cameron
b2798dbe89 Functions to get past playtime history 2022-10-02 22:51:43 -07:00
Jamie Cameron
fa465d0f76 Start of work on websockets proxy support 2022-10-02 21:23:31 -07:00
Jamie Cameron
0b95533a88 Extract and search inside zipped help files 2022-10-02 10:23:32 -07:00
Jamie Cameron
3a86b6f00d Merge branch 'master' of github.com:webmin/webmin 2022-10-02 09:55:24 -07:00
Jamie Cameron
d400db0684 Add param to check for help file in another directory 2022-10-02 09:54:04 -07:00
iliajie
f126fc3133 Fix to exclude sensors with unknown temperatures 2022-10-02 19:50:11 +03:00
iliajie
2eded6df95 Revert "Fix to exclude sensors with unknown temperatures"
This reverts commit f596d064b4.
2022-10-02 19:48:59 +03:00
iliajie
f596d064b4 Fix to exclude sensors with unknown temperatures 2022-10-02 19:48:16 +03:00
Jamie Cameron
391773274f Remove obsolete option to skip use of chkconfig 2022-10-01 18:11:01 -07:00
Jamie Cameron
52d34aea5d Remove un-used show_opts option 2022-10-01 17:59:06 -07:00
Jamie Cameron
8307d78c07 Links to init scripts are always symlinks 2022-10-01 17:44:24 -07:00
Jamie Cameron
0c22608c7a Remove support for ancient caldera-only daemons_dir feature 2022-10-01 17:35:46 -07:00
Jamie Cameron
7faf34961c Remove totally obsolete daemons_dir config option 2022-10-01 17:28:42 -07:00
Jamie Cameron
348cdd1a50 Merge branch 'master' of github.com:webmin/webmin 2022-10-01 17:08:02 -07:00
Jamie Cameron
4f8b96cfeb Remove start/stop messages option from configs, as it can be determined by the OS 2022-10-01 17:07:53 -07:00
iliajie
5ca8dea7a3 Fix missing semicolons 2022-10-01 18:53:37 +03:00
iliajie
c12e1c9c25 Fix to use foreign_defined sub instead 2022-10-01 18:50:21 +03:00
iliajie
d0ed52adf7 Fix to use foreign_defined sub instead 2022-10-01 18:29:39 +03:00
iliajie
261e5eaf40 Fix not to overflow input text field 2022-09-29 10:00:59 +03:00
iliajie
e1144a7398 Fix to replace config and help labels too (MySQL ⇾ MariaDB) 2022-09-29 09:58:14 +03:00
iliajie
1a6b280ab6 Fix to put it in one line 2022-09-29 09:08:44 +03:00
iliajie
fcd0c11ef9 Add support to modify help text using help_pre_load sub 2022-09-28 22:46:08 +03:00
iliajie
8fef42775b RHEL cover version range 2022-09-27 15:22:30 +03:00
Jamie Cameron
c18aaea427 CentOS 7.9 isn't covered by version range 6.0 to 7.0 2022-09-26 22:10:02 -07:00
Jamie Cameron
ed0d487fc5 Escape more inputs 2022-09-25 10:42:28 -07:00
Jamie Cameron
6075313456 In IPv6 mode, NAT source and destination should be v6 addresses https://sourceforge.net/p/webadmin/bugs/5451/ 2022-09-25 10:31:22 -07:00
Jamie Cameron
91ac918965 On FreeBSD, let's encrypt cert files are under /usr/local https://forum.virtualmin.com/t/lets-encrypt-validation-failed-on-freebsd/117015 2022-09-25 10:19:57 -07:00
Jamie Cameron
2142edce39 Escape descriptions and group names 2022-09-25 00:46:20 -07:00
Jamie Cameron
3dd1234c24 Add checkbox to control if key is kept 2022-09-24 11:52:16 -07:00
Jamie Cameron
90c23f6a1e Allow configuration of default user and group for new log files https://github.com/webmin/webmin/issues/1747 2022-09-23 23:37:44 -07:00
Jamie Cameron
7b1d70d620 Merge branch 'master' of github.com:webmin/webmin 2022-09-22 22:59:04 -07:00
Jamie Cameron
66849cbe55 Support the older primary zone type, which is the same as master https://sourceforge.net/p/webadmin/bugs/5584/ 2022-09-22 22:58:22 -07:00
Jamie Cameron
067dc65b5d Merge pull request #1744 from Elektronator/patch-1
Update save_profile.cgi
2022-09-20 21:18:09 -07:00
Elektronator
2108bb5732 Update save_profile.cgi
allows to create and burn (backup) files > 4GB and long filenames
2022-09-20 22:35:16 +02:00
Jamie Cameron
4d2c8979e9 ZIP up help files when packaging 2022-09-19 23:46:26 -07:00
Jamie Cameron
2bc7440cca Try all languages in the ZIP file 2022-09-19 23:27:20 -07:00
Jamie Cameron
aa0e40d260 Update some old technology references 2022-09-19 23:25:09 -07:00
Jamie Cameron
82100ca232 Deal with attachment filenames with / in them 2022-09-19 18:26:47 -07:00
Jamie Cameron
5868f8628d Work on support for ZIP format help pages 2022-09-18 23:59:01 -07:00
Jamie Cameron
200d597a28 Dev version bump 2022-09-18 19:24:19 -07:00
Jamie Cameron
5949e01c6b Don't show non-editable filesystem types by default 2022-09-18 19:23:59 -07:00
Jamie Cameron
4bbf2b13a3 Remove reference to un-used variable 2022-09-18 18:48:49 -07:00
Jamie Cameron
d7477336ac Use new UI library 2022-09-18 18:45:50 -07:00
iliajie
22cd52a451 Fix strict to go first 2022-07-20 20:49:46 +03:00
iliajie
7f61f2536d Merge branch 'master' into dev/gray-theme-replace 2022-07-20 20:45:50 +03:00
Ilia
d2cce7482b Simply replace Gray Framed with Virtualmin Framed theme 2022-06-07 15:03:54 +03:00
743 changed files with 46456 additions and 3493 deletions

View File

@@ -1,6 +1,19 @@
## Changelog
#### 2.001 (September, 2022)
#### 2.010 (November 26, 2022)
* Add a new Terminal module (interactive shell)
* Add to replace old Gray Theme with Virtualmin Framed Theme
* Add _systemd_ improvements
* Add proper support for openSUSE Leap and Tumbleweed
* Add Linux Lite support
* Fix connecting to external IPv6 LDAP server
* Fix self-signed certificate generation
* Fix setting hostname using `hostnamectl` command on _systemd_ systems
* Fix to exclude sensors with unknown temperatures
* Fix for FreeBSD to support Let's Encrypt certificates requests
* Fix to support attachment filenames with slash in them
#### 2.001 (September 18, 2022)
* Fix missing origins and action for direct rules in FirewallD module
* Removed the need for a full restart when updating SSH keys
* Improved the Javascript for redirects to HTTPS

View File

@@ -31,7 +31,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](https://www.webmin.com/support.html)) under [latest release assets](https://github.com/webmin/webmin/releases/latest) or from our [download page](https://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-2.000.tar.gz), and running [_setup.sh_](https://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-2.003.tar.gz), and running [_setup.sh_](https://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](https://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_ command, _sc.exe_ command, and _Win32::Daemon_ Perl module.</kbd>
## Documentation

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,23 @@
show_list=0
httpd_dir=/srv/www
httpd_conf=/etc/apache2/httpd.conf
mime_types=/etc/apache2/mime.types
httpd_path=/usr/sbin/httpd
start_cmd=systemctl start apache2
stop_cmd=systemctl stop apache2
apply_cmd=systemctl restart apache2
show_order=0
max_servers=100
test_config=1
test_manual=0
test_always=0
test_apachectl=1
apachectl_path=/usr/sbin/apache2ctl
virt_file=/etc/apache2/vhosts.d
pid_file=/run/httpd.pid
defines_file=/etc/sysconfig/apache2
defines_name=APACHE_SERVER_FLAGS
auto_mods=1
show_names=0
allow_virtualmin=0
format_config=1

View File

@@ -0,0 +1,4 @@
at_style=linux
at_dir=/var/spool/atjobs
allow_file=/etc/at.allow
deny_file=/etc/at.deny

View File

@@ -3,6 +3,7 @@
BEGIN { push(@INC, ".."); };
use WebminCore;
use JSON::PP;
&init_config();
use Time::Local;
if (&foreign_check("node-groups")) {

View File

@@ -5,8 +5,6 @@ $trust_unknown_referers = 1;
require './bacula-backup-lib.pl';
&ReadParse();
use JSON::PP;
# Input sanitization
die "Illegal input" if ($in{'job'} and $in{'job'} !~ /^\d+\z/);

View File

@@ -27,7 +27,7 @@ foreach my $v (@views) {
push(@zones, &find("zone", $conf));
foreach my $z (@zones) {
my $tv = &find_value("type", $z->{'members'});
next if ($tv ne "master" && $tv ne "hint");
next if ($tv ne "master" && $tv ne "primary" && $tv ne "hint");
my $file = &find_value("file", $z->{'members'});
next if (!$file);
if (&is_raw_format_records(&make_chroot($file))) {

View File

@@ -35,7 +35,7 @@ my @extra_reverse = split(/\s+/, $config{'extra_reverse'} || '');
our %is_extra = map { $_, 1 } (@extra_forward, @extra_reverse);
our %access = &get_module_acl();
my $zone_names_cache = "$module_config_directory/zone-names";
my $zone_names_version = 3;
my $zone_names_version = 4;
my @list_zone_names_cache;
my $slave_error;
my %lines_count;
@@ -131,7 +131,7 @@ my $file = $_[0] || $config{'named_conf'};
if (!defined($get_config_parent_cache{$file})) {
my $conf = &get_config();
if (!defined($lines_count{$file})) {
my $lref = &read_file_lines($file);
my $lref = &read_file_lines($file, 1);
$lines_count{$file} = @$lref;
}
$get_config_parent_cache{$file} =
@@ -802,7 +802,8 @@ if ($ipv6) {
$rev = &net_to_ip6int($addr, 4*($i+1));
$rev =~ s/\.$//g;
foreach my $z (@zl) {
if (lc($z->{'name'}) eq $rev && $z->{'type'} eq 'master') {
if (lc($z->{'name'}) eq $rev &&
($z->{'type'} eq 'master' || $z->{'type'} eq 'primary')) {
# found the reverse master domain
$revconf = $z;
last DOMAIN;
@@ -822,7 +823,7 @@ else {
$zname =~ s/^(\d+)\/(\d+)\.//;
if ((lc($zname) eq $rev ||
lc($zname) eq "$rev.") &&
$z->{'type'} eq "master") {
($z->{'type'} eq "master" || $z->{'type'} eq "primary")) {
# found the reverse master domain
$revconf = $z;
last DOMAIN;
@@ -870,7 +871,7 @@ DOMAIN: for(my $i=1; $i<@parts; $i++) {
my $typed;
if ((lc($z->{'name'}) eq $fwd ||
lc($z->{'name'}) eq "$fwd.") &&
$z->{'type'} eq "master") {
($z->{'type'} eq "master" || $z->{'type'} eq "primary")) {
# Found the forward master!
$fwdconf = $z;
last DOMAIN;
@@ -2195,7 +2196,7 @@ return undef;
sub before_editing
{
my ($zone) = @_;
if (!$freeze_zone_count{$zone->{'name'}}) {
if ($zone->{'dynamic'} && !$freeze_zone_count{$zone->{'name'}}) {
my ($out, $ok) = &try_cmd(
"freeze ".quotemeta($zone->{'name'})." IN ".
quotemeta($zone->{'view'} || ""));
@@ -2225,15 +2226,21 @@ sub restart_zone
{
my ($dom, $view) = @_;
my ($out, $ex);
my $zone = &get_zone_name($dom, $view);
my $dyn = $zone && $zone->{'dynamic'};
if ($view) {
# Reload a zone in a view
&try_cmd("freeze ".quotemeta($dom)." IN ".quotemeta($view)) if ($dyn);
$out = &try_cmd("reload ".quotemeta($dom)." IN ".quotemeta($view));
$ex = $?;
&try_cmd("thaw ".quotemeta($dom)." IN ".quotemeta($view)) if ($dyn);
}
else {
# Just reload one top-level zone
&try_cmd("freeze ".quotemeta($dom)) if ($dyn);
$out = &try_cmd("reload ".quotemeta($dom));
$ex = $?;
&try_cmd("thaw ".quotemeta($dom)) if ($dyn);
}
if ($out =~ /not found/i) {
# Zone is not known to BIND yet - do a total reload
@@ -2452,8 +2459,11 @@ if ($changed || !$znc{'version'} ||
my $type = &find_value("type", $z->{'members'});
next if (!$type);
my $file = &find_value("file", $z->{'members'});
my $up = &find("update-policy", $z->{'members'});
my $au = &find("allow-update", $z->{'members'});
my $dynamic = $up || $au ? 1 : 0;
$znc{"zone_".($n++)} = join("\t", $z->{'value'},
$z->{'index'}, $type, $v->{'value'}, $file);
$z->{'index'}, $type, $v->{'value'}, $dynamic, $file);
$files{$z->{'file'}}++;
}
$znc{"view_".($n++)} = join("\t", $v->{'value'}, $v->{'index'});
@@ -2464,8 +2474,11 @@ if ($changed || !$znc{'version'} ||
next if (!$type);
my $file = &find_value("file", $z->{'members'});
$file ||= ""; # slaves and other types with no file
my $up = &find("update-policy", $z->{'members'});
my $au = &find("allow-update", $z->{'members'});
my $dynamic = $up || $au ? 1 : 0;
$znc{"zone_".($n++)} = join("\t", $z->{'value'},
$z->{'index'}, $type, "*", $file);
$z->{'index'}, $type, "*", $dynamic, $file);
$files{$z->{'file'}}++;
}
@@ -2496,12 +2509,13 @@ if (scalar(@list_zone_names_cache)) {
my (@rv, %viewidx);
foreach my $k (keys %znc) {
if ($k =~ /^zone_(\d+)$/) {
my ($name, $index, $type, $view, $file) =
split(/\t+/, $znc{$k}, 5);
my ($name, $index, $type, $view, $dynamic, $file) =
split(/\t+/, $znc{$k}, 6);
push(@rv, { 'name' => $name,
'type' => $type,
'index' => $index,
'view' => !$view || $view eq '*' ? undef : $view,
'dynamic' => $dynamic,
'file' => $file });
}
elsif ($k =~ /^view_(\d+)$/) {
@@ -2529,7 +2543,7 @@ undef(@list_zone_names_cache);
unlink($zone_names_cache);
}
# get_zone_name(index|name, [viewindex|"any"])
# get_zone_name(index|name, [viewindex|view-name|"any"])
# Returns a zone cache object, looked up by name or index
sub get_zone_name
{
@@ -2541,7 +2555,8 @@ foreach my $z (@zones) {
if ($z->{$field} eq $key &&
($viewidx eq 'any' ||
$viewidx eq '' && !defined($z->{'viewindex'}) ||
$viewidx ne '' && $z->{'viewindex'} == $_[1])) {
$viewidx =~ /^\d+$/ && $z->{'viewindex'} == $viewidx ||
$viewidx ne '' && $z->{'view'} eq $viewidx)) {
return $z;
}
}
@@ -4304,7 +4319,7 @@ my %cache;
&read_file($dnssec_expiry_cache, \%cache);
my $changed = 0;
foreach my $z (&list_zone_names()) {
next if ($z->{'type'} ne 'master');
next if ($z->{'type'} ne 'master' && $z->{'type'} ne 'primary');
my ($t, $e);
if ($cache{$z->{'name'}}) {
($t, $e) = split(/\s+/, $cache{$z->{'name'}});
@@ -4382,5 +4397,21 @@ my $kvspace = " " x length("@kvalues");
return join(" ", @kvalues) . " " . join("\n$kvspace ", splice(@krvalues, 6));
}
# redirect_url(type, [zone], [view])
# Returns the URL of the appropriate edit_*.cgi page
sub redirect_url
{
my ($type, $zone, $view) = @_;
my $r = $type eq "master" || $type eq "primary" ? "edit_master.cgi" :
$type eq "forward" ? "edit_forward.cgi" : "edit_slave.cgi";
if ($zone) {
$r .= "?zone=".&urlize($zone);
if ($view) {
$r .= "&view=".&urlize($view);
}
}
return $r;
}
1;

View File

@@ -33,7 +33,8 @@ elsif ($cgi eq 'edit_text.cgi' || $cgi eq 'edit_soa.cgi' ||
$cgi eq 'edit_zonekey.cgi' || $cgi eq 'edit_recs.cgi' ||
$cgi eq 'edit_record.cgi') {
# Find a master zone
my ($z) = grep { $_->{'type'} eq 'master' &&
my ($z) = grep { ($_->{'type'} eq 'master' ||
$_->{'type'} eq 'primary') &&
&can_edit_zone($_) } &list_zone_names();
return 'none' if (!$z);
my $rv = 'zone='.$z->{'zone'}.

View File

@@ -52,7 +52,7 @@ print &ui_table_row($text{'net_listen'}, $ltable, 3);
# Source address for queries
my $src = &find("query-source", $mems);
my $srcstr = join(" ", $src->{'values'});
my $srcstr = $src ? join(" ", @{$src->{'values'}}) : "";
my ($sport, $saddr);
$sport = $1 if ($srcstr =~ /port\s+(\d+)/i);
$saddr = $1 if ($srcstr =~ /address\s+([0-9\.]+)/i);

View File

@@ -44,10 +44,6 @@ keygen=dnssec-keygen
tmpl_dnssec=0
dnssec_period=21
tmpl_dnssec_dt=1
dnssectools_conf=/etc/dnssec-tools/dnssec-tools.conf
dnssectools_rollrec=/var/named/system.rollrec
dnssectools_keydir=/var/named/dtkeys
dnssectools_rollmgr_pidfile=/var/run/rollmgr.pid
force_random=0
spf_record=0
dnssec_info=1

View File

@@ -47,10 +47,6 @@ keygen=dnssec-keygen
tmpl_dnssec=0
dnssec_period=21
tmpl_dnssec_dt=1
dnssectools_conf=/etc/dnssec-tools/dnssec-tools.conf
dnssectools_rollrec=/var/named/system.rollrec
dnssectools_keydir=/var/named/dtkeys
dnssectools_rollmgr_pidfile=/var/run/rollmgr.pid
force_random=0
spf_record=0
dnssec_info=1

View File

@@ -44,10 +44,6 @@ keygen=dnssec-keygen
tmpl_dnssec=0
dnssec_period=21
tmpl_dnssec_dt=1
dnssectools_conf=/etc/dnssec-tools/dnssec-tools.conf
dnssectools_rollrec=/var/named/system.rollrec
dnssectools_keydir=/var/named/dtkeys
dnssectools_rollmgr_pidfile=/var/run/rollmgr.pid
force_random=0
spf_record=0
dnssec_info=1

View File

@@ -44,10 +44,6 @@ keygen=dnssec-keygen
tmpl_dnssec=0
dnssec_period=21
tmpl_dnssec_dt=1
dnssectools_conf=/etc/dnssec-tools/dnssec-tools.conf
dnssectools_rollrec=/var/named/system.rollrec
dnssectools_keydir=/var/named/dtkeys
dnssectools_rollmgr_pidfile=/var/run/rollmgr.pid
force_random=0
spf_record=0
dnssec_info=1

View File

@@ -47,10 +47,6 @@ keygen=dnssec-keygen
tmpl_dnssec=0
dnssec_period=21
tmpl_dnssec_dt=1
dnssectools_conf=/etc/dnssec-tools/dnssec-tools.conf
dnssectools_rollrec=/var/named/system.rollrec
dnssectools_keydir=/var/named/dtkeys
dnssectools_rollmgr_pidfile=/var/run/rollmgr.pid
force_random=0
spf_record=0
dnssec_info=1

View File

@@ -44,10 +44,6 @@ keygen=dnssec-keygen
tmpl_dnssec=0
dnssec_period=21
tmpl_dnssec_dt=1
dnssectools_conf=/etc/dnssec-tools/dnssec-tools.conf
dnssectools_rollrec=/var/named/system.rollrec
dnssectools_keydir=/var/named/dtkeys
dnssectools_rollmgr_pidfile=/var/run/rollmgr.pid
force_random=0
spf_record=0
dnssec_info=1

View File

@@ -0,0 +1,50 @@
soa_style=1
named_path=/usr/sbin/named
named_conf=/etc/named.conf
show_list=1
records_order=0
max_zones=50
rev_def=0
support_aaaa=1
allow_comments=0
allow_wild=1
allow_long=0
master_ttl=1
whois_cmd=whois
short_names=0
updserial_def=0
updserial_on=1
updserial_man=1
ndc_cmd=ndc
forwardzonefilename_format=ZONE.hosts
reversezonefilename_format=ZONE.rev
start_cmd=systemctl start named
restart_cmd=systemctl reload named
stop_cmd=systemctl stop named
pid_file=/var/run/named/named.pid
chroot=
rev_must=0
ipv6_mode=1
allow_underscore=1
by_view=0
confirm_zone=1
confirm_rec=0
no_chroot=1
relative_paths=0
rndc_cmd=rndc
auto_chroot=
no_pid_chroot=0
soa_start=0
rndc_conf=/etc/rndc.conf
rndcconf_cmd=rndc-confgen
largezones=0
slave_dir=/var/lib/named/slave
master_dir=/var/lib/named/master
checkzone=named-checkzone
keygen=dnssec-keygen
signzone=dnssec-signzone
checkconf=named-checkconf
other_slaves=1
force_random=0
spf_record=0
dnssec_info=1

View File

@@ -47,10 +47,6 @@ keygen=dnssec-keygen
tmpl_dnssec=0
dnssec_period=21
tmpl_dnssec_dt=1
dnssectools_conf=/etc/dnssec-tools/dnssec-tools.conf
dnssectools_rollrec=/var/named/system.rollrec
dnssectools_keydir=/var/named/dtkeys
dnssectools_rollmgr_pidfile=/var/run/rollmgr.pid
force_random=0
spf_record=0
dnssec_info=1

View File

@@ -25,6 +25,7 @@ $access{'delete'} || &error($text{'master_edeletecannot'});
my $rev = ($zconf->{'value'} =~ /in-addr\.arpa/i ||
$zconf->{'value'} =~ /\.$ipv6revzone/i);
my $type = &find("type", $zconf->{'members'})->{'value'};
$type = 'master' if ($type eq 'primary');
if (!$in{'confirm'} && $config{'confirm_zone'}) {
# Ask the user if he is sure ..
&ui_print_header(undef, $text{'delete_title'}, "",

View File

@@ -24,7 +24,7 @@ if ($key) {
foreach my $k (@keyfiles) {
&lock_file($k);
}
&delete_dnssec_key($zone, 1);
&delete_dnssec_key($zone, $in{'keep'});
foreach my $k (@keyfiles) {
&unlock_file($k);
}

View File

@@ -22,6 +22,7 @@ my $typedesc = $text{"recs_$in{'type'}"} || $in{'type'};
# Show form for adding a record
my $type = $zone->{'type'};
$type = 'master' if ($type eq 'primary');
my $file = $zone->{'file'};
my $form = 0;
my $shown_create_form;

View File

@@ -34,6 +34,5 @@ print &ui_table_row(undef, &ui_checkbox("soa", $config{'updserial_on'},
print &ui_table_end();
print &ui_form_end($access{'ro'} ? [ ] : [ [ undef, $text{'save'} ] ]);
&ui_print_footer(($tv eq "master" ? "edit_master.cgi" :
$tv eq "forward" ? "edit_forward.cgi" : "edit_slave.cgi").
"?zone=$in{'zone'}&view=$in{'view'}", $text{'master_return'});
&ui_print_footer(&redirect_url($tv, $in{'zone'}, $in{'view'}),
$text{'master_return'});

View File

@@ -75,7 +75,8 @@ if (@keyrecs) {
print &ui_hr();
print &ui_buttons_start();
print &ui_buttons_row("disable_zonekey.cgi", $text{'zonekey_disable'},
$text{'zonekey_disabledesc'},
$text{'zonekey_disabledesc'}."<br>\n".
&ui_checkbox("keep", 1, $text{'zonekey_keep'}, 1),
&ui_hidden("view", $in{'view'}).
&ui_hidden("zone", $in{'zone'}));

View File

@@ -23,7 +23,7 @@ my %taken;
my %nets;
foreach my $z (@zones) {
my $type = &find_value("type", $z->{'members'});
next if ($type ne "master");
next if ($type ne "master" && $type ne "primary");
my $file = &find_value("file", $z->{'members'});
my @recs = &read_zone_file($file, $z->{'value'});
foreach my $r (@recs) {

View File

@@ -29,9 +29,5 @@ if ($? || $out =~ /failed|not found|error/i) {
&error(&text('restart_endc', "<tt>$out</tt>"));
}
&webmin_log("freeze", $dom);
my $tv = $zone->{'type'};
&redirect(($tv eq "master" ? "edit_master.cgi" :
$tv eq "forward" ? "edit_forward.cgi" : "edit_slave.cgi").
"?zone=$in{'zone'}&view=$in{'view'}");
&redirect(&redirect_url($zone->{'type'}, $in{'zone'}, $in{'view'}));

View File

@@ -187,6 +187,7 @@ elsif (@zones && (!@views || !$config{'by_view'})) {
my $t = $z->{'type'};
next if (!$t);
$t = "delegation" if ($t eq "delegation-only");
$t = "master" if ($t eq "primary");
my $zn = $v eq "." ? "<i>$text{'index_root'}</i>"
: &ip6int_to_net(&arpa_to_ip($v));
if ($z->{'view'}) {
@@ -350,6 +351,8 @@ elsif (@zones) {
foreach my $z (@zv) {
my $v = $z->{'name'};
my $t = $z->{'type'};
$t = "delegation" if ($t eq "delegation-only");
$t = "master" if ($t eq "primary");
my $zn = $v eq "." ? "<i>$text{'index_root'}</i>"
: &ip6int_to_net(&arpa_to_ip($v));
push(@zlinks, "edit_$t.cgi?zone=$z->{'name'}".

View File

@@ -1282,6 +1282,7 @@ zonekey_expandzone=Show public and private zone-key details ..
zonekey_noprivate=However, Webmin could not find the private key associated with the zone, and so will not be able to re-sign it.
zonekey_eprivate=The private key associated with this zone could not be read : $1
zonekey_disable=Remove Key
zonekey_keep=Keep existing key if DNSSEC is re-enabled?
zonekey_disabledesc=Removes the DNSSEC key from this zone, and all signing records. Once this is done, you will be able to generate a new key.
zonekey_sign=Sign Zone
zonekey_signdesc=Immediately re-sign this zone, so that any changes to records made manually will be included in the signing records.

View File

@@ -62,7 +62,7 @@ $in{'ttl_def'} || $in{'ttl'} =~ /^\d+$/ ||
foreach my $zi (@zones) {
print &text('rmass_doing', "<tt>$zi->{'name'}</tt>"),"<br>\n";
if ($zi->{'type'} ne 'master') {
if ($zi->{'type'} ne 'master' && $zi->{'type'} ne 'primary') {
# Skip - not a master zone
print $text{'umass_notmaster'},"<p>\n";
next;

View File

@@ -28,7 +28,7 @@ $in{'name_def'} || $in{'name'} || &error($text{'rdmass_ename'});
foreach my $zi (@zones) {
print &text('rdmass_doing', "<tt>$zi->{'name'}</tt>"),"<br>\n";
if ($zi->{'type'} ne 'master') {
if ($zi->{'type'} ne 'master' && $zi->{'type'} ne 'primary') {
# Skip - not a master zone
print $text{'umass_notmaster'},"<p>\n";
next;

View File

@@ -63,7 +63,7 @@ elsif ($in{'type'} eq 'ttl') {
foreach my $zi (@zones) {
print &text('umass_doing', "<tt>$zi->{'name'}</tt>"),"<br>\n";
if ($zi->{'type'} ne 'master') {
if ($zi->{'type'} ne 'master' && $zi->{'type'} ne 'primary') {
# Skip - not a master zone
print $text{'umass_notmaster'},"<p>\n";
next;

View File

@@ -25,7 +25,7 @@ my $errcount = 0;
my $donecount = 0;
foreach my $z (@zones) {
# Get the key
next if ($z->{'type'} ne 'master');
next if ($z->{'type'} ne 'master' && $z->{'type'} ne 'primary');
my $zonefile = &get_zone_file($z);
my $krfile = "$zonefile".".krf";
my $dom = $z->{'members'} ? $z->{'values'}->[0] : $z->{'name'};

View File

@@ -28,14 +28,6 @@ if ($access{'remote'}) {
}
&webmin_log("apply");
my $redir_targ = ($in{'type'} eq "master" ? "edit_master.cgi" :
$in{'type'} eq "forward" ? "edit_forward.cgi" : "edit_slave.cgi");
my $zone;
if ($in{'zone'}) {
$zone = "?zone=$in{'zone'}";
if ($in{'view'}) {
$zone .= "&view=$in{'view'}";
}
}
&redirect($zone && $in{'return'} ? "$redir_targ$zone" : "");
&redirect($in{'zone'} && $in{'return'} ?
&redirect_url($in{'type'}, $in{'zone'}, $in{'view'}) : "");

View File

@@ -17,7 +17,4 @@ my $err = &restart_zone($zone->{'name'}, $zone->{'view'});
&error($err) if ($err);
&webmin_log("apply", $zone->{'name'});
my $tv = $zone->{'type'};
my $redir_targ = ($tv eq "master" ? "edit_master.cgi" :
$tv eq "forward" ? "edit_forward.cgi" : "edit_slave.cgi");
&redirect($redir_targ . "?zone=$in{'zone'}&view=$in{'view'}");
&redirect(&redirect_url($zone->{'type'}, $in{'zone'}, $in{'view'}));

View File

@@ -158,7 +158,8 @@ else {
# Is this address already in use? Search all domains
# to find out..
foreach my $z (@zl) {
next if ($z->{'type'} ne "master");
next if ($z->{'type'} ne "master" &&
$z->{'type'} ne "primary");
next if ($z->{'name'} =~ /in-addr\.arpa/i);
my $file = $z->{'file'};
my @frecs = &read_zone_file($file, $z->{'name'});
@@ -180,7 +181,8 @@ else {
# Is this address already in use? Search all domains
# to find out..
foreach my $z (@zl) {
next if ($z->{'type'} ne "master");
next if ($z->{'type'} ne "master" &&
$z->{'type'} ne "primary");
next if ($z->{'name'} =~ /\.$ipv6revzone/i);
my $file = $z->{'file'};
my @frecs = &read_zone_file($file, $z->{'name'});

View File

@@ -60,7 +60,7 @@ foreach my $v (@views) {
}
foreach my $z (@zoneconfs) {
my $type = &find_value("type", $z->{'members'});
if ($type eq "master") {
if ($type eq "master" || $type eq "primary") {
$zmap{$z->{'value'}} = $z;
}
}

View File

@@ -14,14 +14,6 @@ $access{'apply'} || &error($text{'start_ecannot'});
my $err = &start_bind();
&error($err) if ($err);
&webmin_log("start");
my $redir_targ = ($in{'type'} eq "master" ? "edit_master.cgi" :
$in{'type'} eq "forward" ? "edit_forward.cgi" : "edit_slave.cgi");
my $zone;
if ($in{'zone'}) {
$zone = "?zone=$in{'zone'}";
if ($in{'view'}) {
$zone .= "&view=$in{'view'}";
}
}
&redirect($zone && $in{'return'} ? "$redir_targ$zone" : "");
&redirect($in{'zone'} && $in{'return'} ?
&redirect_url($in{'type'}, $in{'zone'}, $in{'view'}) : "");

View File

@@ -8,14 +8,6 @@ $access{'apply'} || &error($text{'stop_ecannot'});
$err = &stop_bind();
&error($err) if ($err);
&webmin_log("stop");
my $redir_targ = ($in{'type'} eq "master" ? "edit_master.cgi" :
$in{'type'} eq "forward" ? "edit_forward.cgi" : "edit_slave.cgi");
my $zone;
if ($in{'zone'}) {
$zone = "?zone=$in{'zone'}";
if ($in{'view'}) {
$zone .= "&view=$in{'view'}";
}
}
&redirect($zone && $in{'return'} ? "$redir_targ$zone" : "");
&redirect($in{'zone'} && $in{'return'} ?
&redirect_url($in{'type'}, $in{'zone'}, $in{'view'}) : "");

View File

@@ -30,8 +30,4 @@ if ($? || $out =~ /failed|not found|error/i) {
}
&webmin_log("thaw", $dom);
my $tv = $zone->{'type'};
&redirect(($tv eq "master" ? "edit_master.cgi" :
$tv eq "forward" ? "edit_forward.cgi" : "edit_slave.cgi").
"?zone=$in{'zone'}&view=$in{'view'}");
&redirect(&redirect_url($zone->{'type'}, $in{'zone'}, $in{'view'}));

View File

@@ -36,6 +36,5 @@ else {
}
}
&ui_print_footer(($tv eq "master" ? "edit_master.cgi" :
$tv eq "forward" ? "edit_forward.cgi" : "edit_slave.cgi").
"?zone=$in{'zone'}&view=$in{'view'}", $text{'master_return'});
&ui_print_footer(&redirect_url($tv, $in{'zone'}, $in{'view'}),
$text{'master_return'});

View File

@@ -34,7 +34,5 @@ print &ui_table_start(&text('whois_header', "<tt>".&html_escape($pcmd)."</tt>"),
print &ui_table_row(undef, "<pre>".&html_escape($out)."</pre>", 2);
print &ui_table_end();
&ui_print_footer(($tv eq "master" ? "edit_master.cgi" :
$tv eq "forward" ? "edit_forward.cgi" : "edit_slave.cgi").
"?zone=$in{'zone'}&view=$in{'view'}", $text{'master_return'});
&ui_print_footer(&redirect_url($tv, $in{'zone'}, $in{'view'}),
$text{'master_return'});

View File

@@ -5,58 +5,39 @@ do 'burner-lib.pl';
# Output HTML for editing security options for the acl module
sub acl_security_form
{
print "<tr> <td><b>$text{'acl_create'}</b></td> <td>\n";
printf "<input type=radio name=create value=1 %s> $text{'yes'}\n",
$_[0]->{'create'} ? 'checked' : '';
printf "<input type=radio name=create value=0 %s> $text{'no'}</td>\n",
$_[0]->{'create'} ? '' : 'checked';
my ($o) = @_;
print &ui_table_row($text{'acl_create'},
&ui_yesno_radio("create", $o->{'create'}));
print "<td><b>$text{'acl_edit'}</b></td> <td>\n";
printf "<input type=radio name=edit value=1 %s> $text{'yes'}\n",
$_[0]->{'edit'} ? 'checked' : '';
printf "<input type=radio name=edit value=0 %s> $text{'no'}</td> </tr>\n",
$_[0]->{'edit'} ? '' : 'checked';
print &ui_table_row($text{'acl_edit'},
&ui_yesno_radio("edit", $o->{'edit'}));
print "<tr> <td><b>$text{'acl_global'}</b></td> <td>\n";
printf "<input type=radio name=global value=1 %s> $text{'yes'}\n",
$_[0]->{'global'} ? 'checked' : '';
printf "<input type=radio name=global value=0 %s> $text{'no'}</td>\n",
$_[0]->{'global'} ? '' : 'checked';
print "</tr>\n";
print &ui_table_row($text{'acl_global'},
&ui_yesno_radio("global", $o->{'global'}));
print "<tr> <td valign=top><b>$text{'acl_profiles'}</b></td>\n";
print "<td colspan=3>\n";
printf "<input type=radio name=all value=1 %s> %s\n",
$_[0]->{'profiles'} eq "*" ? "checked" : "", $text{'acl_all'};
printf "<input type=radio name=all value=0 %s> %s<br>\n",
$_[0]->{'profiles'} eq "*" ? "" : "checked", $text{'acl_sel'};
print "<select name=profiles multiple size=5>\n";
local $p;
local %can = map { $_, 1 } split(/\s+/, $_[0]->{'profiles'});
foreach $p (&list_profiles()) {
printf "<option value=%s %s>%s (%s)\n",
$p->{'id'}, $can{$p->{'id'}} ? "selected" : "",
$text{'index_type'.$p->{'type'}},
$p->{'type'} == 1 ? $p->{'iso'} :
$p->{'type'} == 4 ? $p->{'sdesc'} : $p->{'source_0'}.
($p->{'source_1'} ? ", ..." : "");
}
print "</select></td> </tr>\n";
print &ui_table_row($text{'acl_profiles'},
&ui_radio("all", $o->{'profiles'} eq '*' ? 1 : 0,
[ [ 1, $text{'acl_all'} ],
[ 0, $text{'acl_sel'}."<br>" ] ])."\n".
&ui_select("profiles",
[ split(/\s+/, $o->{'profiles'}) ],
[ map { [ $_->{'id'}, $text{'index_type'.$_->{'type'}} ] }
&list_profiles() ],
5, 1), 3);
print "<tr> <td><b>$text{'acl_dirs'}</b></td> <td colspan=2>\n";
printf "<input name=dirs size=40 value='%s'></td> </tr>\n",
$_[0]->{'dirs'};
print &ui_table_row($text{'acl_dirs'},
&ui_textbox("dirs", $o->{'dirs'}, 60), 3);
}
# acl_security_save(&options)
# Parse the form for security options for the acl module
sub acl_security_save
{
$_[0]->{'create'} = $in{'create'};
$_[0]->{'edit'} = $in{'edit'};
$_[0]->{'global'} = $in{'global'};
$_[0]->{'profiles'} = $in{'all'} ? "*" :
join(" ", split(/\0/, $in{'profiles'}));
$_[0]->{'dirs'} = $in{'dirs'};
my ($o) = @_;
$o->{'create'} = $in{'create'};
$o->{'edit'} = $in{'edit'};
$o->{'global'} = $in{'global'};
$o->{'profiles'} = $in{'all'} ? "*" : join(" ", split(/\0/, $in{'profiles'}));
$o->{'dirs'} = $in{'dirs'};
}

View File

@@ -130,6 +130,7 @@ if ($in{'burn'} || $in{'test'}) {
$iso = $config{'temp'} ? "$config{'temp'}/burner.iso"
: &tempname("burner.iso");
local $cmd = "$config{'mkisofs'} -graft-points -o $iso";
$cmd .= " -iso-level 3";
$cmd .= " -J" if ($profile->{'joliet'});
$cmd .= " --netatalk" if ($profile->{'netatalk'});
$cmd .= " --cap" if ($profile->{'cap'});

View File

@@ -0,0 +1,9 @@
cfrun_hosts=
cfd_conf=
cfengine_conf=
cfd=/usr/sbin/cfd
cfengine_dir=/etc/cfengine
cfrun=/usr/sbin/cfrun
cfengine=/usr/sbin/cfengine
start_cmd=systemctl start cfengine
stop_cmd=systemctl stop cfengine

View File

@@ -58,7 +58,7 @@ foreach $o (@lang_order_list) {
}
# Call any config pre-load function
if (&foreign_func_exists($module, 'config_pre_load')) {
if (&foreign_defined($module, 'config_pre_load')) {
&foreign_call($module, "config_pre_load", \%info, \@info_order);
&foreign_call($module, "config_pre_load", \%einfo);
}
@@ -281,7 +281,7 @@ if ($section) {
# prevent changing behaviour of a module
if (&foreign_exists($module) &&
&foreign_require($module) &&
&foreign_func_exists($module, 'config_pre_load')) {
&foreign_defined($module, 'config_pre_load')) {
&foreign_call($module, "config_pre_load", \%info, \@info_order);
}

View File

@@ -0,0 +1,10 @@
find_pid_command=ps auwwwx | grep NAME | grep -v grep | awk '{ print $2 }'
path=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin
ld_env=LD_LIBRARY_PATH
passwd_file=/etc/shadow
passwd_uindex=0
passwd_pindex=1
passwd_cindex=2
passwd_mindex=4
by_view=0
tempdelete_days=7

View File

@@ -0,0 +1,24 @@
vixie_cron=1
cron_deny_all=2
system_crontab=/etc/crontab
cron_allow_file=/var/spool/cron/allow
cron_get_command=crontab -u USER -l
cron_user_get_command=crontab -l
cron_delete_command=crontab -u USER -r
cron_user_delete_command=crontab -r
cron_edit_command=crontab -u USER -e
cron_user_edit_command=crontab -e
cron_dir=/var/spool/cron/tabs
cron_deny_file=/var/spool/cron/deny
cron_input=1
cronfiles_dir=/etc/cron.d
max_len=80
show_run=0
show_time=0
match_mode=0
match_user=1
kill_subs=0
show_comment=0
hourly_only=0
max_jobs=100
show_next=0

View File

@@ -19,7 +19,7 @@ cron_input=Cron pozwala na dodawanie zadań,1,1-Tak,0-Nie
cron_allow_file=Plik z listą dopuszczonych użytkowników,0
cron_deny_file=Plik z listą użytkowników bez dostępu,0
cron_deny_all=Uprawnienia przy braku plików pozwoleń/zakazu,1,0-Zablokuj dla wszystkich,1-Zablokuj oprócz roota,2-Pozwól wszystkim
vixie_cron=Obsluga rozszerzeń vixie-crona,1,1-Tak,0-Nie
vixie_cron=Obsługa rozszerzeń vixie-crona,1,1-Tak,0-Nie
system_crontab=Scieżka do systemowego pliku zadań vixie-crona,0
single_file=Ścieżka do pliku crontab pojedynczego użytkownika,0
cronfiles_dir=Ścieżka do katalogu z dodatkowymi plikami crona,3,Brak

View File

@@ -1,22 +1,56 @@
index_title=Расписание заданий cron
index_user=Пользователь
index_active=Выполнять задание?
index_active=Активно?
index_command=Команда
index_none=В этой системе нет заданий cron
index_create=Создать новое задание
index_allow=Управление доступом пользователей к заданиям cron
index_when=Запускать
index_comment=Описание
index_none=В этой системе нет заданий cron.
index_none2=Нет заданий cron, к которым у вас есть доступ.
index_none3=У вас пока нет заданий cron.
index_create=Создать новое задание.
index_ecreate=Создать новую переменную среды.
index_allow=Управление доступом пользователей к заданиям cron.
index_manual=Редактировать задания вручную.
index_return=списку заданий
index_env=Переменная среды
index_move=Переместить
index_next=Следующий запуск
index_nunknown=Неизвестно
index_run=Выполняется?
index_ecmd=Команда $1 для управления пользовательскими настройками Cron не найдена. Может быть, Cron не установлен в этой системе?
index_esingle=Файл $1, в котором перечислены задания Cron, не существует. Может быть, Cron не установлен в этой системе?
index_ecrondir=Каталог заданий Cron $1 не существует. Может быть, конфигурация модуля неверна, или Cron не установлен?
index_ecrondir_create=Попытаться создать каталог заданий Cron $1 ?
index_delete=Удалить Выбранные Задания
index_disable=Отключить Выбранные Задания
index_enable=Включить Выбранные Задания
index_esearch=По вашему запросу $1 не найдено ни одного задания.
index_toomany2=Слишком много вариантов. Воспользуйтесь поиском выше, чтобы ограничить результат.
index_search=Найти подходящие задания Cron
index_ok=Поиск
index_searchres=Задания Cron, соответствующие $1 ..
index_reset=Сбросить поиск.
index_econfigcheck=Заданиями Cron нельзя управлять в вашей системе, так как конфигурация модуля неверна : $1
index_stop=Остановить Cron Daemon
index_stopdesc=Остановить серверный фоновый процесс <tt>crond</tt>, запускающий запланированные задания cron. Это предотвратит выполнение команд в назначенное им время.
index_start=Запустить Cron Daemon
index_startdesc=Запустить серверный фоновый процесс <tt>crond</tt>, запускающий запланированные задания cro.. <font color=red><b>Это необходимо для выполнения команд в назначенное им время.</b></font>
index_boot=Загружать Cron Daemon?
index_bootdesc=Измените этот параметр, чтобы включить или отключить запуск Cron Jobs Daemon во время загрузки системы.
edit_title=Изменение задания
create_title=Создание задания
edit_ecannot=У вас недостаточно прав на изменение задания для этого пользователя
edit_details=Подробная информация о задании
edit_user=Выполнять задание от имени пользователя
edit_active=Разрешить выполнение?
edit_active=Активно?
edit_next=Время следующего запуска
edit_commands=Команды
edit_command=Команда
edit_comment=Описание
edit_input=Стандартный поток ввода для команды
edit_when=Время начала выполнения
edit_range=Диапазон дат для выполнения
edit_mins=Минуты
edit_hours=Часы
edit_days=Дни
@@ -25,8 +59,24 @@ edit_weekdays=Дни недели
edit_all=Все
edit_selected=Выбранные ..
edit_run=Выполнить задание сейчас
edit_return=заданию
edit_saverun=Сохранить и Выполнить Сейчас
edit_clone=Клонировать Задание
edit_return=заданию cron
edit_ctrl=Примечание: Для выбора нескольких часов, минут, дней и месяцев можно щелкнуть по ним, удерживая клавишу Ctrl.
edit_special1=Простое расписание ..
edit_special0=Время и даты, выбранные ниже ..
edit_special_hourly=Ежечасно
edit_special_daily=Ежедневно (в полночь)
edit_special_weekly=Еженедельно (в воскресенье)
edit_special_monthly=Ежемесячно (1-го числа)
edit_special_yearly=Ежегодно (1 января)
edit_special_reboot=При загрузке системы
lcedit_special_hourly=ежечасно
lcedit_special_daily=ежедневно (в полночь)
lcedit_special_weekly=еженедельно (в воскресенье)
lcedit_special_monthly=ежемесячно (1-го числа)
lcedit_special_yearly=ежегодно (1 января)
lcedit_special_reboot=при загрузке системы
save_err=Не удалось назначить задание
save_ecmd=Не указана команда для выполнения
@@ -35,6 +85,8 @@ save_euser2=Пользователь '$1' не существует
save_eallow=Пользователь '$1' не имеет достаточно прав для доступа к заданиям
save_ecannot=У вас нет прав на создание или изменение заданий от имени пользователя '$1'
save_enone=Вы не выбрали $1 для выполнения
save_ecannot2=Вам не разрешено создавать задания cron
save_eidx=Задание cron было успешно сохранено, но не может быть запущено, поскольку оно не было найдено!
allow_title=Управление доступом к заданиям cron
allow_desc=Ниже вы можете указать, какие пользователи могут создавать и выполнять задания cron.
@@ -45,13 +97,26 @@ allow_all3=Разрешить всем
allow_allow=Разрешить только указанным пользователям
allow_deny=Разрешить всем пользователям, кроме
env_title1=Изменить переменную среды
env_title2=Создать переменную среды
env_name=Имя переменной
env_value=Значение
env_user=Для пользователя
env_active=Активно?
env_details=Детали переменной среды
env_err=Не удалось сохранить переменную среды
env_ename='$1' не является допустимым именем переменной
env_order=Данный параметр переменной среды будет применяться к заданиям Cron только после того, как переменная появится в списке заданий на главной странице модуля.
env_where=Добавить переменную среды
env_where2=Переместить переменную среды
env_top=Перед всеми заданиями Cron для пользователя
env_bot=После всех заданий Cron
env_leave=Текущая позиция
exec_title=Выполнение задания
exec_title=Выполнить Задание Cron
exec_ecannot=У вас нет прав на выполнение задания от имени данного пользователя
exec_cmd=Вывод команды $1 ..
exec_cmdbg=Выполнение команды $1 в качестве фонового процесса.
exec_none=Вывод команды отсутствует
acl_users=Может изменять задания cron
@@ -60,14 +125,89 @@ acl_this=Текущего пользователя webmin
acl_only=Только указанных пользователей
acl_except=Всех пользователей, кроме указанных
acl_control=Может управлять доступом пользователей к заданиям cron?
acl_command=Может просматривать и редактировать команды Cron?
acl_uid=Пользователи с UID в диапазоне
acl_gid=Пользователи с основоной группой
acl_create=Может создавать задания Cron?
acl_delete=Может удалять задания Cron?
acl_move=Может перенести работу Cron?
acl_kill=Может прекратить работу Cron?
acl_hourly=Ограничить задания максимум ежечасными?
acl_hourlydef=Как установлено в Настройках Модуля
acl_stop=Может остановить и запустить Cron daemon?
log_modify=Изменено задание cron для $1
log_modify_l=Изменено задание cron "$2" для $1
log_create=Создано задание cron для $1
log_create_l=Изменено задание cron "$2" для $1
log_delete=Удалено задание cron для $1
log_exec=Выполнено задание cron от имени $1
log_exec_l=Выполнено задание cron "$2" для $1
log_allow=Изменен доступ пользователей к заданиям cron
log_modify=Изменено задание Cron для $1
log_modify_l=Изменено задание Cron "$2" для $1
log_create=Создано задание Cron для $1
log_create_l=Изменено задание Cron "$2" для $1
log_delete=Удалено задание Cron для $1
log_exec=Выполнено задание Cron от имени $1
log_exec_l=Выполнено задание Cron "$2" для $1
log_kill=Прекращенное задание Cron для $1
log_kill_l=Прекращенное задание Cron "$2" для $1
log_allow=Изменен доступ пользователей к заданиям Cron
log_env_create=Создана переменная среды для $1
log_env_modify=Изменена переменная среды для $1
log_env_delete=Удалена переменная среды для $1
log_move=Задание Cron перемещено для $1
log_crons_delete=Удалено $1 заданий Cron
log_crons_disable=Отключено $1 заданий Cron
log_crons_enable=Включено $1 заданий Cron
log_stop=Daemon Cron остановлен
log_start=Daemon Cron запущен
log_bootup=Daemon Cron включен при загрузке
log_bootdown=Daemon Cron отключен при загрузке
ecopy=Обнаружена ошибка в новой конфигурации Cron: $1 $2
when_min=каждую минуту
when_hour=каждый час в $1 минут
when_day=каждый день в $2:$1
when_month=в $3 день каждый месяц в $2:$1
when_weekday=каждый $3 в $2:$1
when_cron=по времени cron $1
when_interval=каждые $1 секунд(ы)
when_boot=во время запуска
ucwhen_min=Каждую минуту
ucwhen_hour=Каждый час в $1 минут
ucwhen_day=Каждый день в $2:$1
ucwhen_month=В $3 день каждый месяц в $2:$1
ucwhen_weekday=Каждый $3 на $2:$1
ucwhen_cron=По времени cron $1
ucwhen_interval=Каждые $1 секунд(ы)
ucwhen_boot=Во время запуска
move_err=Не удалось переместить задание Cron
move_etype=Эта работа не может быть перемещена
kill_err=Не удалось завершить задание Cron
kill_ecannot=Вы не можете прекратить это задание
kill_egone=Больше не выполняется
kill_ekill=Убить не удалось : $1
kill_title=Завершить задание Cron
kill_rusure=Вы уверены, что хотите завершить процесс $1 с PID $2 ?
kill_rusure2=Вы уверены, что хотите завершить процесс $1 с PID $2 и всеми его подпроцессами?
kill_ok=Да, Завершить процесс
range_all=Запускать в любую дату
range_start=Запускать только с $1
range_end=по $1
range_estart=Отсутствует или неверная дата начала диапазона для запуска
range_eend=Отсутствует или недействительная дата окончания диапазона для запуска
delete_err=Не удалось удалить задания Cron
delete_enone=Ничего не выбрано
manual_title=Редактировать Вручную Задания Cron
manual_edit=Cron файл для редактирования:
manual_ok=Редактировать
manual_editing=Используйте текстовое поле ниже для редактирования заданий Cron в $1. Будьте осторожны, так как Webmin не будет выполнять проверку!
manual_efile=Выбранный файл недействителен!
manual_ecannot=Вы запрещено вручную редактировать задания cron
stop_err=Не удалось остановить daemon
start_err=Не удалось запустить daemon
stop_ecannot=Вам запрещено останавливать daemon
start_ecannot=Вам запрещено запускать daemon
bootup_ecannot=Вам запрещено включать daemon при загрузке

View File

@@ -1,2 +1,2 @@
desc_pl=Harmonogram zadaĂą Cron
longdesc_pl=TwĂłrz, edytuj i usuwaj zadania Cron.
desc_pl=Harmonogram zadań Cron
longdesc_pl=Twórz, edytuj i usuwaj zadania Cron.

View File

@@ -0,0 +1,17 @@
start_cmd=systemctl start dhcpd
stop_cmd=systemctl stop dhcpd
restart_cmd=systemctl restart dhcpd
dhcpd_conf=/etc/dhcpd.conf
pid_file=/var/lib/dhcp/var/run/dhcpd.pid
dhcpd_path=/usr/sbin/dhcpd
lease_file=/var/lib/dhcp/db/dhcpd.leases
lease_sort=0
dhcpd_nocols=5
lease_tz=0
interfaces_type=suse
show_ip=0
show_mac=0
group_name=0
display_max=100
desc_name=0
lease_vendor=0

View File

@@ -0,0 +1,11 @@
soa_style=1
show_list=0
nslookup_pathname=nslookup
named_pid_file=/var/run/named.pid
named_pathname=/usr/sbin/named
ping_pathname=ping -c 1
named_boot_file=/etc/named.boot
records_order=0
updserial_def=0
updserial_on=1
updserial_man=1

View File

@@ -0,0 +1,4 @@
dovecot=/usr/sbin/dovecot
dovecot_config=/etc/dovecot/dovecot.conf
init_script=dovecot
pid_file=/var/run/dovecot/master.pid

View File

@@ -15,7 +15,6 @@ index_version=Version $1
stop_err=Failed to stop Dovecot
stop_erunning=No longer running
start_err=Failed to start Dovecot
start_eprotos=No protocols selected on the <b>Networking and Protocols</b> page
apply_err=Failed to apply configuration
net_title=Networking and Protocols

View File

@@ -3,9 +3,6 @@
require './dovecot-lib.pl';
&error_setup($text{'start_err'});
$conf = &get_config();
@protos = split(/\s+/, &find_value("protocols", $conf));
@protos || &error($text{'start_eprotos'});
$err = &start_dovecot();
&error($err) if ($err);
&webmin_log("start");

View File

@@ -0,0 +1,4 @@
restart_command=systemctl restart nfsserver
exports_file=/etc/exports
nfs_server=rpc.nfsd
apply_cmd=exportfs -r

View File

@@ -0,0 +1,3 @@
restart_command=systemctl restart nfsserver
exports_file=/etc/exports
apply_cmd=exportfs -r

View File

@@ -51,7 +51,8 @@ if (@jails) {
my $val = $2;
$col = lc($col);
$col =~ s/\s/_/g;
if ($col !~ /journal_matches/) {
if ($col !~ /journal_matches/ &&
$col !~ /file_list/) {
push(@head, "<div $tdc>".$text{"status_head_$col"}."</div>");
if ($col =~ /banned_ip_list/) {
$jips = $val;

View File

@@ -5,40 +5,33 @@ require 'fdisk-lib.pl';
# Output HTML for editing security options for the fdisk module
sub acl_security_form
{
local @dlist = &list_disks_partitions();
local ($d, %dcan);
map { $dcan{$_}++ } split(/\s+/, $_[0]->{'disks'});
print "<tr> <td valign=top><b>$text{'acl_disks'}</b></td> <td>\n";
printf "<input type=radio name=disks_def value=1 %s> %s\n",
$_[0]->{'disks'} eq '*' ? 'checked' : '', $text{'acl_dall'};
printf "<input type=radio name=disks_def value=0 %s> %s<br>\n",
$_[0]->{'disks'} eq '*' ? '' : 'checked', $text{'acl_dsel'};
print "<select name=disks size=4 multiple>\n";
foreach $d (@dlist) {
printf "<option value='%s' %s>%s</option>\n",
$d->{'device'},
$dcan{$d->{'device'}} ? "selected" : "",
&text('select_device', uc($d->{'type'}), uc(substr($d->{'device'}, -1))).($d->{'model'} ? " ($d->{'model'})" : "");
}
print "</select></td> </tr>\n";
my ($o) = @_;
my @dlist = &list_disks_partitions();
print "<tr> <td><b>$text{'acl_view'}</b></td>\n";
printf "<td><input type=radio name=view value=1 %s> %s\n",
$_[0]->{'view'} ? 'checked' : '', $text{'yes'};
printf "<input type=radio name=view value=0 %s> %s</td> </tr>\n",
$_[0]->{'view'} ? '' : 'checked', $text{'no'};
print &ui_table_row($text{'acl_disks'},
&ui_radio("disks_def", $o->{'disks'} eq '*' ? 1 : 0,
[ [ 1, $text{'acl_dall'} ],
[ 0, $text{'acl_dsel'} ] ])."<br>\n".
&ui_select("disks",
[ split(/\s+/, $o->{'disks'}) ],
[ map { [ $_->{'device'}, &text('select_device', uc($_->{'type'}), uc(substr($_->{'device'}, -1))).($_->{'model'} ? " ($_->{'model'})" : "") ] } @dlist ],
4, 1), 3);
print &ui_table_row($text{'acl_view'},
&ui_yesno_radio("view", $o->{'view'}));
}
# acl_security_save(&options)
# Parse the form for security options for the fdisk module
sub acl_security_save
{
my ($o) = @_;
if ($in{'disks_def'}) {
$_[0]->{'disks'} = "*";
$o->{'disks'} = "*";
}
else {
$_[0]->{'disks'} = join(" ", split(/\0/, $in{'disks'}));
$o->{'disks'} = join(" ", split(/\0/, $in{'disks'}));
}
$_[0]->{'view'} = $in{'view'};
$o->{'view'} = $in{'view'};
}

View File

@@ -139,7 +139,8 @@ else {
# Extent and cylinders
if ($in{'new'}) {
$ext = &ui_textbox("start", $start, 4)." - ".&ui_textbox("end", $end, 4);
$ext = &ui_textbox("start", $start, 10)." - ".
&ui_textbox("end", $end, 10);
}
else {
$ext = "$pinfo->{'start'} - $pinfo->{'end'}";
@@ -230,12 +231,12 @@ elsif ($pinfo->{'edittype'} != 2) {
}
if (!$in{'new'} && !$pinfo->{'extended'} && $pinfo->{'edittype'} != 2) {
my $ui_buttons_content;
my $ui_buttons_content = "";
if (!@stat || $stat[2] == 0) {
# Show form for creating filesystem
local $rt = @stat ? $stat[1] : &conv_type($pinfo->{'type'});
$ui_buttons_content = &ui_buttons_row("mkfs_form.cgi",
$ui_buttons_content .= &ui_buttons_row("mkfs_form.cgi",
$text{'edit_mkfs2'}, $text{'edit_mkfsmsg2'},
&ui_hidden("dev", $dev),
&ui_select("type", $rt,
@@ -245,7 +246,7 @@ if (!$in{'new'} && !$pinfo->{'extended'} && $pinfo->{'edittype'} != 2) {
if (!$in{'new'} && @stat && $stat[2] == 0 && &can_fsck($stat[1])) {
# Show form to fsck filesystem
$ui_buttons_content = &ui_buttons_row("fsck_form.cgi",
$ui_buttons_content .= &ui_buttons_row("fsck_form.cgi",
$text{'edit_fsck'},&text('edit_fsckmsg', "<tt>fsck</tt>"),
&ui_hidden("dev", $dev)." ".
&ui_hidden("type", $stat[1]));
@@ -253,7 +254,7 @@ if (!$in{'new'} && !$pinfo->{'extended'} && $pinfo->{'edittype'} != 2) {
if (!$in{'new'} && @stat && $stat[2] == 0 && &can_tune($stat[1])) {
# Show form to tune filesystem
$ui_buttons_content = &ui_buttons_row("tunefs_form.cgi",
$ui_buttons_content .= &ui_buttons_row("tunefs_form.cgi",
$text{'edit_tune'}, $text{'edit_tunemsg'},
&ui_hidden("dev", $dev)." ".
&ui_hidden("type", $stat[1]));
@@ -264,7 +265,7 @@ if (!$in{'new'} && !$pinfo->{'extended'} && $pinfo->{'edittype'} != 2) {
# Show form to mount filesystem
if ($types[0] eq "swap") {
# Swap partition
$ui_buttons_content = &ui_buttons_row("../mount/edit_mount.cgi",
$ui_buttons_content .= &ui_buttons_row("../mount/edit_mount.cgi",
$text{'edit_newmount2'},$text{'edit_mountmsg2'},
&ui_hidden("type", $types[0]).
&ui_hidden("newdev", $dev));
@@ -279,7 +280,7 @@ if (!$in{'new'} && !$pinfo->{'extended'} && $pinfo->{'edittype'} != 2) {
else {
$dirsel .= &ui_hidden("type", $types[0]);
}
$ui_buttons_content = &ui_buttons_row("../mount/edit_mount.cgi",
$ui_buttons_content .= &ui_buttons_row("../mount/edit_mount.cgi",
$text{'edit_newmount'}, $text{'edit_mountmsg'},
&ui_hidden("newdev", $dev),
$dirsel);
@@ -292,11 +293,10 @@ if (!$in{'new'} && !$pinfo->{'extended'} && $pinfo->{'edittype'} != 2) {
print $ui_buttons_content;
print &ui_buttons_end();
}
} elsif (!$mounted &&
$pinfo->{'edittype'} == 2) {
my $label = $config{'mode'} eq 'fdisk' ?
'edit_eparted2' : 'edit_eparted';
print "$text{$label}\n";
}
elsif (!$mounted && $pinfo->{'edittype'} == 2) {
my $label = $config{'mode'} eq 'fdisk' ? 'edit_eparted2' : 'edit_eparted';
print $text{$label},"\n";
}
&ui_print_footer("edit_disk.cgi?device=$dinfo->{'device'}",

View File

@@ -0,0 +1,6 @@
config_file=
fetchmail_path=fetchmail
daemon_user=root
pid_file=/var/run/fetchmail.pid
view_mode=0
max_users=400

View File

@@ -25,7 +25,7 @@ print "Content-Disposition: attachment; filename=\"$name$ext\"\n";
print "Content-Length: $size\n\n";
open (FILE, "< $file") or die "can't open $file: $!";
binmode FILE;
local $/ = \2048000;
local $/ = \&get_buffer_size_binary();
while (<FILE>) {
print $_;
}

View File

@@ -4,7 +4,6 @@ BEGIN { push(@INC, ".."); };
use WebminCore;
&init_config();
use lib './lib';
use POSIX;
use Encode qw(decode encode);
use File::Basename;

View File

@@ -1,299 +0,0 @@
package File::BaseDir;
use strict;
use Carp;
require File::Spec;
require Exporter;
our $VERSION = 0.06;
our @ISA = qw(Exporter);
our %EXPORT_TAGS = (
vars => [ qw(
xdg_data_home xdg_data_dirs
xdg_config_home xdg_config_dirs
xdg_cache_home
) ],
lookup => [ qw(
data_home data_dirs data_files
config_home config_dirs config_files
cache_home
) ],
);
our @EXPORT_OK = (
qw(xdg_data_files xdg_config_files),
map @$_, values %EXPORT_TAGS
);
# Set root and home directories
my $rootdir = File::Spec->rootdir();
if ($^O eq 'MSWin32') {
$rootdir = 'C:\\'; # File::Spec default depends on CWD
$ENV{HOME} ||= $ENV{USERPROFILE} || $ENV{HOMEDRIVE}.$ENV{HOMEPATH};
# logic from File::HomeDir::Windows
}
my $home = $ENV{HOME};
unless ($home) {
# Default to operating system's home dir. NOTE: web applications may not have $ENV{HOME} assigned,
# so don't issue a warning. See RT bug #41744
$home = $rootdir;
}
# Set defaults
our $xdg_data_home = File::Spec->catdir($home, qw/.local share/);
our @xdg_data_dirs = (
File::Spec->catdir($rootdir, qw/usr local share/),
File::Spec->catdir($rootdir, qw/usr share/),
);
our $xdg_config_home = File::Spec->catdir($home, '.config');
our @xdg_config_dirs = ( File::Spec->catdir($rootdir, qw/etc xdg/) );
our $xdg_cache_home = File::Spec->catdir($home, '.cache');
# OO method
sub new { bless \$VERSION, shift } # what else is there to bless ?
# Variable methods
sub xdg_data_home { $ENV{XDG_DATA_HOME} || $xdg_data_home }
sub xdg_data_dirs {
( $ENV{XDG_DATA_DIRS}
? _adapt($ENV{XDG_DATA_DIRS})
: @xdg_data_dirs
)
}
sub xdg_config_home {$ENV{XDG_CONFIG_HOME} || $xdg_config_home }
sub xdg_config_dirs {
( $ENV{XDG_CONFIG_DIRS}
? _adapt($ENV{XDG_CONFIG_DIRS})
: @xdg_config_dirs
)
}
sub xdg_cache_home { $ENV{XDG_CACHE_HOME} || $xdg_cache_home }
sub _adapt {
map { File::Spec->catdir( split('/', $_) ) } split /[:;]/, shift;
# ':' defined in the spec, but ';' is standard on win32
}
# Lookup methods
sub data_home { _catfile(xdg_data_home, @_) }
sub data_dirs { _find_files(\&_dir, \@_, xdg_data_home, xdg_data_dirs) }
sub data_files { _find_files(\&_file, \@_, xdg_data_home, xdg_data_dirs) }
sub xdg_data_files { my @dirs = data_files(@_); return @dirs }
sub config_home { _catfile(xdg_config_home, @_) }
sub config_dirs { _find_files(\&_dir, \@_, xdg_config_home, xdg_config_dirs) }
sub config_files { _find_files(\&_file, \@_, xdg_config_home, xdg_config_dirs) }
sub xdg_config_files { my @dirs = config_files(@_); return @dirs }
sub cache_home { _catfile(xdg_cache_home, @_) }
sub _catfile {
my $dir = shift;
shift if ref $_[0] or $_[0] =~ /::/; # OO call
return File::Spec->catfile($dir, @_);
}
sub _find_files {
my $type = shift;
my $file = shift;
shift @$file if ref $$file[0] or $$file[0] =~ /::/; # OO call
#warn "Looking for: @$file\n in: @_\n";
if (wantarray) {
return grep { &$type( $_ ) && -r $_ }
map { File::Spec->catfile($_, @$file) } @_;
}
else { # prevent unnecessary stats by returning early
for (@_) {
my $path = File::Spec->catfile($_, @$file);
return $path if &$type($path) && -r $path;
}
}
return ();
}
sub _dir { -d $_[0] }
sub _file { -f $_[0] }
1;
__END__
=head1 NAME
File::BaseDir - Use the Freedesktop.org base directory specification
=head1 SYNOPSIS
use File::BaseDir qw/xdg_data_files/;
for ( xdg_data_files('mime/globs') ) {
# do something
}
=head1 DESCRIPTION
This module can be used to find directories and files as specified
by the Freedesktop.org Base Directory Specification. This specifications
gives a mechanism to locate directories for configuration, application data
and cache data. It is suggested that desktop applications for e.g. the
Gnome, KDE or Xfce platforms follow this layout. However, the same layout can
just as well be used for non-GUI applications.
This module forked from L<File::MimeInfo>.
This module follows version 0.6 of BaseDir specification.
=head1 EXPORT
None by default, but all methods can be exported on demand.
Also the groups ":lookup" and ":vars" are defined. The ":vars" group
contains all routines with a "xdg_" prefix; the ":lookup" group
contains the routines to locate files and directories.
=head1 METHODS
=over 4
=item C<new()>
Simple constructor to allow Object Oriented use of this module.
=back
=head2 Lookup
The following methods are used to lookup files and folders in one of the
search paths.
=over 4
=item C<data_home(@PATH)>
Takes a list of file path elements and returns a new path by appending
them to the data home directory. The new path does not need to exist.
Use this when writing user specific application data.
Example:
# data_home is: /home/USER/.local/share
$path = $bd->data_home('Foo', 'Bar', 'Baz');
# returns: /home/USER/.local/share/Foo/Bar/Baz
=item C<data_dirs(@PATH)>
Looks for directories specified by C<@PATH> in the data home and
other data directories. Returns (possibly empty) list of readable
directories. In scalar context only the first directory found is
returned. Use this to lookup application data.
=item C<data_files(@PATH)>
Looks for files specified by C<@PATH> in the data home and other data
directories. Only returns files that are readable. In scalar context only
the first file found is returned. Use this to lookup application data.
=item C<config_home(@PATH)>
Takes a list of path elements and appends them to the config home
directory returning a new path. The new path does not need to exist.
Use this when writing user specific configuration.
=item C<config_dirs(@PATH)>
Looks for directories specified by C<@PATH> in the config home and
other config directories. Returns (possibly empty) list of readable
directories. In scalar context only the first directory found is
returned. Use this to lookup configuration.
=item C<config_files(@PATH)>
Looks for files specified by C<@PATH> in the config home and other
config directories. Returns a (possibly empty) list of files that
are readable. In scalar context only the first file found is returned.
Use this to lookup configuration.
=item C<cache_home(@PATH)>
Takes a list of path elements and appends them to the cache home
directory returning a new path. The new path does not need to exist.
=back
=head2 Variables
The following methods only returns the value of one of the XDG variables.
=over 4
=item C<xdg_data_home>
Returns either C<$ENV{XDG_DATA_HOME}> or it's default value.
Default is F<$HOME/.local/share>.
=item C<xdg_data_dirs>
Returns either C<$ENV{XDG_DATA_DIRS}> or it's default value as list.
Default is F</usr/local/share>, F</usr/share>.
=item C<xdg_config_home>
Returns either C<$ENV{XDG_CONFIG_HOME}> or it's default value.
Default is F<$HOME/.config>.
=item C<xdg_config_dirs>
Returns either C<$ENV{XDG_CONFIG_DIRS}> or it's default value as list.
Default is F</etc/xdg>.
=item C<xdg_cache_home>
Returns either C<$ENV{XDG_CACHE_HOME}> or it's default value.
Default is F<$HOME/.cache>.
=back
=head1 NON-UNIX PLATFORMS
The use of L<File::Spec> ensures that all paths are returned in the appropriate
form for the current platform. On Windows this module will try to set C<$HOME>
to a sensible value if it is not defined yet. On other platforms one can use
e.g. L<File::HomeDir> to set $HOME before loading File::BaseDir.
Please note that the specification is targeting Unix platforms only and
will only have limited relevance on other platforms. Any platform dependent
behavior in this module should be considered an extension of the spec.
=head1 BACKWARDS COMPATIBILITY
The methods C<xdg_data_files()> and C<xdg_config_files()> are exported for
backwards compatibility with version 0.02. They are identical to C<data_files()>
and C<config_files()> respectively but without the C<wantarray> behavior.
=head1 BUGS
Please mail the author if you encounter any bugs.
=head1 AUTHOR
Jaap Karssenberg || Pardus [Larus] E<lt>pardus@cpan.orgE<gt>
Copyright (c) 2003, 2007 Jaap G Karssenberg. All rights reserved.
This program is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.
Currently being maintained by Kim Ryan
=head1 SEE ALSO
L<http://www.freedesktop.org/wiki/Specifications/basedir-spec>

View File

@@ -1,482 +0,0 @@
package File::MimeInfo;
use strict;
use Carp;
use Fcntl 'SEEK_SET';
use File::Spec;
use File::BaseDir qw/data_files/;
require Exporter;
our @ISA = qw(Exporter);
our @EXPORT = qw(mimetype);
our @EXPORT_OK = qw(extensions describe globs inodetype mimetype_canon mimetype_isa);
our $VERSION = '0.27';
our $DEBUG;
our ($_hashed, $_hashed_aliases, $_hashed_subclasses);
our (@globs, %literal, %extension, %mime2ext, %aliases, %subclasses);
our ($LANG, @DIRS);
# @globs = [ [ 'glob', qr//, $mime_string ], ... ]
# %literal contains literal matches
# %extension contains extensions (globs matching /^\*(\.\w)+$/ )
# %mime2ext is used for looking up extension by mime type
# %aliases contains the aliases table
# %subclasses contains the subclasses table
# $LANG can be used to set a default language for the comments
# @DIRS can be used to specify custom database directories
sub new { bless \$VERSION, shift } # what else is there to bless ?
sub mimetype {
my $file = pop;
croak 'subroutine "mimetype" needs a filename as argument' unless defined $file;
return
inodetype($file) ||
globs($file) ||
default($file);
}
sub inodetype {
my $file = pop;
print STDERR "> Checking inode type\n" if $DEBUG;
lstat $file or return undef;
return undef if -f _;
my $t = (-l $file) ? 'inode/symlink' : # Win32 does not like '_' here
(-d _) ? 'inode/directory' :
(-p _) ? 'inode/fifo' :
(-c _) ? 'inode/chardevice' :
(-b _) ? 'inode/blockdevice' :
(-S _) ? 'inode/socket' : '' ;
if ($t eq 'inode/directory') { # compare devices to detect mount-points
my $dev = (stat _)[0]; # device of the node under investigation
$file = File::Spec->rel2abs($file); # get full path
my @dirs = File::Spec->splitdir($file);
$file = File::Spec->catfile(@dirs); # removes trailing '/' or equivalent
return $t if -l $file; # parent can be on other dev for links
pop @dirs;
my $dir = File::Spec->catdir(@dirs); # parent dir
$t = 'inode/mount-point' unless (stat $dir)[0] == $dev; # compare devices
return $t;
}
else { return $t ? $t : undef }
}
sub globs {
my $file = pop;
croak 'subroutine "globs" needs a filename as argument' unless defined $file;
rehash() unless $_hashed;
(undef, undef, $file) = File::Spec->splitpath($file); # remove path
print STDERR "> Checking globs for basename '$file'\n" if $DEBUG;
return $literal{$file} if exists $literal{$file};
if ($file =~ /\.(\w+(\.\w+)*)$/) {
my @ext = split /\./, $1;
while (@ext) {
my $ext = join('.', @ext);
print STDERR "> Checking for extension '.$ext'\n" if $DEBUG;
warn "WARNING: wantarray behaviour of globs() will change in the future.\n" if wantarray;
return wantarray
? ($extension{$ext}, $ext)
: $extension{$ext}
if exists $extension{$ext};
shift @ext;
}
}
for (@globs) {
next unless $file =~ $_->[1];
print STDERR "> This file name matches \"$_->[0]\"\n" if $DEBUG;
return $_->[2];
}
return globs(lc $file) if $file =~ /[A-Z]/; # recurs
return undef;
}
sub default {
my $file = pop;
croak 'subroutine "default" needs a filename as argument' unless defined $file;
my $line;
unless (ref $file) {
return undef unless -f $file;
print STDERR "> File exists, trying default method\n" if $DEBUG;
return 'text/plain' if -z $file;
open FILE, '<', $file or return undef;
binmode FILE, ':utf8' unless $] < 5.008;
read FILE, $line, 32;
close FILE;
}
else {
print STDERR "> Trying default method on object\n" if $DEBUG;
$file->seek(0, SEEK_SET);
$file->read($line, 32);
}
{
no warnings; # warnings can be thrown when input not ascii
if ($] < 5.008 or ! utf8::valid($line)) {
use bytes; # avoid invalid utf8 chars
$line =~ s/\s//g; # \m, \n and \t are also control chars
return 'text/plain' unless $line =~ /[\x00-\x1F\x7F]/;
}
else {
# use perl to do something intelligent for ascii & utf8
return 'text/plain' unless $line =~ /[^[:print:]\s]/;
}
}
print STDERR "> First 10 bytes of the file contain control chars\n" if $DEBUG;
return 'application/octet-stream';
}
sub rehash {
(@globs, %literal, %extension, %mime2ext) = (); # clear all data
local $_; # limit scope of $_ ... :S
my @globfiles = @DIRS
? ( grep {-e $_ && -r $_} map "$_/globs", @DIRS )
: ( reverse data_files('mime/globs') );
print STDERR << 'EOT' unless @globfiles;
WARNING: You don't seem to have a mime-info database. The
shared-mime-info package is available from http://freedesktop.org/ .
EOT
my @done;
for my $file (@globfiles) {
next if grep {$file eq $_} @done;
_hash_globs($file);
push @done, $file;
}
$_hashed = 1;
}
sub _hash_globs {
my $file = shift;
open GLOB, '<', $file || croak "Could not open file '$file' for reading" ;
binmode GLOB, ':utf8' unless $] < 5.008;
my ($string, $glob);
while (<GLOB>) {
next if /^\s*#/ or ! /\S/; # skip comments and empty lines
chomp;
($string, $glob) = split /:/, $_, 2;
unless ($glob =~ /[\?\*\[]/) { $literal{$glob} = $string }
elsif ($glob =~ /^\*\.(\w+(\.\w+)*)$/) {
$extension{$1} = $string unless exists $extension{$1};
$mime2ext{$string} = [] if !defined($mime2ext{$string});
push @{$mime2ext{$string}}, $1;
} else { unshift @globs, [$glob, _glob_to_regexp($glob), $string] }
}
close GLOB || croak "Could not open file '$file' for reading" ;
}
sub _glob_to_regexp {
my $glob = shift;
$glob =~ s/\./\\./g;
$glob =~ s/([?*])/.$1/g;
$glob =~ s/([^\w\/\\\.\?\*\[\]])/\\$1/g;
qr/^$glob$/;
}
sub extensions {
my $mimet = mimetype_canon(pop @_);
rehash() unless $_hashed;
my $ref = $mime2ext{$mimet} if exists $mime2ext{$mimet};
return $ref ? @{$ref} : undef if wantarray;
return $ref ? @{$ref}[0] : '';
}
sub describe {
shift if ref $_[0];
my ($mt, $lang) = @_;
croak 'subroutine "describe" needs a mimetype as argument' unless $mt;
$mt = mimetype_canon($mt);
$lang = $LANG unless defined $lang;
my $att = $lang ? qq{xml:lang="$lang"} : '';
my $desc;
my @descfiles = @DIRS
? ( grep {-e $_ && -r $_} map "$_/$mt.xml", @DIRS )
: ( reverse data_files('mime', split '/', "$mt.xml") ) ;
for my $file (@descfiles) {
$desc = ''; # if a file was found, return at least empty string
open XML, '<', $file || croak "Could not open file '$file' for reading";
binmode XML, ':utf8' unless $] < 5.008;
while (<XML>) {
next unless m!<comment\s*$att>(.*?)</comment>!;
$desc = $1;
last;
}
close XML || croak "Could not open file '$file' for reading";
last if $desc;
}
return $desc;
}
sub mimetype_canon {
my $mimet = pop;
croak 'mimetype_canon needs argument' unless defined $mimet;
rehash_aliases() unless $_hashed_aliases;
return exists($aliases{$mimet}) ? $aliases{$mimet} : $mimet;
}
sub rehash_aliases {
%aliases = _read_map_files('aliases');
$_hashed_aliases++;
}
sub _read_map_files {
my ($name, $list) = @_;
my @files = @DIRS
? ( grep {-e $_ && -r $_} map "$_/$name", @DIRS )
: ( reverse data_files("mime/$name") );
my (@done, %map);
for my $file (@files) {
next if grep {$_ eq $file} @done;
open MAP, '<', $file || croak "Could not open file '$file' for reading";
binmode MAP, ':utf8' unless $] < 5.008;
while (<MAP>) {
next if /^\s*#/ or ! /\S/; # skip comments and empty lines
chomp;
my ($k, $v) = split /\s+/, $_, 2;
if ($list) {
$map{$k} = [] unless $map{$k};
push @{$map{$k}}, $v;
}
else { $map{$k} = $v }
}
close MAP;
push @done, $file;
}
return %map;
}
sub mimetype_isa {
my $parent = pop || croak 'mimetype_isa needs argument';
my $mimet = pop;
if (ref $mimet or ! defined $mimet) {
$mimet = mimetype_canon($parent);
undef $parent;
}
else {
$mimet = mimetype_canon($mimet);
$parent = mimetype_canon($parent);
}
rehash_subclasses() unless $_hashed_subclasses;
my @subc;
push @subc, 'inode/directory' if $mimet eq 'inode/mount-point';
push @subc, @{$subclasses{$mimet}} if exists $subclasses{$mimet};
push @subc, 'text/plain' if $mimet =~ m#^text/#;
push @subc, 'application/octet-stream' unless $mimet =~ m#^inode/#;
return $parent ? scalar(grep {$_ eq $parent} @subc) : @subc;
}
sub rehash_subclasses {
%subclasses = _read_map_files('subclasses', 'LIST');
$_hashed_subclasses++;
}
1;
__END__
=head1 NAME
File::MimeInfo - Determine file type
=head1 SYNOPSIS
use File::MimeInfo;
my $mime_type = mimetype($file);
=head1 DESCRIPTION
This module can be used to determine the mime type of a file. It
tries to implement the freedesktop specification for a shared
MIME database.
For this module shared-mime-info-spec 0.13 was used.
This package only uses the globs file. No real magic checking is
used. The L<File::MimeInfo::Magic> package is provided for magic typing.
If you want to determine the mimetype of data in a memory buffer you should
use L<File::MimeInfo::Magic> in combination with L<IO::Scalar>.
This module loads the various data files when needed. If you want to
hash data earlier see the C<rehash> methods below.
=head1 EXPORT
The method C<mimetype> is exported by default.
The methods C<inodetype>, C<globs>, C<extensions>, C<describe>,
C<mimetype_canon> and C<mimetype_isa> can be exported on demand.
=head1 METHODS
=over 4
=item C<new()>
Simple constructor to allow Object Oriented use of this module.
If you want to use this, include the package as C<use File::MimeInfo ();>
to avoid importing sub C<mimetype()>.
=item C<mimetype($file)>
Returns a mimetype string for C<$file>, returns undef on failure.
This method bundles C<inodetype> and C<globs>.
If these methods are unsuccessful the file is read and the mimetype defaults
to 'text/plain' or to 'application/octet-stream' when the first ten chars
of the file match ascii control chars (white spaces excluded).
If the file doesn't exist or isn't readable C<undef> is returned.
=item C<inodetype($file)>
Returns a mimetype in the 'inode' namespace or undef when the file is
actually a normal file.
=item C<globs($file)>
Returns a mimetype string for C<$file> based on the filename and filename extensions.
Returns undef on failure. The file doesn't need to exist.
Behaviour in list context (wantarray) is unspecified and will change in future
releases.
=item C<default($file)>
This method decides whether a file is binary or plain text by looking at
the first few bytes in the file. Used to decide between "text/plain" and
"application/octet-stream" if all other methods have failed.
The spec states that we should check for the ascii control chars and let
higher bit chars pass to allow utf8. We try to be more intelligent using
perl utf8 support.
=item C<extensions($mimetype)>
In list context, returns the list of filename extensions that map to the given mimetype.
In scalar context, returns the first extension that is found in the database
for this mimetype.
=item C<describe($mimetype, $lang)>
Returns a description of this mimetype as supplied by the mime info database.
You can specify a language with the optional parameter C<$lang>, this should be
the two letter language code used in the xml files. Also you can set the global
variable C<$File::MimeInfo::LANG> to specify a language.
This method returns undef when no xml file was found (i.e. the mimetype
doesn't exist in the database). It returns an empty string when the xml file doesn't
contain a description in the language you specified.
I<Currently no real xml parsing is done, it trusts the xml files are nicely formatted.>
=item C<mimetype_canon($mimetype)>
Returns the canonical mimetype for a given mimetype.
Deprecated mimetypes are typically aliased to their canonical variants.
This method only checks aliases, doesn't check whether the mimetype
exists.
Use this method as a filter when you take a mimetype as input.
=item C<mimetype_isa($mimetype)>
=item C<mimetype_isa($mimetype, $mimetype)>
When give only one argument this method returns a list with mimetypes that are parent
classes for this mimetype.
When given two arguments returns true if the second mimetype is a parent class of
the first one.
This method checks the subclasses table and applies a few rules for implicit
subclasses.
=item C<rehash()>
Rehash the data files. Glob information is preparsed when this method is called.
If you want to by-pass the XDG basedir system you can specify your database
directories by setting C<@File::MimeInfo::DIRS>. But normally it is better to
change the XDG basedir environment variables.
=item C<rehash_aliases()>
Rehashes the F<mime/aliases> files.
=item C<rehash_subclasses()>
Rehashes the F<mime/subclasses> files.
=back
=head1 DIAGNOSTICS
This module throws an exception when it can't find any data files, when it can't
open a data file it found for reading or when a subroutine doesn't get enough arguments.
In the first case you either don't have the freedesktop mime info database installed,
or your environment variables point to the wrong places,
in the second case you have the database installed, but it is broken
(the mime info database should logically be world readable).
=head1 TODO
Make an option for using some caching mechanism to reduce init time.
Make C<describe()> use real xml parsing ?
=head1 LIMITATIONS
Perl versions prior to 5.8.0 do not have the ':utf8' IO Layer, thus
for the default method and for reading the xml files
utf8 is not supported for these versions.
Since it is not possible to distinguish between encoding types (utf8, latin1, latin2 etc.)
in a straightforward manner only utf8 is supported (because the spec recommends this).
This module does not yet check extended attributes for a mimetype.
Patches for this are very welcome.
=head1 AUTHOR
Jaap Karssenberg E<lt>pardus@cpan.orgE<gt>
Maintained by Michiel Beijen E<lt>michiel.beijen@gmail.comE<gt>
=head1 COPYRIGHT
Copyright (c) 2003, 2012 Jaap G Karssenberg. All rights reserved.
This program is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.
=head1 SEE ALSO
L<File::BaseDir>,
L<File::MimeInfo::Magic>,
L<File::MimeInfo::Applications>,
L<File::MimeInfo::Rox>
=over 4
=item related CPAN modules
L<File::MMagic>
=item freedesktop specifications used
L<http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec>,
L<http://www.freedesktop.org/wiki/Specifications/basedir-spec>,
L<http://www.freedesktop.org/wiki/Specifications/desktop-entry-spec>
=item freedesktop mime database
L<http://www.freedesktop.org/wiki/Software/shared-mime-info>
=back
=cut

View File

@@ -95,9 +95,9 @@ else {
}
if ($table->{'name'} eq 'nat' && $rule->{'chain'} ne 'POSTROUTING') {
if ($rule->{'j'}->[1] eq 'DNAT' && !$in{'dnatdef'}) {
!$in{'dipfrom'} || &check_ipaddress($in{'dipfrom'}) ||
!$in{'dipfrom'} || &check_ip6address($in{'dipfrom'}) ||
&error($text{'save_edipfrom'});
!$in{'dipto'} || &check_ipaddress($in{'dipto'}) ||
!$in{'dipto'} || &check_ip6address($in{'dipto'}) ||
&error($text{'save_edipto'});
local $v = "[".$in{'dipfrom'}."]";
$v .= "-[".$in{'dipto'}."]" if ($in{'dipto'});
@@ -123,9 +123,9 @@ else {
$rule->{'chain'} ne 'OUTPUT') {
if ($rule->{'j'}->[1] eq 'SNAT' && !$in{'snatdef'}) {
(!$in{'sipfrom'} && !$in{'sipto'}) ||
&check_ipaddress($in{'sipfrom'}) ||
&check_ip6address($in{'sipfrom'}) ||
&error($text{'save_esipfrom'});
!$in{'sipto'} || &check_ipaddress($in{'sipto'}) ||
!$in{'sipto'} || &check_ip6address($in{'sipto'}) ||
&error($text{'save_esipto'});
local $v = $in{'sipfrom'};
$v .= "-".$in{'sipto'} if ($in{'sipto'});

View File

@@ -0,0 +1,6 @@
frox=/usr/sbin/frox
frox_conf=/etc/frox.conf
alt_frox_conf=/usr/share/doc/packages/frox-0.7.9/frox.conf
start_cmd=systemctl start frox
stop_cmd=systemctl stop frox
apply_cmd=systemctl reload frox

View File

@@ -272,7 +272,7 @@ local ($wrong_password, $got_login, $connect_failed);
local $out;
local $stars = ("*" x length($pass));
while(1) {
local $rv = &wait_for($cfh, "password:", "yes\\/no", "(^|\\n)\\s*Permission denied.*\n", "ssh: connect.*\n", ".*\n");
local $rv = &wait_for($cfh, "password:|Password\\s+for\\s+\\S+:", "yes\\/no", "(^|\\n)\\s*Permission denied.*\n", "ssh: connect.*\n", ".*\n");
if ($wait_for_input !~ /^\s*DUMP:\s+ACLs\s+in\s+inode/i) {
$wait_for_input =~ s/\Q$pass\E/$stars/g;
if ($fhmode) {

View File

@@ -1,22 +0,0 @@
---- Changes since 1.280 ----
First version of this theme.
---- Changes since 1.290 ----
The current category name is now underlined.
Reduced the thickness of border lines.
All icons are now shown half the usual size, with the titles to the right instead of below.
---- Changes since 1.300 ----
Totally re-worked theme to use a new framed design, with a Javascript collapsing category menu.
---- Changes since 1.310 ----
Added Webmin Servers link on the left menu, when accessed via the Webmin Servers Index module.
---- Changes since 1.320 ----
Added a feedback link to the left menu, but only when a custom feedback address is set.
---- Changes since 1.330 ----
Updated the color schema to match the new webmin.com, and made table borders and forms nicer (thanks to Joe).
Added a whole new set of icons from Virtualmin.
---- Changes since 1.340 ----
Fixed bad table indentation on some browsers.
Changed link colors to be darker.
---- Changes since 1.400 ----
Display system uptime in the right frame after logging in.
---- Changes since 1.430 ----
Updated CSS and all UI elements to match the Virtualmin theme, except for colors and icons.

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 852 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 972 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

127
gray-theme/config.cgi Executable file
View File

@@ -0,0 +1,127 @@
#!/usr/local/bin/perl
# Display a form for editing the configuration of a module, one section at
# a time.
require "gray-theme/gray-theme-lib.pl";
require './config-lib.pl';
&ReadParse();
$m = $in{'module'} || $ARGV[0];
&foreign_available($m) || &error($text{'config_eaccess'});
%access = &get_module_acl(undef, $m);
$access{'noconfig'} &&
&error($text{'config_ecannot'});
%module_info = &get_module_info($m);
if (-r &help_file($m, "config_intro")) {
$help = [ "config_intro", $m ];
}
else {
$help = undef;
}
&ui_print_header(&text('config_dir', $module_info{'desc'}),
$text{'config_title'}, "", $help, 0, 1);
$mdir = &module_root_directory($m);
my $mdir_conf_file = "$mdir/config.info";
if ($current_lang && $default_lang &&
$current_lang ne $default_lang &&
-r "$mdir_conf_file.$current_lang")
{
$mdir_conf_file .= ".$current_lang";
}
# Read the config.info file to find sections
&read_file($mdir_conf_file, \%info, \@info_order);
# Call any config preload function
if (&foreign_require($m) &&
&foreign_defined($m, 'config_pre_load')) {
&foreign_call($m, "config_pre_load", \%info, \@info_order);
}
foreach $i (@info_order) {
@p = split(/,/, $info{$i});
if ($p[1] == 11) {
push(@sections, [ $i, $p[0] ]);
}
}
if (@sections > 1) {
# Work out template section to edit
$in{'section'} ||= $sections[0]->[0];
$idx = &indexof($in{'section'}, map { $_->[0] } @sections);
if ($in{'nprev'}) {
$idx--;
$idx = @sections-1 if ($idx < 0);
}
elsif ($in{'nnext'}) {
$idx++;
$idx = 0 if ($idx >= @sections);
}
$in{'section'} = $sections[$idx]->[0];
# We have some sections .. show a menu to select
print &ui_form_start("config.cgi");
print &ui_hidden("module", $m),"\n";
print $text{'config_section'},"\n";
print &ui_select("section", $in{'section'}, \@sections,
1, 0, 0, 0, "onChange='form.submit()'");
print &ui_submit($text{'config_change'});
print "&nbsp;&nbsp;\n";
print &ui_submit($text{'config_nprev'}, "nprev");
print &ui_submit($text{'config_nnext'}, "nnext");
print &ui_form_end();
($s) = grep { $_->[0] eq $in{'section'} } @sections;
$sname = $s->[1];
}
print &ui_form_start("config_save.cgi", "post");
print &ui_hidden("module", $m),"\n";
print &ui_hidden("section", $in{'section'}),"\n";
if ($s) {
# Find next section
$idx = &indexof($s, @sections);
if ($idx == @sections-1) {
print &ui_hidden("section_next", $sections[0]->[0]);
}
else {
print &ui_hidden("section_next", $sections[$idx+1]->[0]);
}
}
print &ui_table_start($sname, "width=100%", 2);
# Load module config defaults (fill missing)
my $mdefconf = "$mdir/config";
$mdefconf = "$mdir/config-$gconfig{'os_type'}"
if (-r "$mdir/config-$gconfig{'os_type'}");
&read_file($mdefconf, \%newconfig);
# Load module config custom
&read_file("$config_directory/$m/config", \%newconfig);
# Load module config user custom
&load_module_preferences($m, \%newconfig);
if (-r "$mdir/config_info.pl") {
# Module has a custom config editor
&foreign_require($m, "config_info.pl");
local $fn = "${m}::config_form";
if (defined(&$fn)) {
$func++;
&foreign_call($m, "config_form", \%newconfig);
}
}
if (!$func) {
# Use config.info to create config inputs
&generate_config(\%newconfig, $mdir_conf_file, $m, undef, undef,
$in{'section'});
}
print &ui_table_end();
print &ui_form_end([ [ "save", $text{'save'} ],
$s ? ( [ "save_next", $text{'config_next'} ] ) : ( ) ]);
if ($m eq "virtual-server") {
&ui_print_footer("/right.cgi", $text{'config_return'});
}
else {
&ui_print_footer("/$m", $text{'index'});
}

53
gray-theme/config_save.cgi Executable file
View File

@@ -0,0 +1,53 @@
#!/usr/local/bin/perl
# config_save.cgi
# Save inputs from config.cgi
require "gray-theme/gray-theme-lib.pl";
require './config-lib.pl';
&ReadParse();
$m = $in{'module'};
&error_setup($text{'config_err'});
&foreign_available($m) || &error($text{'config_eaccess'});
%access = &get_module_acl(undef, $m);
$access{'noconfig'} && &error($text{'config_ecannot'});
mkdir("$config_directory/$m", 0700);
&lock_file("$config_directory/$m/config");
&read_file("$config_directory/$m/config", \%newconfig);
%oldconfig = %newconfig;
$mdir = &module_root_directory($m);
if (-r "$mdir/config_info.pl") {
# Module has a custom config editor
&foreign_require($m, "config_info.pl");
local $fn = "${m}::config_form";
if (defined(&$fn)) {
$func++;
&foreign_call($m, "config_save", \%newconfig);
}
}
if (!$func) {
# Use config.info to parse config inputs
&parse_config(\%newconfig, "$mdir/config.info", $m, undef, $in{'section'});
}
&write_file("$config_directory/$m/config", \%newconfig);
&unlock_file("$config_directory/$m/config");
&save_module_preferences($m, \%newconfig);
# Call any post-config save function
if (&foreign_require($m) &&
&foreign_defined($m, 'config_post_save')) {
&foreign_call($m, "config_post_save", \%newconfig, \%oldconfig)
}
&webmin_log("_config_", undef, undef, \%in, $m);
if ($in{'save_next'}) {
&redirect("config.cgi?module=$in{'module'}&section=$in{'section_next'}");
}
elsif ($m eq "virtual-server") {
&redirect("/right.cgi");
}
else {
&redirect("/$m/");
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 800 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 768 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 585 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 559 B

24
gray-theme/edit_overlay.cgi Executable file
View File

@@ -0,0 +1,24 @@
#!/usr/local/bin/perl
# Show a form for changing the theme overlay
require "gray-theme/gray-theme-lib.pl";
# Get the user and themes
&foreign_require("acl", "acl-lib.pl");
@overlays = &list_virtualmin_theme_overlays();
($user) = grep { $_->{'name'} eq $base_remote_user } &acl::list_users();
$user || &error($text{'overlay_euser'});
$overlay = $current_themes[1];
&ui_print_header(undef, $text{'overlay_title'}, "");
print &ui_form_start("save_overlay.cgi");
print $text{'overlay_desc'},"<p>\n";
print "<b>$text{'overlay_msg'}</b>\n";
print &ui_select("overlay", $overlay,
[ [ "", $text{'overlay_none'} ],
map { [ $_->{'dir'}, $_->{'desc'} ] } @overlays ]),"<br>\n";
print &ui_form_end([ [ undef, $text{'overlay_ok'} ] ]);
&ui_print_footer("right.cgi", $text{'right_return'});

110
gray-theme/edit_right.cgi Executable file
View File

@@ -0,0 +1,110 @@
#!/usr/local/bin/perl
# Show a form for configuring what gets dislayed on the right frame
require "gray-theme/gray-theme-lib.pl";
require "gray-theme/theme.pl";
($hasvirt, $level, $hasvm2) = &get_virtualmin_user_level();
$sects = &get_right_frame_sections();
!$sects->{'global'} ||
$hasvirt && &virtual_server::master_admin() ||
$hasvm2 && !$server_manager::access{'owner'} ||
&error($text{'edright_ecannot'});
&ui_print_header(undef, $text{'edright_title'}, "", undef, 0, 1, 1);
print &ui_form_start("save_right.cgi", "post");
print &ui_table_start($text{'edright_header'}, undef ,2);
# Visible sections
print &ui_table_row($text{'edright_sects'},
join("<br>\n", map { &ui_checkbox($_->{'name'}, 1, $_->{'title'},
!$sects->{'no'.$_->{'name'}}) }
&list_right_frame_sections()));
# Show list by default
print &ui_table_row($text{'edright_list'},
&ui_radio("list", $sects->{'list'} || 0,
[ [ 0, $text{'edright_list0'} ],
$hasvirt ? ( [ 1, $text{'edright_list1'} ] ) : ( ),
$hasvm2 ? ( [ 2, $text{'edright_list2'} ] ) : ( ),
]));
# Alternate page
print &ui_table_row($text{'edright_alt'},
&ui_opt_textbox("alt", $sects->{'alt'}, 40, $text{'edright_altdef'}."<br>",
$text{'edright_alturl'}));
# Default tab
print &ui_table_row($text{'edright_deftab'},
&ui_select("tab", $sects->{'tab'},
[ [ "", $text{'edright_tab1'} ],
$hasvirt ? ( [ "virtualmin", $text{'edright_virtualmin'} ] ) : ( ),
$hasvm2 ? ( [ "vm2", $text{'edright_vm2'} ] ) : ( ),
[ "webmin", $text{'edright_webmin'} ] ]));
# Left frame size
print &ui_table_row($text{'edright_fsize'},
&ui_opt_textbox("fsize", $sects->{'fsize'}, 6, $text{'edright_fsizedef'}).
" ".$text{'edright_pixels'});
# Show search box
print &ui_table_row($text{'edright_search'},
&ui_yesno_radio("search", !$sects->{'nosearch'}));
if ($hasvirt) {
# Default domain
print &ui_table_row($text{'edright_dom'},
&ui_select("dom", $sects->{'dom'},
[ [ "", $text{'edright_first'} ],
map { [ $_->{'id'}, &virtual_server::show_domain_name($_) ] }
grep { &virtual_server::can_edit_domain($_) }
sort { $a->{'dom'} cmp $b->{'dom'} }
&virtual_server::list_domains() ]));
# Sort quotas by bytes or percent
print &ui_table_row($text{'edright_qsort'},
&ui_radio("qsort", int($sects->{'qsort'}),
[ [ 1, $text{'edright_qsort1'} ],
[ 0, $text{'edright_qsort0'} ] ]));
# Show quotas as bytes or percent
print &ui_table_row($text{'edright_qshow'},
&ui_radio("qshow", int($sects->{'qshow'}),
[ [ 1, $text{'edright_qsort1'} ],
[ 0, $text{'edright_qsort0'} ] ]));
# Number of servers to show
print &ui_table_row($text{'edright_max'},
&ui_opt_textbox("max", $sects->{'max'}, 5,
$text{'default'}." ($default_domains_to_show)"));
}
if ($hasvm2) {
# Default Cloudmin server
@servers = &server_manager::list_available_managed_servers_sorted();
print &ui_table_row($text{'edright_server'},
&ui_select("server", $sects->{'server'},
[ [ "", $text{'edright_first'} ],
map { [ $_->{'id'}, $_->{'host'} ] } @servers ]));
}
if ($hasvirt && &virtual_server::master_admin() ||
$hasvm2 && &server_manager::can_action(undef, "global")) {
# Allow changing
print &ui_table_row($text{'edright_global'},
&ui_yesno_radio("global", int($sects->{'global'})));
# Show Webmin category
print &ui_table_row($text{'edright_nowebmin'},
&ui_radio("nowebmin", int($sects->{'nowebmin'}),
[ [ 0, $text{'yes'} ],
[ 1, $text{'no'} ],
[ 2, $text{'edright_others'} ] ]));
}
print &ui_table_end();
print &ui_form_end([ [ "save", $text{'save'} ] ]);
&ui_print_footer("right.cgi", $text{'right_return'});

Binary file not shown.

After

Width:  |  Height:  |  Size: 449 B

BIN
gray-theme/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

185
gray-theme/gray-theme-lib.pl Normal file → Executable file
View File

@@ -1,9 +1,184 @@
# Common functions for theme CGIs
# Functions used by theme CGIs
use strict;
use warnings;
BEGIN { push(@INC, ".."); };
use WebminCore;
eval "use WebminCore;";
if ($@) {
do '../web-lib.pl';
do '../ui-lib.pl';
}
&init_config();
&load_theme_library();
%text = &load_language($current_theme);
$right_frame_sections_file = "$config_directory/$current_theme/sections";
$default_domains_to_show = 10;
# get_left_frame_width()
# Returns the width of the left frame in pixels
sub get_left_frame_width
{
local $sects = &get_right_frame_sections();
return $sects->{'fsize'} ? $sects->{'fsize'} :
&get_product_name() eq 'usermin' ? 200 :
&foreign_available("server-manager") &&
&foreign_available("virtual-server") ? 280 : 260;
}
# list_virtualmin_theme_overlays()
# Returns a list of overlay themes suitable for this theme
sub list_virtualmin_theme_overlays
{
&foreign_require("webmin", "webmin-lib.pl");
local @rv;
foreach my $tinfo (&webmin::list_themes()) {
if ($tinfo->{'overlay'} &&
(!$tinfo->{'overlays'} ||
&indexof($current_theme,
split(/\s+/, $tinfo->{'overlays'})) >= 0)) {
push(@rv, $tinfo);
}
}
return @rv;
}
sub get_virtualmin_docs
{
local ($level) = @_;
return $level == 0 ? "http://www.virtualmin.com/documentation" :
$level == 1 ? "http://www.virtualmin.com/documentation/users/reseller" :
$level == 2 ? "http://www.virtualmin.com/documentation/users/server-owner" :
"http://www.virtualmin.com/documentation";
}
sub get_vm2_docs
{
local ($level) = @_;
return "http://www.virtualmin.com/documentation/cloudmin";
}
# get_right_frame_sections()
# Returns a hash containg details of visible right-frame sections
sub get_right_frame_sections
{
local %sects;
&read_file($right_frame_sections_file, \%sects);
if ($sects{'global'}) {
# Force use of global settings
return \%sects;
}
else {
# Can try personal settings, but fall back to global
local %usersects;
if (&read_file($right_frame_sections_file.".".$remote_user,
\%usersects)) {
return \%usersects;
}
else {
return \%sects;
}
}
}
# save_right_frame_sections(&sects)
sub save_right_frame_sections
{
local ($sects) = @_;
&make_dir("$config_directory/$current_theme", 0700);
if ($sects->{'global'}) {
# Update global settings, for all users
&write_file($right_frame_sections_file, $sects);
}
else {
# Save own, and turn off global flag (if this is the master admin)
if (&foreign_check("virtual-server")) {
&foreign_require("virtual-server", "virtual-server-lib.pl");
if (&virtual_server::master_admin()) {
local %globalsect;
&read_file($right_frame_sections_file, \%globalsect);
$globalsect{'global'} = 0;
&write_file($right_frame_sections_file, \%globalsect);
}
}
&write_file($right_frame_sections_file.".".$remote_user, $sects);
}
}
# list_right_frame_sections()
# Returns a list of possible sections for the current user, as hash refs
sub list_right_frame_sections
{
local ($hasvirt, $level, $hasvm2) = &get_virtualmin_user_level();
local @rv;
if ($level == 0) {
# Master admin
if ($hasvirt) {
push(@rv, 'updates', 'status', 'newfeatures',
'quotas', 'bw', 'ips', 'sysinfo');
}
if ($hasvm2) {
push(@rv, 'vm2servers');
}
}
elsif ($level == 2) {
# Domain owner
push(@rv, 'virtualmin');
}
elsif ($level == 1) {
# Reseller
push(@rv, 'reseller', 'quotas', 'bw');
}
elsif ($level == 4) {
# Cloudmin system owner
push(@rv, 'owner', 'vm2servers');
}
else {
# Usermin
push(@rv, 'system');
}
@rv = map { { 'name' => $_,
'title' => $virtual_server::text{'right_'.$_.'header'} } } @rv;
# Add plugin-defined sections
if (($level == 0 || $level == 1 || $level == 2) && $hasvirt &&
defined(&virtual_server::list_plugin_sections)) {
push(@rv, &virtual_server::list_plugin_sections($level));
}
if (($level == 0 || $level == 4) && $hasvm2 &&
defined(&server_manager::list_plugin_sections)) {
push(@rv, &server_manager::list_plugin_sections($level));
}
return @rv;
}
# get_virtualmin_user_level()
# Returns three numbers - the first being a flag if virtualmin is installed,
# the second a user type (3=usermin, 2=domain, 1=reseller, 0=master, 4=system
# owner), the third a flag for Cloudmin
sub get_virtualmin_user_level
{
local ($hasvirt, $hasvm2, $level);
$hasvm2 = &foreign_available("server-manager");
$hasvirt = &foreign_available("virtual-server");
if ($hasvm2) {
&foreign_require("server-manager", "server-manager-lib.pl");
}
if ($hasvirt) {
&foreign_require("virtual-server", "virtual-server-lib.pl");
}
if ($hasvm2) {
$level = $server_manager::access{'owner'} ? 4 : 0;
}
elsif ($hasvirt) {
$level = &virtual_server::master_admin() ? 0 :
&virtual_server::reseller_admin() ? 1 : 2;
}
elsif (&get_product_name() eq "usermin") {
$level = 3;
}
else {
$level = 0;
}
return ($hasvirt, $level, $hasvm2);
}
1;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1008 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 445 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 465 B

BIN
gray-theme/images/lang.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 733 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 571 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 619 B

After

Width:  |  Height:  |  Size: 585 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 912 B

BIN
gray-theme/images/sig.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1010 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -1,41 +1,131 @@
#!/usr/bin/perl
#!/usr/local/bin/perl
use strict;
use warnings;
require 'gray-theme/gray-theme-lib.pl';
require "gray-theme/gray-theme-lib.pl";
require "gray-theme/theme.pl";
&ReadParse();
our ($current_theme, %in);
our %text = &load_language($current_theme);
my $minfo;
if ($in{'mod'}) {
$minfo = { &get_module_info($in{'mod'}) };
# Work out which module to open by default
$hasvirt = &foreign_available("virtual-server");
$hasvm2 = &foreign_available("server-manager");
if ($in{'dom'} && $hasvirt) {
# Caller has requested a specific domain ..
&foreign_require("virtual-server", "virtual-server-lib.pl");
$d = &virtual_server::get_domain($in{'dom'});
if ($d) {
$goto = &virtual_server::can_config_domain($d) ?
"virtual-server/edit_domain.cgi?dom=$d->{'id'}" :
"virtual-server/view_domain.cgi?dom=$d->{'id'}";
$left = "left.cgi?dom=$d->{'id'}";
}
}
if (!$goto) {
# Default is determined by theme or Webmin config,
# defaults to system info page
local $sects = &get_right_frame_sections();
$minfo = &get_goto_module();
if ($sects->{'list'} == 1 && $hasvirt) {
$goto = "virtual-server/";
}
elsif ($sects->{'list'} == 2 && $hasvm2) {
$goto = "server-manager/";
}
elsif ($minfo &&
$minfo->{'dir'} ne 'virtual-server' &&
$minfo->{'dir'} ne 'server-manager') {
$goto = "$minfo->{'dir'}/";
}
else {
$goto = "right.cgi".
"?open=system&auto=status&open=updates&".
"open=common&open=owner&open=reseller&open=vm2limits&".
"open=vm2usage";
}
$left = "left.cgi";
if ($minfo) {
$left .= "?$minfo->{'category'}=1";
}
}
# Work out the title that includes the version
if ($hasvirt) {
%minfo = &get_module_info("virtual-server");
$title = &text('index_virtualmintitle', $minfo{'version'});
}
elsif ($hasvm2) {
%minfo = &get_module_info("server-manager");
$title = &text('index_cloudmintitle', $minfo{'version'});
}
elsif (&get_product_name() eq 'usermin') {
$title = &text('index_usermintitle', &get_webmin_version());
}
else {
$minfo = &get_goto_module();
$title = &text('index_webmintitle', &get_webmin_version());
}
my $goto = $minfo ? $minfo->{'dir'}."/" :
$in{'page'} ? "" : "right.cgi";
if ($in{'page'}) {
$goto .= "/".$in{'page'};
$title = &get_html_title($title);
# Work out if we have a top frame
if ($hasvirt) {
%vconfig = &foreign_config("virtual-server");
}
$upperframe = $vconfig{'theme_topframe'} ||
$gconfig{'theme_topframe'};
$upperrows = $vconfig{'theme_toprows'} ||
$gconfig{'theme_toprows'} || 200;
if ($upperframe =~ /\$LEVEL|\$\{LEVEL/) {
# Sub in user level
$levelnum = &get_virtualmin_user_level();
$level = $levelnum == 0 ? "master" :
$levelnum == 1 ? "reseller" :
$levelnum == 2 ? "domain" :
$levelnum == 3 ? "usermin" :
$levelnum == 4 ? "owner" : "unknown";
$upperframe = &substitute_template($upperframe, { 'level' => $level });
}
my $cat = $minfo ? "?$minfo->{'category'}=1" : "";
# Show frameset
my $title = &get_html_framed_title();
my $cols = &get_product_name() eq 'usermin' ? 180 : 230;
&popup_header($title, undef, undef, 1);
&PrintHeader();
$cols = &get_left_frame_width();
$frame1 = "<frame name=left title=Navigation src='$left' scrolling=auto>";
$frame2 = "<frame name=right title=Content src='$goto' noresize scrolling=auto>";
$fscols = "$cols,*";
if ($current_lang_info->{'rtl'} || $current_lang eq "ar") {
($frame1, $frame2) = ($frame2, $frame1);
$fscols = "*,$cols";
}
print <<EOF;
<frameset cols="$cols,*" border=0>
<frame name="left" src="left.cgi$cat" scrolling="auto">
<frame name="right" src="$goto" noresize>
<noframes>
<body>
<p>This page uses frames, but your browser doesn't support them.</p>
</body>
</noframes>
</frameset>
EOF
&popup_footer(1);
# Page header
print "<html>\n";
print "<head> <title>$title</title> </head>\n";
# Upper custom frame
if ($upperframe) {
print "<frameset rows='$upperrows,*' border=0>\n";
if ($upperframe =~ /^\//) {
# Local file to serve
print "<frame name=top src='top.cgi' scrolling=auto>\n";
}
else {
# Absolute URL
print "<frame name=top src='$upperframe' scrolling=auto>\n";
}
}
# Left and right frames
print "<frameset cols='$fscols' border=0>\n";
print $frame1,"\n";
print $frame2,"\n";
# What if no frames?
print "<noframes>\n";
print "<body>\n";
print "<p>This page uses frames, but your browser doesn't support them.</p>\n";
print "</body>\n";
print "</noframes>\n";
# End of the frames and page
if ($upperframe) {
print "</frameset>\n";
}
print "</frameset>\n";
print "</html>\n";

Some files were not shown because too many files have changed in this diff Show More