mirror of
https://github.com/webmin/webmin.git
synced 2026-02-04 06:32:15 +00:00
Compare commits
298 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c8f403c5f6 | ||
|
|
162e181c21 | ||
|
|
7f73d135a3 | ||
|
|
65c2b20b15 | ||
|
|
457c4d85e3 | ||
|
|
57a918dc1b | ||
|
|
ee373ab2be | ||
|
|
fb26abb000 | ||
|
|
48bfce7cb1 | ||
|
|
b77193c95d | ||
|
|
3effb160b5 | ||
|
|
5881b223b4 | ||
|
|
0055290c76 | ||
|
|
253defe365 | ||
|
|
cd950f1c0a | ||
|
|
ded6d9a37f | ||
|
|
401ff8466a | ||
|
|
7de1f09c9f | ||
|
|
8f18e8cdf4 | ||
|
|
17cea3d3a2 | ||
|
|
60800e3b6b | ||
|
|
8c07bc9f30 | ||
|
|
0f8119a6d5 | ||
|
|
d40ff8a547 | ||
|
|
fb3524471a | ||
|
|
132fa7a16b | ||
|
|
0d87686862 | ||
|
|
4ec1e182d5 | ||
|
|
e6765ece27 | ||
|
|
e9376f3fc5 | ||
|
|
46f264e22c | ||
|
|
bb672844c7 | ||
|
|
0e8d291d63 | ||
|
|
c5a51403d1 | ||
|
|
6ed37aeef0 | ||
|
|
04f8997509 | ||
|
|
6bd51824d1 | ||
|
|
c4f74a0f9d | ||
|
|
357ab56b6d | ||
|
|
2af0b05c29 | ||
|
|
15bcab87c7 | ||
|
|
1c4afe2f11 | ||
|
|
7e72bcdbaf | ||
|
|
bbff90bea4 | ||
|
|
347b7e87cf | ||
|
|
085865ec9a | ||
|
|
bcd16e5ade | ||
|
|
613efe4ace | ||
|
|
a5ffa5e309 | ||
|
|
80170f9b80 | ||
|
|
1fef37a8a1 | ||
|
|
71949364be | ||
|
|
941f110eda | ||
|
|
2d4640f00a | ||
|
|
ce8e0411e4 | ||
|
|
d49c16cb31 | ||
|
|
f74c22a66d | ||
|
|
e59cac6f51 | ||
|
|
633d60900c | ||
|
|
d5b9cefb2c | ||
|
|
ac9a3b7c41 | ||
|
|
edccc4ea10 | ||
|
|
90d0244950 | ||
|
|
7ec8bc71e0 | ||
|
|
ecca77fdad | ||
|
|
265a775ccb | ||
|
|
91052e76b0 | ||
|
|
abba5c7377 | ||
|
|
6316210b9d | ||
|
|
fe6d99777e | ||
|
|
f8c1571e15 | ||
|
|
5870f40481 | ||
|
|
9c98a7f820 | ||
|
|
ce8e6bf481 | ||
|
|
90fc05e34a | ||
|
|
49ed6fc377 | ||
|
|
f818ead2db | ||
|
|
eb6b294bed | ||
|
|
30bf7beb02 | ||
|
|
8d6124321f | ||
|
|
ccc715a11e | ||
|
|
490b035f72 | ||
|
|
025be61e1e | ||
|
|
005857ccd1 | ||
|
|
31a5ec771d | ||
|
|
1ed25a0bbf | ||
|
|
a0db27968b | ||
|
|
1f516d66f5 | ||
|
|
f2b21bc503 | ||
|
|
7698818eec | ||
|
|
21fe9cddf7 | ||
|
|
bf3e1cb064 | ||
|
|
ff2976fd85 | ||
|
|
ecd98c0030 | ||
|
|
7fe32a5dce | ||
|
|
6a12fe7d23 | ||
|
|
08c55bac64 | ||
|
|
f4f9b32db0 | ||
|
|
6c366fd394 | ||
|
|
17f3235798 | ||
|
|
a0fd8f3694 | ||
|
|
d28761ce88 | ||
|
|
a9f6a4528f | ||
|
|
1e65d4b153 | ||
|
|
d80a0203bd | ||
|
|
bdcabcfbe9 | ||
|
|
2cc32ee64a | ||
|
|
ae85145e43 | ||
|
|
0cfe643700 | ||
|
|
147990a30a | ||
|
|
b4b309d6d7 | ||
|
|
b837846128 | ||
|
|
522bd05fff | ||
|
|
678f8ec6da | ||
|
|
a6983f8df7 | ||
|
|
5186ab8125 | ||
|
|
e9655ed5e9 | ||
|
|
9bd529fce4 | ||
|
|
21b516b52e | ||
|
|
7d1b4a66f4 | ||
|
|
8a1a182099 | ||
|
|
a6984f6be5 | ||
|
|
6d1900f94a | ||
|
|
0bc3eb6430 | ||
|
|
caa329d749 | ||
|
|
2e9039434b | ||
|
|
a4c8e4a7bb | ||
|
|
b0e9415d01 | ||
|
|
99e46e7e3f | ||
|
|
e223f899e5 | ||
|
|
20c9d9f0f1 | ||
|
|
e422ae0eaf | ||
|
|
40780e96b1 | ||
|
|
2f6e937f21 | ||
|
|
3eb49c27ed | ||
|
|
90196c3f88 | ||
|
|
2d7ba714ac | ||
|
|
fb4595b38d | ||
|
|
adfd154341 | ||
|
|
9f23977794 | ||
|
|
6a80732b71 | ||
|
|
88db96cf31 | ||
|
|
10cbab5fe8 | ||
|
|
a8a1cdc05b | ||
|
|
ad26beb5b4 | ||
|
|
3a2f028f7e | ||
|
|
566a07c477 | ||
|
|
e96c1cac11 | ||
|
|
379a5a00cd | ||
|
|
e7265843d3 | ||
|
|
ca93abc540 | ||
|
|
c446449496 | ||
|
|
bb07d2d1e7 | ||
|
|
3233f47cf2 | ||
|
|
e11e9dc86f | ||
|
|
8938385d67 | ||
|
|
3ca97055c4 | ||
|
|
ab17eff7cf | ||
|
|
b46a5ce93a | ||
|
|
2136ee98ec | ||
|
|
bee4a4029b | ||
|
|
cf1991d78d | ||
|
|
0df6939988 | ||
|
|
ed265ce71f | ||
|
|
eaba21745a | ||
|
|
af7b9c8fac | ||
|
|
ed9b044f91 | ||
|
|
5868988c89 | ||
|
|
54c14c668d | ||
|
|
315d517bc3 | ||
|
|
4b4176a40d | ||
|
|
f846fbd43b | ||
|
|
c51d78c804 | ||
|
|
46e629fb9b | ||
|
|
66f656a8db | ||
|
|
1db6880427 | ||
|
|
ff9bb29365 | ||
|
|
90d29e43cd | ||
|
|
1fed180246 | ||
|
|
d73b5d7926 | ||
|
|
411da84699 | ||
|
|
bda15c89da | ||
|
|
310d559b3b | ||
|
|
1fd1190da8 | ||
|
|
5b85401283 | ||
|
|
e98fd286f4 | ||
|
|
d54c1a22e0 | ||
|
|
62821c2f19 | ||
|
|
5cf1cad0be | ||
|
|
2951cec66e | ||
|
|
c9b0382b61 | ||
|
|
e999beed42 | ||
|
|
79f1c9368f | ||
|
|
8412a08be0 | ||
|
|
3887899f3e | ||
|
|
64f39bf8f4 | ||
|
|
0762e3866d | ||
|
|
7b181d742b | ||
|
|
db99121336 | ||
|
|
7560c4a41b | ||
|
|
a7f2a04351 | ||
|
|
962a4225f0 | ||
|
|
dc7d44f150 | ||
|
|
8d538fae68 | ||
|
|
e9f6416d80 | ||
|
|
ed65f6371d | ||
|
|
82380e1d32 | ||
|
|
1015f7b1b2 | ||
|
|
a76b0fbd53 | ||
|
|
e2419bfc15 | ||
|
|
89d5793316 | ||
|
|
1bd406d5c8 | ||
|
|
ef72775550 | ||
|
|
2f626485a6 | ||
|
|
e87dd429c9 | ||
|
|
0a3658400e | ||
|
|
b5602d93c6 | ||
|
|
cdf631f397 | ||
|
|
e25eae389f | ||
|
|
1eb43c8503 | ||
|
|
b0e94be6e3 | ||
|
|
901a64ea3a | ||
|
|
2ec766071b | ||
|
|
0c18c5f3f9 | ||
|
|
18f4da591f | ||
|
|
355d99d232 | ||
|
|
a214f413c5 | ||
|
|
a27441b24c | ||
|
|
80ee1c5919 | ||
|
|
0f3eb41489 | ||
|
|
d8f861b67e | ||
|
|
cffb3c5d61 | ||
|
|
545e9341ef | ||
|
|
7758195ae3 | ||
|
|
3d45568f37 | ||
|
|
577f5ac754 | ||
|
|
7915579de4 | ||
|
|
8f6e095091 | ||
|
|
f7c7c32427 | ||
|
|
a7ee17f5af | ||
|
|
b9e3a748c1 | ||
|
|
3ef8d17ed5 | ||
|
|
b29520e350 | ||
|
|
30569f5e28 | ||
|
|
2588a507cc | ||
|
|
1edcc12734 | ||
|
|
dd5183a0f9 | ||
|
|
dae494fdde | ||
|
|
1c9dc7b727 | ||
|
|
689837875f | ||
|
|
de1c3b187f | ||
|
|
b8951b3f7d | ||
|
|
7ac845a01b | ||
|
|
c76f0720cf | ||
|
|
f9bbe37763 | ||
|
|
238f8ce2d9 | ||
|
|
962b43d0d3 | ||
|
|
e5769bd07b | ||
|
|
2e64eac747 | ||
|
|
a902884e51 | ||
|
|
fd46a3af4a | ||
|
|
4a2e1188ac | ||
|
|
8a761c2075 | ||
|
|
29d607ad22 | ||
|
|
c207f75647 | ||
|
|
2620e2cf4a | ||
|
|
d0d5806957 | ||
|
|
cd904e9a73 | ||
|
|
2d3c81075d | ||
|
|
f3a5631c04 | ||
|
|
a6b71554c5 | ||
|
|
f219c7eb2f | ||
|
|
fc41316071 | ||
|
|
bdd0b819d5 | ||
|
|
5afb921074 | ||
|
|
98677fd304 | ||
|
|
5a994bd40a | ||
|
|
13f01b3f9e | ||
|
|
c222dac785 | ||
|
|
b1d471fac4 | ||
|
|
c7554ac611 | ||
|
|
38876ff52e | ||
|
|
ba53820a46 | ||
|
|
b828a6b5c6 | ||
|
|
92a66b5159 | ||
|
|
e66234b1b3 | ||
|
|
553e436c54 | ||
|
|
ce3b84b118 | ||
|
|
c22919849e | ||
|
|
3fe4bc337a | ||
|
|
320d63ba2a | ||
|
|
4d79a24158 | ||
|
|
a53b6d96ca | ||
|
|
b0c779923f | ||
|
|
f32aa17317 | ||
|
|
24cca0d258 | ||
|
|
52af4d489a | ||
|
|
262bbd3e03 |
2
README
2
README
@@ -1,4 +1,4 @@
|
||||
Webmin Version 1.800
|
||||
Webmin Version 1.810
|
||||
--------------------
|
||||
Webmin is a web-based interface for system administration for Unix.
|
||||
Using any browser that supports tables and forms, you can setup user
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
ssleay=/usr/bin/openssl
|
||||
select=0
|
||||
order=0
|
||||
display=1
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
ssleay=/usr/bin/openssl
|
||||
select=0
|
||||
order=0
|
||||
display=1
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
ssleay=/usr/bin/openssl
|
||||
select=0
|
||||
order=0
|
||||
display=1
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
ssleay=/usr/bin/openssl
|
||||
select=0
|
||||
order=0
|
||||
display=1
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
ssleay=/usr/bin/openssl
|
||||
select=0
|
||||
order=0
|
||||
display=1
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
ssleay=/usr/sfw/bin/openssl
|
||||
select=0
|
||||
order=0
|
||||
display=1
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
line1=Configurable options,11
|
||||
display=User and group display mode,1,1-Names only,0-Names and modules
|
||||
select=Display user modules in,1,0-Table,1-Pulldown menu
|
||||
order=Sort users and groups by,1,0-Order in file,1-Name
|
||||
line2=System configuration,11
|
||||
ssleay=Path to openssl or ssleay program,3,Automatic
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
line1=Конфигурационни опции,11
|
||||
select=Показвай юзерските модули в,1,0-таблица,1-Падащо меню
|
||||
order=Подреди юзери и групи по,1,0-подредба във файл,1-име
|
||||
line2=Системна конфигурация,11
|
||||
ssleay=Път към openssl или ssleay програма,0
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
line1=Opcions configurables,11
|
||||
display=Forma de mostrar els usuaris i els grups,1,1-Només els noms,0-Noms i mòduls
|
||||
select=Mostra els mòduls d'usuaris amb,1,0-Taula,1-Menú desplegable
|
||||
order=Ordena els usuaris i grups per,1,0-L'ordre del fitxer,1-El nom
|
||||
line2=Configuració del sistema,11
|
||||
ssleay=Camí del programa <tt>openssl</tt> o <tt>ssleay</tt>,3,Automàtic
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
line1=Možnosti konfigurace,11
|
||||
display=Mód pro zobrazení uživatele a skupiny,1,1-Pouze jména,0-Jména a moduly
|
||||
select=Zobrazit moduly uživatele v,1,0-tabulce,1-rozbalovací nabídce
|
||||
order=Třídit uživatele a skupiny podle,1,0-pořadí v souboru,1-jména
|
||||
line2=Konfigurace systému,11
|
||||
ssleay=Cesta k programu openssl nebo ssleay,0
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
line1=Konfigurerbare indstillinger,11
|
||||
display=Bruger og gruppe visnings mode,1,1-Kun navne,0-Navne og moduler
|
||||
select=Vis brugermoduler i,1.0-Tabel,1-Pulldown menu
|
||||
order=Sorter brugere og grupper ved,1.0-Sortering i fil,1-Navn
|
||||
line2=Systemkonfiguration,11
|
||||
ssleay=Sti til openssl eller ssleay progarm,3,Automatisk
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
line1=Konfigurierbare Optionen,11
|
||||
display=Benutzer- und Gruppenanzeige,1,1-Nur Namen,0-Namen und Module
|
||||
select=Zeige Benutzermodule als,1,0-Tabelle,1-Auswahlliste
|
||||
order=Sortiere Benutzer und Gruppen nach,1,0-Reihenfolge in Datei,1-Name
|
||||
line2=Systemkonfiguration,11
|
||||
ssleay=Pfad zu <tt>openssl</tt> oder <tt>ssleay</tt>,3,Automatisch
|
||||
@@ -1,6 +1,5 @@
|
||||
line1=Opciones Configurables,11
|
||||
display=Modo de mostrar usuario y grupo,1,1-Sólo nombres,0-Nombres y módulos
|
||||
select=Mostrar módulos de usuario en,1,0-Tabla,1-Menú desplegable
|
||||
order=Clasificar usuarios y grupos por,1,0-Orden en archivo,1-Nombre
|
||||
line2=Configuración de Sistema,11
|
||||
ssleay=Trayectoria al programa openssl o ssleay,0
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
line1=Konfiguragarri diren aukerak, 11
|
||||
display=Erabiltzaile eta taldea erakusteko modua, 1,1-Izenak soilik, 0-Izenak eta moduluak
|
||||
select=Erabiltzaile moduluak erakutsi,1,0-Taulan, 1-
|
||||
Display user modules in,1,0-Table,1-Pulldown menu
|
||||
order=Ordenatu erabiltzaile eta taldeak,1,0-Fitxategian ordenatu,1-Izena
|
||||
line2=Sistemaren konfigurazioa,11
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
|
||||
line1=گزينههاي پيکربندي,11
|
||||
display=حالت نمايش کاربران و گروهها,1,1-فقط نامها,0-نامها و پيمانهها
|
||||
select=نمايش پيمانههاي کاربر در,1,0-جدول,1-گزينگان پايين بر
|
||||
order=مرتب سازي کاربران و گروهها براساس,1,0-ترتيب در پرونده,1-نام
|
||||
line2=پيکربندي سيستم,11
|
||||
ssleay=مسير براي openssl يا برنامه ssleay,3,خودکار
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
line1=Options configurables,11
|
||||
display=Mode d'affichage des utilisateurs et des groupes,1,1-Noms seulement,0-Noms et modules
|
||||
select=Afficher les modules utilisateur par,1,0-Table,1-Menu déroulant
|
||||
order=Trier les utilisateurs et les groupes par,1,0-Ordre dans le fichier,1-Nom
|
||||
line2=Configuration du système,11
|
||||
ssleay=Chemin d'accès au programme openssl ou ssleay,3,Automatique
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
line1=Konfigurálható beállítások,11
|
||||
display=Felhasználó és csoport megjelenítési mód,1,1-Csak a neveket,0-Neveket és modulokat
|
||||
select=A modulok megjelenítsi módja,1,0-Táblázat,1-Menü
|
||||
order=Felhasználók és csoportok rendezése,1,0-A fájl rendezése szerint,1-Név szerint
|
||||
line2=Rendszer konfiguráció,11
|
||||
ssleay=Az <code>openssl</code> vagy <code>ssleay</code> program teljes elérési útja,0
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
line1=Opzioni configurabili,11
|
||||
display=Modalità di visualizzazione di utenti e gruppi,1,1-Solo i nomi,0-Nomi e moduli
|
||||
select=Mostra i moduli utente in,1,0-una tabella,1-un menu a tendina
|
||||
order=Ordina gli utenti e i gruppi per,1,0-Ordine nel file,1-Nome
|
||||
line2=Configurazione di sistema,11
|
||||
ssleay=Percorso al programma openssl o ssleay,3,Automatico
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
line1=設定可能なオプション,11
|
||||
display=ユーザとグループの表示モード,1,1-名前のみ,0-名前とモジュール
|
||||
select=ユーザモジュールの表示方法,1,0-表,1-プルダウンメニュー
|
||||
order=ユーザとグループのソート順,1,0-ファイル順,1-名前順
|
||||
line2=システム設定,11
|
||||
ssleay=opensslプログラムまたはssleayプログラムのパス,3,自動
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
line1=가능한 옵션,11
|
||||
display=유저와 그룹 출력 모드,1,1-이름만,0-이름과 모듈
|
||||
select=유저 모듈 출력,1,0-테이블,1-풀다운 메뉴
|
||||
order=유저와 그룹 정렬,1,0-파일 순,1-이름
|
||||
line2=시스템 설정,11
|
||||
ssleay=openssl 또는 ssleay 파일 경로,3,Automatic
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
line1=Pilihan konfigurasi,11
|
||||
display=Mod paparan pengguna dan grup,1,1-Nama sahaja,0-Nama dan modul
|
||||
select=Paparkan modul pengguna dalam,1,0-Jadual,1-Menu pull-down
|
||||
order=Tapis pengguna dan grup dengan,1,0-Urutan dalam fail,1-Nama
|
||||
line2=Konfigurasi sistem,11
|
||||
ssleay=Lokasi program openssl atau ssleay,3,Automatik
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
line1=Instelbare opties,11
|
||||
display=Gebruiker en groep weergave instelling,1,1-Alleen Namen,0-Namen en modules
|
||||
select=Geef gebruiker modules weer in,1,0-Tabel,1-Pulldown menu
|
||||
order=Sorteer gebruikers en groepen op,1,0-Volgorde in bestand,1-Naam
|
||||
line2=Systeem configuratie,11
|
||||
ssleay=Pad naar openssl of ssleay programma,3,Automatisch
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
line1=Konfigurerbare innstillinger,11
|
||||
display=Visningsmodus for bruker og gruppe,1,1-Bare navn,0-Navn og moduler
|
||||
select=Vis brukermoduler i,1,0-Tabell,1-Nedtrekksmeny
|
||||
order=Sorter brukere og grupper etter,1,0-Rekkefølge i filen,1-Navn
|
||||
line2=System konfigurasjon,11
|
||||
ssleay=Stien til openssl eller ssleay program,0
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
line1=Opcje konfiguracyjne,11
|
||||
display=Tryb wyświetlania użytkowników i grup,1,1-Tylko nazwy,0-Nazwy i moduły
|
||||
select=Wyświetl moduły użytkownika w,1,0-Tabeli,1-Rozwijanym menu
|
||||
order=Porządkuj użytkowników i grupy wg,1,0-Kolejności w zbiorze,1-Nazwy
|
||||
line2=Konfiguracja systemu,11
|
||||
ssleay=Ścieżka do programu openssl lub ssleay,0
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
line1=Opções configuráveis,11
|
||||
select=Exibir módulos de usuários em,1,0-Tabela,1-Menus
|
||||
order=Ordenar usuários e grupos por,1,0-Ordem no arquivo,1-Nome
|
||||
line2=Configuração do sistema,11
|
||||
ssleay=Caminho para o programa openssl ou ssleay,0
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
select=Показывать модули пользователя в виде,1,0-Таблицы,1-Выпадающего меню
|
||||
ssleay=Путь к программе openssl или ssleay,0
|
||||
order=Упорядочивать пользователей и группы по,1,0-Очередности в файле,1-Имени
|
||||
line1=Настраиваемые параметры,11
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
line1=Настраиваемые параметры,11
|
||||
display=Режим отображения пользователей и групп,1,1-Только имена,0-Имена и модули
|
||||
select=Показывать модули пользователя в виде,1,0-Таблицы,1-Выпадающего меню
|
||||
order=Упорядочивать пользователей и группы по,1,0-Очередности в файле,1-Имени
|
||||
line2=Системные параметры,11
|
||||
ssleay=Путь к программе openssl или ssleay,0
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
line1=Nastaviteľné možnosti,11
|
||||
display=Spôsob zobrazenia užívateľov a skupín,1,1-Iba mená,0-Mená a moduly
|
||||
select=Zobraz užívateľské moduly v ,1,0-Tabuľke,1-Rozbaľovacom menu
|
||||
order=Zoraď užívateľov a skupiny podľa,1,0-Poradia v súbore,1-Mena
|
||||
line2=Nastavenie Systému,11
|
||||
ssleay=Cesta k programu openssl alebo ssleay,3,Automatická
|
||||
|
||||
@@ -1,2 +1 @@
|
||||
ssleay=Sökväg till openssl- eller ssleay-program,0
|
||||
select=Visa moduler i,1,0-Tabell,1-Rullgardinsmeny
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
line1=Yapılandırılabilir seçenekler,11
|
||||
display=Kullanıcı ve grup görüntüleme biçimi,1,1-Sadece isim,0-İsim ve modüller
|
||||
select=Kullanıcı modüllerini bu şekilde görüntüle,1,0-Tablo,1-Menü
|
||||
order=Kullanıcı ve grupları bu şekilde sırala,1,0-Dosyadaki sırası ile,1-İsim ile
|
||||
line2=Sistem yapılandırması,11
|
||||
ssleay=Openssl ya da ssleay programı yolu,3,Otomatik
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
select=Показувати модулі користувача у виді,1,0-таблиці, що1-випадає меню
|
||||
ssleay=Шлях до програми openssl чи ssleay,0
|
||||
order=Упорядковувати користувачів і групи по,1,0-черговості у файлі,1-імені
|
||||
line1= параметри, ЩоНабудовуються,11
|
||||
|
||||
@@ -1,2 +1 @@
|
||||
ssleay=Openssl 或者 Ssleay 程序的路径,0
|
||||
select=显示用户模块以,1,0-Table,1-Pulldown 菜单
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
line1=組態選項,11
|
||||
select=顯示使用者模組在,1,0-表格,1-下拉選單
|
||||
order=排序使用者和全組 依,1,0-檔案內位置,1-名稱
|
||||
line2=系統組態,11
|
||||
ssleay=openssl或ssleay程式路徑,0
|
||||
|
||||
@@ -28,7 +28,8 @@ if ($in{'joingroup'}) {
|
||||
foreach my $user (@d) {
|
||||
my $uinfo = &get_user($user);
|
||||
next if (!$uinfo);
|
||||
next if (&indexof($user, @{$newgroup->{'members'}}) >= 0);
|
||||
next if ($newgroup &&
|
||||
&indexof($user, @{$newgroup->{'members'}}) >= 0);
|
||||
|
||||
# Remove from old group, if any
|
||||
my $oldgroup = &get_users_group($user);
|
||||
|
||||
@@ -73,11 +73,9 @@ else {
|
||||
# Show usernames and modules
|
||||
print &ui_subheading($text{'index_users'});
|
||||
my @rowlinks = ( );
|
||||
if (!$config{'select'}) {
|
||||
print &ui_form_start("delete_users.cgi", "post");
|
||||
push(@rowlinks, &select_all_link("d", $form),
|
||||
&select_invert_link("d", $form));
|
||||
}
|
||||
print &ui_form_start("delete_users.cgi", "post");
|
||||
push(@rowlinks, &select_all_link("d", $form),
|
||||
&select_invert_link("d", $form));
|
||||
push(@rowlinks, ui_link("edit_user.cgi", $text{'index_create'}))
|
||||
if ($access{'create'});
|
||||
print &ui_links_row(\@rowlinks);
|
||||
@@ -104,10 +102,8 @@ else {
|
||||
}
|
||||
print &ui_columns_end();
|
||||
print &ui_links_row(\@rowlinks);
|
||||
if (!$config{'select'}) {
|
||||
print &ui_form_end([ [ "delete", $text{'index_delete'} ],
|
||||
@gbut ]);
|
||||
}
|
||||
print &ui_form_end([ [ "delete", $text{'index_delete'} ],
|
||||
@gbut ]);
|
||||
$shown_users = 1;
|
||||
$form++;
|
||||
}
|
||||
@@ -136,11 +132,9 @@ if ($access{'groups'}) {
|
||||
else {
|
||||
# Show table of groups
|
||||
my @rowlinks = ( );
|
||||
if (!$config{'select'}) {
|
||||
print &ui_form_start("delete_groups.cgi", "post");
|
||||
push(@rowlinks, &select_all_link("d", $form),
|
||||
&select_invert_link("d", $form));
|
||||
}
|
||||
print &ui_form_start("delete_groups.cgi", "post");
|
||||
push(@rowlinks, &select_all_link("d", $form),
|
||||
&select_invert_link("d", $form));
|
||||
push(@rowlinks,
|
||||
ui_link("edit_group.cgi", $text{'index_gcreate'}));
|
||||
print &ui_links_row(\@rowlinks);
|
||||
@@ -168,9 +162,7 @@ if ($access{'groups'}) {
|
||||
}
|
||||
print &ui_columns_end();
|
||||
print &ui_links_row(\@rowlinks);
|
||||
if (!$config{'select'}) {
|
||||
print &ui_form_end([ [ "delete", $text{'index_delete'} ] ]);
|
||||
}
|
||||
print &ui_form_end([ [ "delete", $text{'index_delete'} ] ]);
|
||||
$form++;
|
||||
}
|
||||
}
|
||||
@@ -235,44 +227,22 @@ sub show_modules
|
||||
my ($type, $who, $mods, $global, $prefix) = @_;
|
||||
$mods ||= [ ];
|
||||
my $rv;
|
||||
if ($config{'select'}) {
|
||||
# Show as drop-down menu
|
||||
$rv .= &ui_form_start("edit_acl.cgi");
|
||||
$rv .= $prefix."<br>\n" if ($prefix);
|
||||
if (@$mods) {
|
||||
$rv .= &ui_hidden($type, $who);
|
||||
if ($access{'acl'}) {
|
||||
$rv .= &ui_submit($text{'index_edit'});
|
||||
$rv .= $prefix."<br>\n" if ($prefix);
|
||||
my @grid;
|
||||
foreach my $m (sort { $modname{$a} cmp $modname{$b} } @$mods) {
|
||||
if ($modname{$m}) {
|
||||
if ($mcan{$m} && $access{'acl'}) {
|
||||
push(@grid, ui_link("edit_acl.cgi?mod=" .
|
||||
&urlize($m)."&$type=".&urlize($who),
|
||||
$modname{$m}));
|
||||
}
|
||||
my @opts;
|
||||
foreach my $m (sort { $modname{$a} cmp $modname{$b} } @$mods) {
|
||||
if ($modname{$m}) {
|
||||
push(@opts, [ $m, $modname{$m} ]);
|
||||
}
|
||||
}
|
||||
$rv .= &ui_select("mod", undef, \@opts);
|
||||
}
|
||||
$rv .= &ui_form_end();
|
||||
}
|
||||
else {
|
||||
# Show as table
|
||||
$rv .= $prefix."<br>\n" if ($prefix);
|
||||
my @grid;
|
||||
foreach my $m (sort { $modname{$a} cmp $modname{$b} } @$mods) {
|
||||
if ($modname{$m}) {
|
||||
if ($mcan{$m} && $access{'acl'}) {
|
||||
push(@grid, ui_link("edit_acl.cgi?mod=" .
|
||||
&urlize($m)."&$type=".&urlize($who),
|
||||
$modname{$m}));
|
||||
}
|
||||
else {
|
||||
push(@grid, $modname{$m});
|
||||
}
|
||||
else {
|
||||
push(@grid, $modname{$m});
|
||||
}
|
||||
}
|
||||
$rv .= &ui_grid_table(\@grid, 3, 100,
|
||||
[ "width=33%", "width=33%", "width=33%" ]);
|
||||
}
|
||||
$rv .= &ui_grid_table(\@grid, 3, 100,
|
||||
[ "width=33%", "width=33%", "width=33%" ]);
|
||||
return $rv;
|
||||
}
|
||||
|
||||
@@ -298,7 +268,7 @@ sub user_link
|
||||
{
|
||||
my $lck = $_[0]->{'pass'} =~ /^\!/ ? 1 : 0;
|
||||
my $ro = $_[0]->{'readonly'};
|
||||
return ($config{'select'} ? "" : &ui_checkbox("d", $_[0]->{'name'}, "", 0)).
|
||||
return &ui_checkbox("d", $_[0]->{'name'}, "", 0).
|
||||
($lck ? "<i>" : "").
|
||||
($ro ? "<b>" : "").
|
||||
ui_link("$_[1]?$_[2]=".&urlize($_[0]->{'name'}),
|
||||
|
||||
14
acl/lang/de
14
acl/lang/de
@@ -59,7 +59,7 @@ cert_header=Details des neuen Zertifikats
|
||||
cert_install=Installiere Ihr Zertifikat in den Browser
|
||||
cert_issue=Zertifikat ausstellen
|
||||
cert_key=Schlüsselgröße
|
||||
cert_msg=Hier können Sie ein SSL-Client-Zertifikat zu beantragen, das Ihnen in Zukunft ohne Eingabe von Benutzername und Kennwort einen sicheren Zugriff auf Webmin gestattet. Da jedoch diese Authentifizierung automatisch geschieht ist es nicht möglich zu einem anderen Benutzer zu wechseln.
|
||||
cert_msg=Hier können Sie ein SSL-Client-Zertifikat zu beantragen, das Ihnen in Zukunft ohne Eingabe von Benutzername und Kennwort einen sicheren Zugriff auf Webmin gestattet. Da jedoch diese Authentifizierung automatisch geschieht, ist es nicht möglich zu einem anderen Benutzer zu wechseln.
|
||||
cert_o=Organisation
|
||||
cert_ou=Abteilung
|
||||
cert_pickup=<a href='$1'>Klicken Sie hier, um Ihr Zertifikat aufzunehmen und es in Ihrem Browser zu installieren.</a>
|
||||
@@ -137,7 +137,7 @@ edit_minsize=Minimale Passwortlänge
|
||||
edit_mods=Verfügbare Webminmodule
|
||||
edit_modsg=Verfügbare Webminmodule (zusätzlich zu Modulen der Gruppe)
|
||||
edit_modules=Module
|
||||
edit_nochange=Forciere Passwortänderungstage
|
||||
edit_nochange=Forciere Passwortänderungstage?
|
||||
edit_none=Keine
|
||||
edit_notabs=Module in Kategorien aufteilen?
|
||||
edit_overlay=Personal theme overlay
|
||||
@@ -156,7 +156,7 @@ edit_proto_postgresql=PostgreSQL Datenbank
|
||||
edit_rbacdeny=RBAC-Zugriffsmodus
|
||||
edit_rbacdeny0=RBAC kontrolliert nur ausgewählte Modul-ACLs
|
||||
edit_rbacdeny1=RBAC kontrolliert alle Module und ACLs
|
||||
edit_readonly=Dieser Webminbenutzer sollte über das $1 Modul bearbeitet werden. <a href='$2'>Klicken Sie hier</a>, um diese Warnung zu übergehen und um den Benutzer dennoch zu bearbeiten. Es kann jedoch sein, daß hier vorgenommene Änderungen durch das $1 Modul überschrieben werden.
|
||||
edit_readonly=Dieser Webminbenutzer sollte über das $1 Modul bearbeitet werden. <a href='$2'>Klicken Sie hier</a>, um diese Warnung zu übergehen und um den Benutzer dennoch zu bearbeiten. Es kann jedoch sein, dass hier vorgenommene Änderungen durch das $1 Modul überschrieben werden!
|
||||
edit_real=Echter Name
|
||||
edit_return=Webminbenutzer
|
||||
edit_return2=Webmingruppe
|
||||
@@ -188,7 +188,7 @@ edit_twofactorprov=Benutze Provider $1 mit ID $2
|
||||
edit_ui=Optionen des Benutzerinterfaces
|
||||
edit_unix=Unix-Authentifizierung
|
||||
edit_user=Benutzername
|
||||
gdelete_desc=Sind Sie sicher, daß Sie die Gruppe $1 und Benutzer $2 löschen wollen?
|
||||
gdelete_desc=Sind Sie sicher, dass Sie die Gruppe $1 und Benutzer $2 löschen wollen?
|
||||
gdelete_ecannot=Sie sind nicht berechtigt Gruppen zu löschen
|
||||
gdelete_err=Fehler beim Löschen einer Gruppe
|
||||
gdelete_esub=Gruppen, die Untergruppen enthalten, können nicht gelöscht werden
|
||||
@@ -197,7 +197,7 @@ gdelete_ok=Gruppe löschen
|
||||
gdelete_title=Gruppe löschen
|
||||
gdeletes_err=Konnte Gruppen nicht löschen
|
||||
gdeletes_ok=Gruppe löschen
|
||||
gdeletes_rusure=Sind Sie sicher, daß Sie die $1 ausgewählten Gruppen, inklusive der darin enthaltenen $2 Benutzer, löschen möchten? Sämtliche Benutzer- und zugehörige Sicherheitseinstellungen gehen definitiv und nicht wiederherstellbar verloren.
|
||||
gdeletes_rusure=Sind Sie sicher, dass Sie die $1 ausgewählten Gruppen, inklusive der darin enthaltenen $2 Benutzer, löschen möchten? Sämtliche Benutzer- und zugehörige Sicherheitseinstellungen gehen definitiv und nicht wiederherstellbar verloren.
|
||||
gdeletes_title=Gruppe löschen
|
||||
gdeletes_users=Ausgewählte Gruppen: $1
|
||||
gedit_desc=Gruppenbeschreibung
|
||||
@@ -216,7 +216,7 @@ gsave_enamewebmin=Der Gruppenname 'webmin' ist für interne Zwecke reservier
|
||||
gsave_err=Fehler beim Speichern der Gruppe
|
||||
hide_clone=(Klone $1)
|
||||
hide_desc=Das folgende Modul wird von der Zugriffskontrollliste für $1 entfernt, da die entsprechenden Server nicht auf Ihrem System installiert sind.
|
||||
hide_desc2=Bedenken Sie, daß dieses Modul nicht automatisch sichtbar wird, wenn der entsprechende Server nachträglich installiert wird. Sie müssen den Zugriff über dieses Modul erneut einrichten.
|
||||
hide_desc2=Bedenken Sie, dass dieses Modul nicht automatisch sichtbar wird, wenn der entsprechende Server nachträglich installiert wird. Sie müssen den Zugriff über dieses Modul erneut einrichten.
|
||||
hide_none=Nichts zu verbergen - $1 hat keinen Zugriff zu irgendeinem Modul dessen entsprechender Server nicht auf Ihrem System installiert ist.
|
||||
hide_ok=Verberge Module jetzt
|
||||
hide_title=Verberge nicht benutzte Module
|
||||
@@ -431,7 +431,7 @@ udeletes_ereadonly=Einer der ausgewählten Benutzer ist als nicht bearbeitba
|
||||
udeletes_err=Konnte Benutzer nicht löschen
|
||||
udeletes_jerr=Fehler beim Nutzer zu Gruppe hinzufügen
|
||||
udeletes_ok=Benutzer löschen
|
||||
udeletes_rusure=Sind Sie sicher, daß Sie die $1 ausgewählten Benutzer löschen möchten? Sämtliche Benutzer- und zugehörige Sicherheitseinstellungen gehen definitiv und nicht wiederherstellbar verloren.
|
||||
udeletes_rusure=Sind Sie sicher, dass Sie die $1 ausgewählten Benutzer löschen möchten? Sämtliche Benutzer- und zugehörige Sicherheitseinstellungen gehen definitiv und nicht wiederherstellbar verloren.
|
||||
udeletes_title=Benutzer löschen
|
||||
udeletes_users=Ausgewählte Benutzer: $1
|
||||
unix_all=Erlaube alle Unixbenutzer
|
||||
|
||||
11
acl/lang/no
11
acl/lang/no
@@ -271,6 +271,7 @@ log_switch=Byttet til Webmin bruker $1
|
||||
log_sync=Endret unix bruker-synkronisering
|
||||
log_twofactor=Meldte inn bruker $1 til to-faktor autentisering
|
||||
log_unix=Endret unix bruker-autentisering
|
||||
logins_title=Siste Webmin innlogginger
|
||||
make_done=.. ferdig
|
||||
make_err=Kunne ikke opprette bruker- og gruppe-tabeller
|
||||
make_exec=Utfører SQL $1 ..
|
||||
@@ -343,11 +344,17 @@ save_euser=Du har ikke tilgang til å editere denne brukeren
|
||||
schema_desc=Før Webmin kan bruke en LDAP tjener for lagring av brukere og grupper må den konfigureres til å bruke skjemaet nedenfor. Dette kan typeisk gjøres ved å lagre skjemadefinisjonen i tt>/etc/ldap/schema</tt> eller <tt>/etc/openldap/schema</tt> som <tt>webmin.schema</tt>, og så konfigurere tjeneren ti lå laste den skjemafilen.
|
||||
schema_download=Last ned skjema-fil : <a href=$1>$1</a>
|
||||
schema_title=Last ned LDAP skjema
|
||||
sessions_desc=Aktuelle Webmin sesjon logins er listet under. For å kansellere en eksisterende sesjon og tvinge brukeren til å logge inn igjen, klikk på brukerens sesjon ID.
|
||||
sessions_actions=Handlinger..
|
||||
sessions_host=IP adresse
|
||||
sessions_id=Sessions ID
|
||||
sessions_login=Logget in på
|
||||
sessions_in=Innlogget
|
||||
sessions_kill=Koble fra..
|
||||
sessions_login=Innlogget
|
||||
sessions_logouts=Vis også utloggede sesjoner..
|
||||
sessions_lview=Se logger..
|
||||
sessions_out=Logget ut
|
||||
sessions_state=Tilstand
|
||||
sessions_this=Denne innloggingen
|
||||
sessions_title=Aktuell Login Session
|
||||
sessions_user=Webmin bruker
|
||||
sql_addto0=Legg til nye brukere i databasen valgt ovenfor
|
||||
|
||||
@@ -31,7 +31,7 @@ print &ui_columns_start([ $text{'sessions_id'},
|
||||
], 100);
|
||||
foreach my $k (sort { my @a = split(/\s+/, $sessiondb{$a});
|
||||
my @b = split(/\s+/, $sessiondb{$b}); $b[1] <=> $a[1] }
|
||||
keys %sessiondb) {
|
||||
(grep { $sessiondb{$_} } keys %sessiondb)) {
|
||||
next if ($k =~ /^1111111/);
|
||||
my ($user, $ltime, $lip) = split(/\s+/, $sessiondb{$k});
|
||||
next if ($user =~ /^\!/ && !$in{'logouts'});
|
||||
|
||||
@@ -16,6 +16,7 @@ my %miniserv;
|
||||
my @logins;
|
||||
foreach my $k (keys %sessiondb) {
|
||||
next if ($k =~ /^1111111/);
|
||||
next if (!$sessiondb{$k});
|
||||
my ($user, $ltime, $lip) = split(/\s+/, $sessiondb{$k});
|
||||
next if ($user ne $remote_user && $user ne "!".$remote_user);
|
||||
push(@logins, [ $user, $ltime, $lip, $k ]);
|
||||
|
||||
@@ -1,24 +1,31 @@
|
||||
#!/usr/local/bin/perl
|
||||
# Start the Ajaxterm webserver on a random port, then print an iframe for
|
||||
# a URL that proxies to it
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
BEGIN { push(@INC, ".."); };
|
||||
use WebminCore;
|
||||
use Socket;
|
||||
our(%text, %config, %gconfig);
|
||||
our $module_root_directory;
|
||||
our $module_name;
|
||||
|
||||
&init_config();
|
||||
|
||||
&ui_print_header(undef, $text{'index_title'}, "", undef, 1, 1);
|
||||
|
||||
# Check for python
|
||||
$python = &has_command("python");
|
||||
my $python = &has_command("python");
|
||||
if (!$python) {
|
||||
&ui_print_endpage(&text('index_epython', "<tt>python</tt>"));
|
||||
}
|
||||
|
||||
# Pick a free port
|
||||
my %miniserv;
|
||||
&get_miniserv_config(\%miniserv);
|
||||
$port = $miniserv{'port'} + 1;
|
||||
$proto = getprotobyname('tcp');
|
||||
my $port = $miniserv{'port'} + 1;
|
||||
my $proto = getprotobyname('tcp');
|
||||
socket(TEST, PF_INET, SOCK_STREAM, $proto) ||
|
||||
&error("Socket failed : $!");
|
||||
setsockopt(TEST, SOL_SOCKET, SO_REUSEADDR, pack("l", 1));
|
||||
@@ -29,17 +36,17 @@ while(1) {
|
||||
close(TEST);
|
||||
|
||||
# Run the Ajaxterm webserver
|
||||
$pid = fork();
|
||||
my $pid = fork();
|
||||
if (!$pid) {
|
||||
chdir("$module_root_directory/ajaxterm");
|
||||
$logfile = $ENV{'WEBMIN_VAR'}.'/ajaxterm.log';
|
||||
untie(*STDIN); open(STDIN, "</dev/null");
|
||||
untie(*STDOUT); open(STDOUT, ">$logfile");
|
||||
untie(*STDERR); open(STDERR, ">$logfile");
|
||||
$shell = &has_command("bash") ||
|
||||
my $logfile = $ENV{'WEBMIN_VAR'}.'/ajaxterm.log';
|
||||
untie(*STDIN); open(STDIN, "<", "/dev/null");
|
||||
untie(*STDOUT); open(STDOUT, ">", $logfile);
|
||||
untie(*STDERR); open(STDERR, ">", $logfile);
|
||||
my $shell = &has_command("bash") ||
|
||||
&has_command("sh") || "/bin/sh";
|
||||
@uinfo = getpwnam("root");
|
||||
$home = $uinfo[7] || "/";
|
||||
my @uinfo = getpwnam("root");
|
||||
my $home = $uinfo[7] || "/";
|
||||
$shell = "$shell -c ".quotemeta("cd '$home' ; exec $shell");
|
||||
exec($python, "ajaxterm.py", "--port", $port, "--log",
|
||||
$config{'autologin'} ? ("--command", $shell) : ( ));
|
||||
@@ -47,7 +54,9 @@ if (!$pid) {
|
||||
}
|
||||
|
||||
# Wait for it to come up
|
||||
$try = 0;
|
||||
my $try = 0;
|
||||
no strict "subs"; # TEST2 is weird. I dunno how to make it lexical without breaking.
|
||||
no warnings;
|
||||
while(1) {
|
||||
my $err;
|
||||
&open_socket("localhost", $port, TEST2, \$err);
|
||||
@@ -59,6 +68,8 @@ while(1) {
|
||||
sleep(1);
|
||||
}
|
||||
close(TEST2);
|
||||
use strict "subs";
|
||||
use warnings;
|
||||
|
||||
# Show the iframe
|
||||
print "<center>\n";
|
||||
@@ -74,7 +85,7 @@ if (!fork()) {
|
||||
untie(*STDIN); close(STDIN);
|
||||
untie(*STDOUT); close(STDOUT);
|
||||
untie(*STDERR); close(STDERR);
|
||||
$statfile = "$ENV{'WEBMIN_VAR'}/ajaxterm/$port";
|
||||
my $statfile = "$ENV{'WEBMIN_VAR'}/ajaxterm/$port";
|
||||
while(1) {
|
||||
my @st = stat($statfile);
|
||||
if (@st && time() - $st[9] > $config{'timeout'}) {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#!/usr/local/bin/perl
|
||||
# Proxy an Ajaxterm request to the real port
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
BEGIN { push(@INC, ".."); };
|
||||
use WebminCore;
|
||||
@@ -11,29 +13,33 @@ use WebminCore;
|
||||
# Parse out port
|
||||
$ENV{'PATH_INFO'} =~ /^\/(\d+)(.*)$/ ||
|
||||
&error("Missing or invalid PATH_INFO");
|
||||
$port = $1;
|
||||
$path = $2;
|
||||
my $port = $1;
|
||||
my $path = $2;
|
||||
$| = 1;
|
||||
$meth = $ENV{'REQUEST_METHOD'};
|
||||
my $meth = $ENV{'REQUEST_METHOD'};
|
||||
|
||||
# Connect to the Ajaxterm server, send HTTP request
|
||||
$con = &make_http_connection("localhost", $port, 0, $meth, $path);
|
||||
my $con = &make_http_connection("localhost", $port, 0, $meth, $path);
|
||||
&error($con) if (!ref($con));
|
||||
&write_http_connection($con, "Host: localhost\r\n");
|
||||
&write_http_connection($con, "User-agent: Webmin\r\n");
|
||||
$cl = $ENV{'CONTENT_LENGTH'};
|
||||
my $cl = $ENV{'CONTENT_LENGTH'};
|
||||
&write_http_connection($con, "Content-length: $cl\r\n") if ($cl);
|
||||
&write_http_connection($con, "Content-type: $ENV{'CONTENT_TYPE'}\r\n")
|
||||
if ($ENV{'CONTENT_TYPE'});
|
||||
&write_http_connection($con, "\r\n");
|
||||
my $post;
|
||||
if ($cl) {
|
||||
&read_fully(STDIN, \$post, $cl);
|
||||
&read_fully(\*STDIN, \$post, $cl);
|
||||
&write_http_connection($con, $post);
|
||||
}
|
||||
|
||||
# read back the headers
|
||||
$dummy = &read_http_connection($con);
|
||||
my $dummy = &read_http_connection($con);
|
||||
my %header;
|
||||
my $headers;
|
||||
while(1) {
|
||||
my $headline;
|
||||
($headline = &read_http_connection($con)) =~ s/\r|\n//g;
|
||||
last if (!$headline);
|
||||
$headline =~ /^(\S+):\s+(.*)$/ || &error("Bad header");
|
||||
@@ -43,16 +49,17 @@ while(1) {
|
||||
print $headers,"\n";
|
||||
|
||||
# read back contents
|
||||
while($buf = &read_http_connection($con, 1024)) {
|
||||
while(my $buf = &read_http_connection($con, 1024)) {
|
||||
print $buf;
|
||||
}
|
||||
&close_http_connection($con);
|
||||
|
||||
# Touch status file to indicate it is still running
|
||||
$statusdir = $ENV{'WEBMIN_VAR'}."/ajaxterm";
|
||||
my $statusdir = $ENV{'WEBMIN_VAR'}."/ajaxterm";
|
||||
if (!-d $statusdir) {
|
||||
&make_dir($statusdir, 0700);
|
||||
}
|
||||
&open_tempfile(TOUCH, ">$statusdir/$port", 0, 1);
|
||||
&close_tempfile(TOUCH);
|
||||
my $TOUCH;
|
||||
&open_tempfile($TOUCH, ">$statusdir/$port", 0, 1);
|
||||
&close_tempfile($TOUCH);
|
||||
|
||||
|
||||
@@ -676,8 +676,8 @@ elsif (!$olddir && $newdir) {
|
||||
# Update the line numbers and filenames in a list of directives
|
||||
sub recursive_set_lines_files
|
||||
{
|
||||
local ($dirs, $line, $file) = @_;
|
||||
foreach my $d (@$dirs) {
|
||||
my ($dirs, $line, $file) = @_;
|
||||
foreach my $dir (@$dirs) {
|
||||
$dir->{'line'} = $line;
|
||||
$dir->{'file'} = $file;
|
||||
if ($dir->{'type'}) {
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
use strict;
|
||||
use warnings;
|
||||
our (%text, %in);
|
||||
|
||||
require 'at-lib.pl';
|
||||
|
||||
|
||||
31
at/at-lib.pl
31
at/at-lib.pl
@@ -1,10 +1,14 @@
|
||||
# at-lib.pl
|
||||
# Functions for listing and creating at jobs
|
||||
use strict;
|
||||
use warnings;
|
||||
our (%text, %config);
|
||||
our $remote_user;
|
||||
|
||||
BEGIN { push(@INC, ".."); };
|
||||
use WebminCore;
|
||||
&init_config();
|
||||
%access = &get_module_acl();
|
||||
our %access = &get_module_acl();
|
||||
|
||||
do "$config{'at_style'}-lib.pl";
|
||||
|
||||
@@ -13,9 +17,9 @@ do "$config{'at_style'}-lib.pl";
|
||||
# the given width
|
||||
sub wrap_lines
|
||||
{
|
||||
local @rv;
|
||||
local $w = $_[1];
|
||||
foreach $rest (split(/\n/, $_[0])) {
|
||||
my @rv;
|
||||
my $w = $_[1];
|
||||
foreach my $rest (split(/\n/, $_[0])) {
|
||||
if ($rest =~ /\S/) {
|
||||
while(length($rest) > $w) {
|
||||
push(@rv, substr($rest, 0, $w));
|
||||
@@ -34,7 +38,7 @@ return @rv;
|
||||
# can_edit_user(&access, user)
|
||||
sub can_edit_user
|
||||
{
|
||||
local %umap;
|
||||
my %umap;
|
||||
map { $umap{$_}++; } split(/\s+/, $_[0]->{'users'});
|
||||
if ($_[0]->{'mode'} == 1 && !$umap{$_[1]} ||
|
||||
$_[0]->{'mode'} == 2 && $umap{$_[1]}) { return 0; }
|
||||
@@ -50,13 +54,16 @@ else {
|
||||
# Returns a list of all users in the cron allow file
|
||||
sub list_allowed
|
||||
{
|
||||
local(@rv, $_);
|
||||
local $_;
|
||||
my @rv;
|
||||
no strict "subs";
|
||||
&open_readfile(ALLOW, $config{allow_file});
|
||||
while(<ALLOW>) {
|
||||
next if (/^\s*#/);
|
||||
chop; push(@rv, $_) if (/\S/);
|
||||
}
|
||||
close(ALLOW);
|
||||
use strict "subs";
|
||||
return @rv;
|
||||
}
|
||||
|
||||
@@ -65,13 +72,16 @@ return @rv;
|
||||
# Return a list of users from the cron deny file
|
||||
sub list_denied
|
||||
{
|
||||
local(@rv, $_);
|
||||
local $_;
|
||||
my @rv;
|
||||
no strict "subs";
|
||||
&open_readfile(DENY, $config{deny_file});
|
||||
while(<DENY>) {
|
||||
next if (/^\s*#/);
|
||||
chop; push(@rv, $_) if (/\S/);
|
||||
}
|
||||
close(DENY);
|
||||
use strict "subs";
|
||||
return @rv;
|
||||
}
|
||||
|
||||
@@ -83,11 +93,13 @@ sub save_allowed
|
||||
&lock_file($config{allow_file});
|
||||
if (@_) {
|
||||
local($_);
|
||||
no strict "subs";
|
||||
&open_tempfile(ALLOW, ">$config{allow_file}");
|
||||
foreach my $u (@_) {
|
||||
&print_tempfile(ALLOW, $u,"\n");
|
||||
}
|
||||
&close_tempfile(ALLOW);
|
||||
use strict "subs";
|
||||
chmod(0444, $config{allow_file});
|
||||
}
|
||||
else {
|
||||
@@ -103,11 +115,13 @@ sub save_denied
|
||||
{
|
||||
&lock_file($config{deny_file});
|
||||
if (@_ || !-r $config{'allow_file'}) {
|
||||
no strict "subs";
|
||||
&open_tempfile(DENY, ">$config{deny_file}");
|
||||
foreach my $u (@_) {
|
||||
&print_tempfile(DENY, $u,"\n");
|
||||
}
|
||||
&close_tempfile(DENY);
|
||||
use strict "subs";
|
||||
chmod(0444, $config{deny_file});
|
||||
}
|
||||
else {
|
||||
@@ -121,7 +135,8 @@ else {
|
||||
# any deny files.
|
||||
sub can_use_at
|
||||
{
|
||||
local ($user) = @_;
|
||||
my ($user) = @_;
|
||||
my (@allow, @deny, @denied);
|
||||
if (!$config{'allow_file'}) {
|
||||
return 1; # not supported by OS
|
||||
}
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
use strict;
|
||||
use warnings;
|
||||
our %config;
|
||||
|
||||
do 'at-lib.pl';
|
||||
|
||||
@@ -5,9 +8,9 @@ do 'at-lib.pl';
|
||||
# Returns files and directories that can be backed up
|
||||
sub backup_config_files
|
||||
{
|
||||
local @rv;
|
||||
opendir(DIR, $config{'at_dir'});
|
||||
while($f = readdir(DIR)) {
|
||||
my @rv;
|
||||
opendir(my $DIR, $config{'at_dir'});
|
||||
while(my $f = readdir($DIR)) {
|
||||
next if ($f eq "." || $f eq ".." || $f eq ".SEQ");
|
||||
if (!-d "$config{'at_dir'}/$f") {
|
||||
push(@rv, "$config{'at_dir'}/$f");
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
use strict;
|
||||
use warnings;
|
||||
our %access;
|
||||
|
||||
do 'at-lib.pl';
|
||||
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
#!/usr/local/bin/perl
|
||||
# create_job.cgi
|
||||
# Create a new at job
|
||||
use strict;
|
||||
use warnings;
|
||||
our (%access, %text, %in);
|
||||
|
||||
require './at-lib.pl';
|
||||
use Time::Local;
|
||||
@@ -14,6 +17,7 @@ defined(getpwnam($in{'user'})) || &error($text{'create_euser'});
|
||||
$in{'hour'} =~ /^\d+$/ && $in{'min'} =~ /^\d+$/ &&
|
||||
$in{'day'} =~ /^\d+$/ && $in{'year'} =~ /^\d+$/ ||
|
||||
&error($text{'create_edate'});
|
||||
my $date;
|
||||
eval { $date = timelocal(0, $in{'min'}, $in{'hour'},
|
||||
$in{'day'}, $in{'month'}, $in{'year'}-1900) };
|
||||
$@ && &error($text{'create_edate'});
|
||||
|
||||
@@ -1,12 +1,15 @@
|
||||
#!/usr/local/bin/perl
|
||||
# Delete or run an at job
|
||||
use strict;
|
||||
use warnings;
|
||||
our (%text, %in);
|
||||
|
||||
require './at-lib.pl';
|
||||
&ReadParse();
|
||||
&foreign_require("proc", "proc-lib.pl");
|
||||
|
||||
@jobs = &list_atjobs();
|
||||
($job) = grep { $_->{'id'} eq $in{'id'} } @jobs;
|
||||
my @jobs = &list_atjobs();
|
||||
my ($job) = grep { $_->{'id'} eq $in{'id'} } @jobs;
|
||||
$job || &error($text{'delete_egone'});
|
||||
|
||||
if ($in{'run'}) {
|
||||
@@ -14,19 +17,20 @@ if ($in{'run'}) {
|
||||
&ui_print_header(undef, $text{'run_title'}, "");
|
||||
|
||||
# Create temp script for job
|
||||
$temp = &transname();
|
||||
&open_tempfile(TEMP, ">$temp");
|
||||
&print_tempfile(TEMP, $job->{'cmd'});
|
||||
&close_tempfile(TEMP);
|
||||
my $temp = &transname();
|
||||
my $TEMP;
|
||||
&open_tempfile($TEMP, ">$temp");
|
||||
&print_tempfile($TEMP, $job->{'cmd'});
|
||||
&close_tempfile($TEMP);
|
||||
chmod(0755, $temp);
|
||||
|
||||
print "<p>\n";
|
||||
print &text('run_output'),"<p>\n";
|
||||
@uinfo = getpwnam($job->{'user'});
|
||||
my @uinfo = getpwnam($job->{'user'});
|
||||
print "<pre>";
|
||||
&additional_log('exec', undef, $job->{'cmd'});
|
||||
$got = &proc::safe_process_exec($temp, $uinfo[2], $uinfo[3],
|
||||
STDOUT, undef, 1);
|
||||
my $got = &proc::safe_process_exec($temp, $uinfo[2], $uinfo[3],
|
||||
*STDOUT, undef, 1);
|
||||
if (!$got) { print "<i>$text{'run_none'}</i>\n"; }
|
||||
unlink($temp);
|
||||
print "</pre>\n";
|
||||
@@ -37,7 +41,7 @@ if ($in{'run'}) {
|
||||
else {
|
||||
# Just delete the at job
|
||||
&error_setup($text{'delete_err'});
|
||||
%access = &get_module_acl();
|
||||
my %access = &get_module_acl();
|
||||
&can_edit_user(\%access, $job->{'user'}) || &error($text{'edit_ecannot'});
|
||||
&delete_atjob($in{'id'});
|
||||
&webmin_log("delete", "job", $job->{'user'}, $job);
|
||||
|
||||
@@ -1,16 +1,19 @@
|
||||
#!/usr/local/bin/perl
|
||||
# Delete multiple at jobs
|
||||
use strict;
|
||||
use warnings;
|
||||
our(%access, %text, %in);
|
||||
|
||||
require './at-lib.pl';
|
||||
&ReadParse();
|
||||
&error_setup($text{'deletes_err'});
|
||||
@d = split(/\0/, $in{'d'});
|
||||
my @d = split(/\0/, $in{'d'});
|
||||
@d || &error($text{'deletes_enone'});
|
||||
|
||||
# Delete each one
|
||||
@jobs = &list_atjobs();
|
||||
foreach $d (@d) {
|
||||
($job) = grep { $_->{'id'} eq $d } @jobs;
|
||||
my @jobs = &list_atjobs();
|
||||
foreach my $d (@d) {
|
||||
my ($job) = grep { $_->{'id'} eq $d } @jobs;
|
||||
$job || &error($text{'delete_egone'});
|
||||
&can_edit_user(\%access, $job->{'user'}) ||
|
||||
&error($text{'edit_ecannot'});
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
#!/usr/local/bin/perl
|
||||
# edit_job.cgi
|
||||
# Display a command for deletion
|
||||
use strict;
|
||||
use warnings;
|
||||
our (%access, %text, %in);
|
||||
|
||||
require './at-lib.pl';
|
||||
&ReadParse();
|
||||
@jobs = &list_atjobs();
|
||||
($job) = grep { $_->{'id'} eq $in{'id'} } @jobs;
|
||||
my @jobs = &list_atjobs();
|
||||
my ($job) = grep { $_->{'id'} eq $in{'id'} } @jobs;
|
||||
$job || &error($text{'edit_ejob'});
|
||||
&can_edit_user(\%access, $job->{'user'}) || &error($text{'edit_ecannot'});
|
||||
|
||||
@@ -16,7 +19,7 @@ print &ui_hidden("id", $in{'id'});
|
||||
print &ui_table_start($text{'edit_header'}, "width=100%", 4);
|
||||
|
||||
# Run as user
|
||||
@uinfo = getpwnam($job->{'user'});
|
||||
my @uinfo = getpwnam($job->{'user'});
|
||||
$uinfo[6] =~ s/,.*$//g;
|
||||
print &ui_table_row($text{'index_user'},
|
||||
&html_escape($job->{'user'}).
|
||||
|
||||
@@ -1,47 +1,52 @@
|
||||
# freebsd-lib.pl
|
||||
use strict;
|
||||
use warnings;
|
||||
our (%config);
|
||||
|
||||
sub list_atjobs
|
||||
{
|
||||
local @rv;
|
||||
opendir(DIR, $config{'at_dir'});
|
||||
while($f = readdir(DIR)) {
|
||||
local $p = "$config{'at_dir'}/$f";
|
||||
my @rv;
|
||||
opendir(my $DIR, $config{'at_dir'});
|
||||
while(my $f = readdir($DIR)) {
|
||||
my $p = "$config{'at_dir'}/$f";
|
||||
if ($f =~ /^c(\S{5})(\S+)$/) {
|
||||
local @st = stat($p);
|
||||
local $job = { 'id' => hex($1),
|
||||
my @st = stat($p);
|
||||
my $job = { 'id' => hex($1),
|
||||
'date' => hex($2) * 60,
|
||||
'user' => scalar(getpwuid($st[4])),
|
||||
'created' => $st[9] };
|
||||
open(FILE, $p);
|
||||
while(<FILE>) {
|
||||
open(my $FILE, $p);
|
||||
while(<$FILE>) {
|
||||
$job->{'cmd'} .= $_;
|
||||
}
|
||||
close(FILE);
|
||||
close($FILE);
|
||||
$job->{'realcmd'} = $job->{'cmd'};
|
||||
$job->{'realcmd'} =~ s/^[\000-\177]+cd\s+(\S+)\s+\|\|\s+{\n.*\n.*\n.*\n//;
|
||||
push(@rv, $job);
|
||||
}
|
||||
}
|
||||
closedir(DIR);
|
||||
closedir($DIR);
|
||||
return @rv;
|
||||
}
|
||||
|
||||
# create_atjob(user, time, commands, directory, send-mail)
|
||||
sub create_atjob
|
||||
{
|
||||
local @tm = localtime($_[1]);
|
||||
local $date = sprintf "%2.2d:%2.2d %d.%d.%d",
|
||||
my @tm = localtime($_[1]);
|
||||
my $date = sprintf "%2.2d:%2.2d %d.%d.%d",
|
||||
$tm[2], $tm[1], $tm[3], $tm[4]+1, $tm[5]+1900;
|
||||
local $mailflag = $_[4] ? "-m" : "";
|
||||
local $cmd = "cd ".quotemeta($_[3])." ; at $mailflag $date";
|
||||
local @uinfo = getpwnam($_[0]);
|
||||
my $mailflag = $_[4] ? "-m" : "";
|
||||
my $cmd = "cd ".quotemeta($_[3])." ; at $mailflag $date";
|
||||
my @uinfo = getpwnam($_[0]);
|
||||
if ($uinfo[2] != $<) {
|
||||
# Only SU if we are not already the user
|
||||
$cmd = &command_as_user($_[0], 0, $cmd);
|
||||
}
|
||||
no strict "subs";
|
||||
&open_execute_command(AT, "$cmd >/dev/null 2>&1", 0);
|
||||
print AT $_[2];
|
||||
close(AT);
|
||||
use strict "subs";
|
||||
&additional_log('exec', undef, "su \"$_[0]\" -c \"cd $_[3] ; at $date\"");
|
||||
}
|
||||
|
||||
|
||||
31
at/index.cgi
31
at/index.cgi
@@ -5,6 +5,10 @@
|
||||
# F&AS : default parameters can be set
|
||||
# ext_user : default user
|
||||
# ext_cmd : default command
|
||||
use strict;
|
||||
use warnings;
|
||||
our (%access, %text, %in, %config);
|
||||
our ($module_name, $remote_user);
|
||||
|
||||
require './at-lib.pl';
|
||||
use POSIX;
|
||||
@@ -18,13 +22,13 @@ if (!&has_command("at")) {
|
||||
}
|
||||
|
||||
# Show list of existing jobs
|
||||
@jobs = &list_atjobs();
|
||||
my @jobs = &list_atjobs();
|
||||
@jobs = grep { &can_edit_user(\%access, $_->{'user'}) } @jobs;
|
||||
if (@jobs) {
|
||||
print &ui_form_start("delete_jobs.cgi", "post");
|
||||
@jobs = sort { $a->{'id'} <=> $b->{'id'} } @jobs;
|
||||
@tds = ( "width=5", "nowrap" );
|
||||
@links = ( &select_all_link("d"), &select_invert_link("d") );
|
||||
my @tds = ( "width=5", "nowrap" );
|
||||
my @links = ( &select_all_link("d"), &select_invert_link("d") );
|
||||
print &ui_links_row(\@links);
|
||||
print &ui_columns_start([
|
||||
"",
|
||||
@@ -33,13 +37,13 @@ if (@jobs) {
|
||||
$text{'index_exec'},
|
||||
$text{'index_created'},
|
||||
$text{'index_cmd'} ], 100, 0, \@tds);
|
||||
foreach $j (@jobs) {
|
||||
local @cols;
|
||||
foreach my $j (@jobs) {
|
||||
my @cols;
|
||||
push(@cols, &ui_link("edit_job.cgi?id=".$j->{'id'}, $j->{'id'}) );
|
||||
push(@cols, &html_escape($j->{'user'}));
|
||||
$date = localtime($j->{'date'});
|
||||
my $date = localtime($j->{'date'});
|
||||
push(@cols, "<tt>$date</tt>");
|
||||
$created = localtime($j->{'created'});
|
||||
my $created = localtime($j->{'created'});
|
||||
push(@cols, "<tt>$created</tt>");
|
||||
push(@cols, join("<br>", split(/\n/,
|
||||
&html_escape($j->{'realcmd'}))));
|
||||
@@ -57,7 +61,8 @@ print &ui_form_start("create_job.cgi");
|
||||
print &ui_table_start($text{'index_header'}, undef, 2);
|
||||
|
||||
# User to run as
|
||||
$dir = "/";
|
||||
my $dir = "/";
|
||||
my ($user, $usel);
|
||||
if ($access{'mode'} == 1) {
|
||||
$usel = &ui_select("user", undef,
|
||||
[ split(/\s+/, $access{'users'}) ]);
|
||||
@@ -65,7 +70,7 @@ if ($access{'mode'} == 1) {
|
||||
elsif ($access{'mode'} == 3) {
|
||||
$usel = "<tt>$remote_user</tt>";
|
||||
print &ui_hidden("user", $remote_user);
|
||||
@uinfo = getpwnam($remote_user);
|
||||
my @uinfo = getpwnam($remote_user);
|
||||
$dir = $uinfo[7];
|
||||
}
|
||||
else {
|
||||
@@ -74,7 +79,7 @@ else {
|
||||
print &ui_table_row($text{'index_user'}, $usel, undef, ["valign=middle","valign=middle"]);
|
||||
|
||||
# Run date
|
||||
@now = localtime(time());
|
||||
my @now = localtime(time());
|
||||
print &ui_table_row($text{'index_date'},
|
||||
&ui_textbox("day", $now[3], 2)."/".
|
||||
&ui_select("month", $now[4],
|
||||
@@ -87,7 +92,7 @@ print &ui_table_row($text{'index_time'},
|
||||
&ui_textbox("hour", undef, 2).":".&ui_textbox("min", "00", 2), undef, ["valign=middle","valign=middle"]);
|
||||
|
||||
# Current date and time
|
||||
($date, $time) = split(/\s+/, &make_date(time()));
|
||||
my ($date, $time) = split(/\s+/, &make_date(time()));
|
||||
print &ui_table_row($text{'index_cdate'}, $date, undef, ["valign=middle","valign=middle"]);
|
||||
print &ui_table_row($text{'index_ctime'}, $time, undef, ["valign=middle","valign=middle"]);
|
||||
|
||||
@@ -108,8 +113,8 @@ print &ui_form_end([ [ undef, $text{'create'} ] ]);
|
||||
|
||||
if ($access{'allow'} && $config{'allow_file'}) {
|
||||
# Show form to manage allowed and denied users
|
||||
@allow = &list_allowed();
|
||||
@deny = &list_denied();
|
||||
my @allow = &list_allowed();
|
||||
my @deny = &list_denied();
|
||||
print &ui_hr();
|
||||
print &ui_form_start("save_allow.cgi", "post");
|
||||
print &ui_table_start($text{'index_allow'}, undef, 2);
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
# install_check.pl
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
do 'at-lib.pl';
|
||||
|
||||
|
||||
@@ -1,48 +1,53 @@
|
||||
# linux-lib.pl
|
||||
use strict;
|
||||
use warnings;
|
||||
our (%config);
|
||||
|
||||
sub list_atjobs
|
||||
{
|
||||
local @rv;
|
||||
opendir(DIR, $config{'at_dir'});
|
||||
while($f = readdir(DIR)) {
|
||||
local $p = "$config{'at_dir'}/$f";
|
||||
my @rv;
|
||||
opendir(my $DIR, $config{'at_dir'});
|
||||
while(my $f = readdir($DIR)) {
|
||||
my $p = "$config{'at_dir'}/$f";
|
||||
if ($f =~ /^a(\S{5})(\S+)$/) {
|
||||
local @st = stat($p);
|
||||
local $job = { 'id' => hex($1),
|
||||
my @st = stat($p);
|
||||
my $job = { 'id' => hex($1),
|
||||
'date' => hex($2) * 60,
|
||||
'user' => scalar(getpwuid($st[4])),
|
||||
'created' => $st[9] };
|
||||
open(FILE, $p);
|
||||
while(<FILE>) {
|
||||
open(my $FILE, "<", $p);
|
||||
while(<$FILE>) {
|
||||
$job->{'cmd'} .= $_;
|
||||
}
|
||||
close(FILE);
|
||||
close($FILE);
|
||||
$job->{'realcmd'} = $job->{'cmd'};
|
||||
$job->{'realcmd'} =~ s/^[\000-\177]+cd\s+(\S+)\s+\|\|\s+{\n.*\n.*\n.*\n//;
|
||||
$job->{'realcmd'} =~ s/\$\{SHELL:.*\n\n?//;
|
||||
push(@rv, $job);
|
||||
}
|
||||
}
|
||||
closedir(DIR);
|
||||
closedir($DIR);
|
||||
return @rv;
|
||||
}
|
||||
|
||||
# create_atjob(user, time, commands, directory, send-email)
|
||||
sub create_atjob
|
||||
{
|
||||
local @tm = localtime($_[1]);
|
||||
local $date = sprintf "%2.2d:%2.2d %d.%d.%d",
|
||||
my @tm = localtime($_[1]);
|
||||
my $date = sprintf "%2.2d:%2.2d %d.%d.%d",
|
||||
$tm[2], $tm[1], $tm[3], $tm[4]+1, $tm[5]+1900;
|
||||
local $mailflag = $_[4] ? "-m" : "";
|
||||
local $cmd = "cd ".quotemeta($_[3])." ; at $mailflag $date";
|
||||
local @uinfo = getpwnam($_[0]);
|
||||
my $mailflag = $_[4] ? "-m" : "";
|
||||
my $cmd = "cd ".quotemeta($_[3])." ; at $mailflag $date";
|
||||
my @uinfo = getpwnam($_[0]);
|
||||
if ($uinfo[2] != $<) {
|
||||
# Only SU if we are not already the user
|
||||
$cmd = &command_as_user($_[0], 0, $cmd);
|
||||
}
|
||||
no strict "subs";
|
||||
&open_execute_command(AT, "$cmd >/dev/null 2>&1", 0);
|
||||
print AT $_[2];
|
||||
close(AT);
|
||||
use strict "subs";
|
||||
&additional_log('exec', undef, $cmd);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
# log_parser.pl
|
||||
# Functions for parsing this module's logs
|
||||
use strict;
|
||||
use warnings;
|
||||
our %text;
|
||||
|
||||
do 'at-lib.pl';
|
||||
|
||||
@@ -7,7 +10,7 @@ do 'at-lib.pl';
|
||||
# Converts logged information from this module into human-readable form
|
||||
sub parse_webmin_log
|
||||
{
|
||||
local ($user, $script, $action, $type, $object, $p, $long) = @_;
|
||||
my ($user, $script, $action, $type, $object, $p, $long) = @_;
|
||||
if ($type eq "job") {
|
||||
return &text('log_'.$action.'_job',
|
||||
"<tt>".&html_escape($object)."</tt>");
|
||||
|
||||
@@ -1,41 +1,46 @@
|
||||
# macos-lib.pl
|
||||
use strict;
|
||||
use warnings;
|
||||
our %config;
|
||||
|
||||
sub list_atjobs
|
||||
{
|
||||
local @rv;
|
||||
opendir(DIR, $config{'at_dir'});
|
||||
while($f = readdir(DIR)) {
|
||||
local $p = "$config{'at_dir'}/$f";
|
||||
my @rv;
|
||||
opendir(my $DIR, $config{'at_dir'});
|
||||
while(my $f = readdir($DIR)) {
|
||||
my $p = "$config{'at_dir'}/$f";
|
||||
if ($f =~ /^a(\S+)\.(\d+)$/) {
|
||||
local @st = stat($p);
|
||||
local $job = { 'id' => $f,
|
||||
my @st = stat($p);
|
||||
my $job = { 'id' => $f,
|
||||
'date' => hex($1)*60,
|
||||
'user' => scalar(getpwuid($st[4])),
|
||||
'created' => $st[9] };
|
||||
open(FILE, $p);
|
||||
while(<FILE>) {
|
||||
open(my $FILE, "<", $p);
|
||||
while(<$FILE>) {
|
||||
$job->{'cmd'} .= $_;
|
||||
}
|
||||
close(FILE);
|
||||
close($FILE);
|
||||
$job->{'realcmd'} = $job->{'cmd'};
|
||||
$job->{'realcmd'} =~ s/^[\000-\177]+cd\s+(\S+)\n//;
|
||||
push(@rv, $job);
|
||||
}
|
||||
}
|
||||
closedir(DIR);
|
||||
closedir($DIR);
|
||||
return @rv;
|
||||
}
|
||||
|
||||
# create_atjob(user, time, commands, directory, send-email)
|
||||
sub create_atjob
|
||||
{
|
||||
local @tm = localtime($_[1]);
|
||||
local $date = sprintf "%2.2d:%2.2d %d.%d.%d",
|
||||
my @tm = localtime($_[1]);
|
||||
my $date = sprintf "%2.2d:%2.2d %d.%d.%d",
|
||||
$tm[2], $tm[1], $tm[3], $tm[4]+1, $tm[5]+1900;
|
||||
local $mailflag = $_[4] ? "-m" : "";
|
||||
my $mailflag = $_[4] ? "-m" : "";
|
||||
no strict "subs";
|
||||
&open_execute_command(AT, "su \"$_[0]\" -c \"cd $_[3] ; at $mailflag $date\" >/dev/null 2>&1", 0);
|
||||
print AT $_[2];
|
||||
close(AT);
|
||||
use strict "subs";
|
||||
&additional_log('exec', undef, "su \"$_[0]\" -c \"cd $_[3] ; at $mailflag $date\"");
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
#!/usr/local/bin/perl
|
||||
# Update allowed or denied At users
|
||||
use strict;
|
||||
use warnings;
|
||||
our (%access, %text, %in);
|
||||
|
||||
require './at-lib.pl';
|
||||
ReadParse();
|
||||
@@ -11,13 +14,13 @@ if ($in{'amode'} == 0) {
|
||||
&save_denied();
|
||||
}
|
||||
elsif ($in{'amode'} == 1) {
|
||||
@users = split(/\s+/, $in{'ausers'});
|
||||
my @users = split(/\s+/, $in{'ausers'});
|
||||
@users || &error($text{'allow_eusers'});
|
||||
&save_allowed(@users);
|
||||
&save_denied();
|
||||
}
|
||||
elsif ($in{'amode'} == 2) {
|
||||
@users = split(/\s+/, $in{'ausers'});
|
||||
my @users = split(/\s+/, $in{'ausers'});
|
||||
@users || &error($text{'allow_eusers'});
|
||||
&save_allowed();
|
||||
&save_denied(@users);
|
||||
|
||||
@@ -1,49 +1,54 @@
|
||||
# solaris-lib.pl
|
||||
use strict;
|
||||
use warnings;
|
||||
our %config;
|
||||
|
||||
use POSIX;
|
||||
|
||||
sub list_atjobs
|
||||
{
|
||||
local @rv;
|
||||
opendir(DIR, $config{'at_dir'});
|
||||
while($f = readdir(DIR)) {
|
||||
local $p = "$config{'at_dir'}/$f";
|
||||
my @rv;
|
||||
opendir(my $DIR, $config{'at_dir'});
|
||||
while(my $f = readdir($DIR)) {
|
||||
my $p = "$config{'at_dir'}/$f";
|
||||
if ($f =~ /^(\d+)\.a$/) {
|
||||
local @st = stat($p);
|
||||
local $job = { 'id' => $f,
|
||||
my @st = stat($p);
|
||||
my $job = { 'id' => $f,
|
||||
'date' => $1,
|
||||
'user' => scalar(getpwuid($st[4])),
|
||||
'created' => $st[9] };
|
||||
open(FILE, $p);
|
||||
while(<FILE>) {
|
||||
open(my $FILE, "<", $p);
|
||||
while(<$FILE>) {
|
||||
$job->{'cmd'} .= $_;
|
||||
}
|
||||
close(FILE);
|
||||
close($FILE);
|
||||
$job->{'realcmd'} = $job->{'cmd'};
|
||||
$job->{'realcmd'} =~ s/^[\000-\177]+#ident.*\ncd\s+\S+\numask\s+\S+\n//;
|
||||
$job->{'realcmd'} =~ s/^ulimit\s+\S+\n//;
|
||||
push(@rv, $job);
|
||||
}
|
||||
}
|
||||
closedir(DIR);
|
||||
closedir($DIR);
|
||||
return @rv;
|
||||
}
|
||||
|
||||
# create_atjob(user, time, commands, directory, send-email)
|
||||
sub create_atjob
|
||||
{
|
||||
local @tm = localtime($_[1]);
|
||||
local $date = strftime "%H:%M %b %d", @tm;
|
||||
local $mailflag = $_[4] ? "-m" : "";
|
||||
local $cmd = "cd ".quotemeta($_[3])." ; at $mailflag $date";
|
||||
local @uinfo = getpwnam($_[0]);
|
||||
my @tm = localtime($_[1]);
|
||||
my $date = strftime "%H:%M %b %d", @tm;
|
||||
my $mailflag = $_[4] ? "-m" : "";
|
||||
my $cmd = "cd ".quotemeta($_[3])." ; at $mailflag $date";
|
||||
my @uinfo = getpwnam($_[0]);
|
||||
if ($uinfo[2] != $<) {
|
||||
# Only SU if we are not already the user
|
||||
$cmd = &command_as_user($_[0], 0, $cmd);
|
||||
}
|
||||
no strict "subs";
|
||||
&open_execute_command(AT, "$cmd >/dev/null 2>&1", 0);
|
||||
print AT $_[2];
|
||||
close(AT);
|
||||
use strict "subs";
|
||||
&additional_log('exec', undef, $cmd);
|
||||
}
|
||||
|
||||
|
||||
@@ -330,6 +330,7 @@ return undef;
|
||||
sub process_firewall_line
|
||||
{
|
||||
local ($line, $hours, $time_now) = @_;
|
||||
my @time_now = localtime($time_now);
|
||||
if ($line =~ /^(\S+)\s+(\d+)\s+(\d+):(\d+):(\d+).*BANDWIDTH_(IN|OUT):(IN=.*)/) {
|
||||
# Found a valid line
|
||||
local ($mon, $day, $hr, $min, $sec) = ($1, $2, $3, $4, $5);
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
require 'bind8-lib.pl';
|
||||
# Globals from bind8-lib.pl
|
||||
our (%config, %text, %in);
|
||||
|
||||
# acl_security_form(&options)
|
||||
# Output HTML for editing security options for the bind8 module
|
||||
sub acl_security_form
|
||||
{
|
||||
local $m = $_[0]->{'zones'} eq '*' ? 1 :
|
||||
my $m = $_[0]->{'zones'} eq '*' ? 1 :
|
||||
$_[0]->{'zones'} =~ /^\!/ ? 2 : 0;
|
||||
print "<tr> <td valign=top><b>$text{'acl_zones'}</b></td>\n";
|
||||
print "<td colspan=3><table cellpadding=0 cellspacing=0> <tr><td valign=top>\n";
|
||||
@@ -17,24 +21,23 @@ printf "<input type=radio name=zones_def value=2 %s> %s</td>\n",
|
||||
$m == 2 ? 'checked' : '', $text{'acl_znsel'};
|
||||
|
||||
print "<td><select name=zones multiple size=4 width=150>\n";
|
||||
local $conf = &get_config();
|
||||
local @zones = grep { $_->{'value'} ne "." }
|
||||
my $conf = &get_config();
|
||||
my @zones = grep { $_->{'value'} ne "." }
|
||||
&find("zone", $conf);
|
||||
local @views = &find("view", $conf);
|
||||
local $v;
|
||||
foreach $v (@views) {
|
||||
my @views = &find("view", $conf);
|
||||
foreach my $v (@views) {
|
||||
push(@zones, grep { $_->{'value'} ne "." }
|
||||
&find("zone", $v->{'members'}));
|
||||
}
|
||||
local ($z, %zcan);
|
||||
my %zcan;
|
||||
map { $zcan{$_}++ } split(/\s+/, $_[0]->{'zones'});
|
||||
foreach $z (sort { $a->{'value'} cmp $b->{'value'} } @zones) {
|
||||
foreach my $z (sort { $a->{'value'} cmp $b->{'value'} } @zones) {
|
||||
printf "<option value='%s' %s>%s</option>\n",
|
||||
$z->{'value'},
|
||||
$zcan{$z->{'value'}} ? "selected" : "",
|
||||
&arpa_to_ip($z->{'value'});
|
||||
}
|
||||
foreach $v (sort { $a->{'value'} cmp $b->{'value'} } @views) {
|
||||
foreach my $v (sort { $a->{'value'} cmp $b->{'value'} } @views) {
|
||||
printf "<option value='%s' %s>%s</option>\n",
|
||||
'view_'.$v->{'value'},
|
||||
$zcan{'view_'.$v->{'value'}} ? "selected" : "",
|
||||
@@ -49,12 +52,12 @@ if (@views) {
|
||||
[ [ 1, $text{'acl_vall'} ],
|
||||
[ 0, $text{'acl_vsel'} ] ]),"<br>\n";
|
||||
print "<select name=inviews multiple size=4 width=150>\n";
|
||||
local ($v, %vcan);
|
||||
my %vcan;
|
||||
map { $vcan{$_}++ } split(/\s+/, $_[0]->{'inviews'});
|
||||
printf "<option value='%s' %s>%s</option>\n",
|
||||
"_", $vcan{"_"} ? "selected" : "",
|
||||
"<".$text{'acl_toplevel'}.">";
|
||||
foreach $v (sort { $a->{'value'} cmp $b->{'value'} } @views) {
|
||||
foreach my $v (sort { $a->{'value'} cmp $b->{'value'} } @views) {
|
||||
printf "<option value='%s' %s>%s</option>\n",
|
||||
$v->{'value'},
|
||||
$vcan{$v->{'value'}} ? "selected" : "", $v->{'value'};
|
||||
@@ -83,7 +86,7 @@ printf "<input type=radio name=defaults value=0 %s> $text{'no'}</td> </tr>\n",
|
||||
$_[0]->{'defaults'} ? "" : "checked";
|
||||
|
||||
print "<tr> <td><b>$text{'acl_ztypes'}</b></td> <td colspan=3>\n";
|
||||
foreach $t ("master", "slave", "forward", "delegation") {
|
||||
foreach my $t ("master", "slave", "forward", "delegation") {
|
||||
printf "<input type=checkbox name=%s %s> %s\n",
|
||||
$t, $_[0]->{$t} ? "checked" : "", $text{'acl_ztypes_'.$t};
|
||||
}
|
||||
@@ -185,7 +188,7 @@ printf "<input type=radio name=views value=0 %s> $text{'no'}</td> </tr>\n",
|
||||
$_[0]->{'views'} ? "" : "checked";
|
||||
|
||||
if (@views) {
|
||||
local $m = $_[0]->{'vlist'} eq '*' ? 1 :
|
||||
my $m = $_[0]->{'vlist'} eq '*' ? 1 :
|
||||
$_[0]->{'vlist'} =~ /^\!/ ? 2 :
|
||||
$_[0]->{'vlist'} eq '' ? 3 : 0;
|
||||
print "<tr> <td valign=top><b>$text{'acl_vlist'}</b></td>\n";
|
||||
@@ -200,9 +203,9 @@ if (@views) {
|
||||
$m == 3 ? 'checked' : '', $text{'acl_vnone'};
|
||||
|
||||
print "<td><select name=vlist multiple size=4 width=150>\n";
|
||||
local ($v, %vcan);
|
||||
my ($v, %vcan);
|
||||
map { $vcan{$_}++ } split(/\s+/, $_[0]->{'vlist'});
|
||||
foreach $v (sort { $a->{'value'} cmp $b->{'value'} } @views) {
|
||||
foreach my $v (sort { $a->{'value'} cmp $b->{'value'} } @views) {
|
||||
printf "<option value='%s' %s>%s</option>\n",
|
||||
$v->{'value'},
|
||||
$vcan{$v->{'value'}} ? "selected" : "", $v->{'value'};
|
||||
|
||||
@@ -1,31 +1,34 @@
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
do 'bind8-lib.pl';
|
||||
# Globals from bind8-lib.pl
|
||||
our (%config, %text, %in);
|
||||
|
||||
# backup_config_files()
|
||||
# Returns files and directories that can be backed up
|
||||
sub backup_config_files
|
||||
{
|
||||
local @rv;
|
||||
my @rv;
|
||||
|
||||
# Add main .conf files
|
||||
local $conf = &get_config();
|
||||
my $conf = &get_config();
|
||||
push(@rv, map { $_->{'file'} } @$conf);
|
||||
|
||||
# Add all master and hint zone files
|
||||
local @views = &find("view", $conf);
|
||||
local ($v, @zones);
|
||||
foreach $v (@views) {
|
||||
local @vz = &find("zone", $v->{'members'});
|
||||
my @views = &find("view", $conf);
|
||||
my @zones;
|
||||
foreach my $v (@views) {
|
||||
my @vz = &find("zone", $v->{'members'});
|
||||
push(@zones, @vz);
|
||||
}
|
||||
push(@zones, &find("zone", $conf));
|
||||
local $z;
|
||||
foreach $z (@zones) {
|
||||
local $tv = &find_value("type", $z->{'members'});
|
||||
foreach my $z (@zones) {
|
||||
my $tv = &find_value("type", $z->{'members'});
|
||||
next if ($tv ne "master" && $tv ne "hint");
|
||||
local $file = &find_value("file", $z->{'members'});
|
||||
my $file = &find_value("file", $z->{'members'});
|
||||
next if (!$file);
|
||||
local @recs = &read_zone_file($file, $z->{'value'});
|
||||
my @recs = &read_zone_file($file, $z->{'value'});
|
||||
push(@rv, map { $_->{'file'} } @recs);
|
||||
}
|
||||
|
||||
@@ -58,7 +61,7 @@ return undef;
|
||||
sub post_restore
|
||||
{
|
||||
&flush_zone_names();
|
||||
local $pidfile = &get_pid_file();
|
||||
my $pidfile = &get_pid_file();
|
||||
if (&check_pid_file(&make_chroot($pidfile, 1))) {
|
||||
return &restart_bind();
|
||||
}
|
||||
|
||||
1150
bind8/bind8-lib.pl
1150
bind8/bind8-lib.pl
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,9 @@
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
do 'bind8-lib.pl';
|
||||
# Globals from bind8-lib.pl
|
||||
our (%config, %text, %in);
|
||||
|
||||
sub cgi_args
|
||||
{
|
||||
|
||||
@@ -1,18 +1,23 @@
|
||||
#!/usr/local/bin/perl
|
||||
# Check a zone's records and report problems
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
require './bind8-lib.pl';
|
||||
# Globals from bind8-lib.pl
|
||||
our (%access, %text, %in);
|
||||
|
||||
&ReadParse();
|
||||
$access{'apply'} || &error($text{'check_ecannot'});
|
||||
$zone = &get_zone_name_or_error($in{'zone'}, $in{'view'});
|
||||
my $zone = &get_zone_name_or_error($in{'zone'}, $in{'view'});
|
||||
&can_edit_zone($zone) || &error($text{'master_ecannot'});
|
||||
$desc = &ip6int_to_net(&arpa_to_ip($dom));
|
||||
my $desc = &ip6int_to_net(&arpa_to_ip($zone->{'name'}));
|
||||
|
||||
&ui_print_header($desc, $text{'check_title'}, "",
|
||||
undef, undef, undef, undef, &restart_links($zone));
|
||||
|
||||
$file = &make_chroot($zone->{'file'});
|
||||
@errs = &check_zone_records($zone);
|
||||
my $file = &make_chroot($zone->{'file'});
|
||||
my @errs = &check_zone_records($zone);
|
||||
if (@errs) {
|
||||
# Show list of errors
|
||||
print "<b>",&text('check_errs', "<tt>$file</tt>"),"</b><p>\n";
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
#!/usr/local/bin/perl
|
||||
# Remove some zone from the open list
|
||||
use strict;
|
||||
use warnings;
|
||||
# Globals
|
||||
our (%in);
|
||||
|
||||
require './bind8-lib.pl';
|
||||
&ReadParse();
|
||||
@heiropen = &get_heiropen();
|
||||
my @heiropen = &get_heiropen();
|
||||
@heiropen = grep { $_ ne $in{'what'} } @heiropen;
|
||||
&save_heiropen(\@heiropen);
|
||||
&redirect("index.cgi#$in{'what'}");
|
||||
|
||||
@@ -1,21 +1,25 @@
|
||||
#!/usr/local/bin/perl
|
||||
# conf_acls.cgi
|
||||
# Display global ACLs
|
||||
use strict;
|
||||
use warnings;
|
||||
# Globals
|
||||
our (%text, %access);
|
||||
|
||||
require './bind8-lib.pl';
|
||||
$access{'defaults'} || &error($text{'acls_ecannot'});
|
||||
&ui_print_header(undef, $text{'acls_title'}, "",
|
||||
undef, undef, undef, undef, &restart_links());
|
||||
|
||||
$conf = &get_config();
|
||||
@acls = ( &find("acl", $conf), { } );
|
||||
my $conf = &get_config();
|
||||
my @acls = ( &find("acl", $conf), { } );
|
||||
|
||||
print &ui_form_start("save_acls.cgi", "post");
|
||||
print &ui_columns_start([ $text{'acls_name'}, $text{'acls_values'} ]);
|
||||
for($i=0; $i<@acls; $i++) {
|
||||
@cols = ( );
|
||||
for(my $i=0; $i<@acls; $i++) {
|
||||
my @cols = ( );
|
||||
push(@cols, &ui_textbox("name_$i", $acls[$i]->{'value'}, 15));
|
||||
@vals = map { join(" ", $_->{'name'}, @{$_->{'values'}}) }
|
||||
my @vals = map { join(" ", $_->{'name'}, @{$_->{'values'}}) }
|
||||
@{$acls[$i]->{'members'}};
|
||||
push(@cols, &ui_textarea("values_$i", join("\n", @vals), 5, 60, "off"));
|
||||
print &ui_columns_row(\@cols, [ "valign=top" ]);
|
||||
|
||||
@@ -1,25 +1,31 @@
|
||||
#!/usr/local/bin/perl
|
||||
# Display NDC control interface options
|
||||
use strict;
|
||||
use warnings;
|
||||
# Globals
|
||||
our (%text, %access);
|
||||
|
||||
require './bind8-lib.pl';
|
||||
$access{'defaults'} || &error($text{'controls_ecannot'});
|
||||
&ui_print_header(undef, $text{'controls_title'}, "",
|
||||
undef, undef, undef, undef, &restart_links());
|
||||
|
||||
$conf = &get_config();
|
||||
$controls = &find("controls", $conf);
|
||||
$inet = &find("inet", $controls->{'members'});
|
||||
$unix = &find("unix", $controls->{'members'});
|
||||
my $conf = &get_config();
|
||||
my $controls = &find("controls", $conf);
|
||||
my $inet = &find("inet", $controls->{'members'});
|
||||
my $unix = &find("unix", $controls->{'members'});
|
||||
|
||||
print &ui_form_start("save_controls.cgi", "post");
|
||||
print &ui_table_start($text{'controls_header'}, undef, 2);
|
||||
|
||||
# Show options for inet control
|
||||
my $ip;
|
||||
my $port;
|
||||
if ($inet) {
|
||||
@v = @{$inet->{'values'}};
|
||||
my @v = @{$inet->{'values'}};
|
||||
$ip = shift(@v);
|
||||
while(@v) {
|
||||
$n = shift(@v);
|
||||
my $n = shift(@v);
|
||||
if ($n eq "port") { $port = shift(@v); }
|
||||
}
|
||||
}
|
||||
@@ -44,12 +50,13 @@ print &ui_table_row($text{'controls_keys'},
|
||||
|
||||
print &ui_table_hr();
|
||||
|
||||
# Show options for local socket control
|
||||
# Show options for local, socket control
|
||||
my ($path, $perm, $owner, $group);
|
||||
if ($unix) {
|
||||
@v = @{$unix->{'values'}};
|
||||
my @v = @{$unix->{'values'}};
|
||||
$path = shift(@v);
|
||||
while(@v) {
|
||||
$n = shift(@v);
|
||||
my $n = shift(@v);
|
||||
if ($n eq "perm") { $perm = shift(@v); }
|
||||
elsif ($n eq "owner") { $owner = getpwuid(shift(@v)); }
|
||||
elsif ($n eq "group") { $group = getgrgid(shift(@v)); }
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
#!/usr/local/bin/perl
|
||||
# Show a form to setup DNSSEC key rotation
|
||||
use strict;
|
||||
use warnings;
|
||||
# Globals
|
||||
our (%text, %access, %config);
|
||||
|
||||
require './bind8-lib.pl';
|
||||
&ReadParse();
|
||||
@@ -13,7 +17,7 @@ print &ui_form_start("save_dnssec.cgi", "post");
|
||||
print &ui_table_start($text{'dnssec_header'}, undef, 2);
|
||||
|
||||
# Rotation enabled?
|
||||
$job = &get_dnssec_cron_job();
|
||||
my $job = &get_dnssec_cron_job();
|
||||
print &ui_table_row($text{'dnssec_enabled'},
|
||||
&ui_yesno_radio("enabled", $job ? 1 : 0));
|
||||
|
||||
|
||||
@@ -1,18 +1,12 @@
|
||||
#!/usr/local/bin/perl
|
||||
# Show a form to setup DNSSEC-Tools parameters
|
||||
use strict;
|
||||
use warnings;
|
||||
# Globals
|
||||
our (%access, %text, %config);
|
||||
|
||||
require './bind8-lib.pl';
|
||||
|
||||
local $conf;
|
||||
local $emailaddrs;
|
||||
local $algorithm;
|
||||
local $ksklength;
|
||||
local $zsklength;
|
||||
local $usensec3;
|
||||
local $endtime;
|
||||
local $ksklife;
|
||||
local $zsklife;
|
||||
|
||||
&ReadParse();
|
||||
$access{'defaults'} || &error($text{'dt_conf_ecannot'});
|
||||
&ui_print_header(undef, $text{'dt_conf_title'}, "",
|
||||
@@ -20,51 +14,51 @@ $access{'defaults'} || &error($text{'dt_conf_ecannot'});
|
||||
|
||||
print $text{'dt_conf_desc'},"<p>\n";
|
||||
|
||||
$conf = get_dnssectools_config();
|
||||
my $conf = get_dnssectools_config();
|
||||
|
||||
print &ui_form_start("save_dnssectools.cgi", "post");
|
||||
print &ui_table_start($text{'dt_conf_header'}, undef, 2);
|
||||
|
||||
$emailaddrs = find_value("admin-email", $conf);
|
||||
my $emailaddrs = find_value("admin-email", $conf);
|
||||
print &ui_table_row($text{'dt_conf_email'},
|
||||
ui_textbox("dt_email", $emailaddrs, 50));
|
||||
|
||||
#algorithm; dt_alg
|
||||
$algorithm = find_value("algorithm", $conf);
|
||||
my $algorithm = find_value("algorithm", $conf);
|
||||
print &ui_table_row($text{'dt_conf_algorithm'},
|
||||
ui_textbox("dt_alg", $algorithm, 50));
|
||||
|
||||
#ksklength; dt_ksklen
|
||||
$ksklength = find_value("ksklength", $conf);
|
||||
my $ksklength = find_value("ksklength", $conf);
|
||||
print &ui_table_row($text{'dt_conf_ksklength'},
|
||||
ui_textbox("dt_ksklen", $ksklength, 50));
|
||||
|
||||
#zsklength; dt_zsklen
|
||||
$zsklength = find_value("zsklength", $conf);
|
||||
my $zsklength = find_value("zsklength", $conf);
|
||||
print &ui_table_row($text{'dt_conf_zsklength'},
|
||||
ui_textbox("dt_zsklen", $zsklength, 50));
|
||||
|
||||
#usensec3; dt_nsec3
|
||||
$usensec3 = find_value("usensec3", $conf);
|
||||
my $usensec3 = find_value("usensec3", $conf);
|
||||
print &ui_table_row($text{'dt_conf_nsec3'},
|
||||
ui_textbox("dt_nsec3", $usensec3, 50));
|
||||
|
||||
|
||||
#endtime; dt_endtime
|
||||
$endtime = find_value("endtime", $conf);
|
||||
my $endtime = find_value("endtime", $conf);
|
||||
print &ui_table_row($text{'dt_conf_endtime'},
|
||||
ui_textbox("dt_endtime", $endtime, 50));
|
||||
|
||||
print &ui_table_hr();
|
||||
|
||||
#ksklife; dt_ksklife
|
||||
$ksklife = find_value("ksklife", $conf);
|
||||
my $ksklife = find_value("ksklife", $conf);
|
||||
print &ui_table_row($text{'dt_conf_ksklife'},
|
||||
ui_textbox("dt_ksklife", $ksklife, 50)." ".
|
||||
$text{'dnssec_secs'});
|
||||
|
||||
#zsklife; dt_zsklife
|
||||
$zsklife = find_value("zsklife", $conf);
|
||||
my $zsklife = find_value("zsklife", $conf);
|
||||
print &ui_table_row($text{'dt_conf_zsklife'},
|
||||
ui_textbox("dt_zsklife", $zsklife, 50)." ".
|
||||
$text{'dnssec_secs'});
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
#!/usr/local/bin/perl
|
||||
# conf_files.cgi
|
||||
# Display global files options
|
||||
use strict;
|
||||
use warnings;
|
||||
# Globals
|
||||
our (%access, %text);
|
||||
|
||||
require './bind8-lib.pl';
|
||||
$access{'defaults'} || &error($text{'files_ecannot'});
|
||||
@@ -8,9 +12,9 @@ $access{'defaults'} || &error($text{'files_ecannot'});
|
||||
undef, undef, undef, undef, &restart_links());
|
||||
|
||||
&ReadParse();
|
||||
$conf = &get_config();
|
||||
$options = &find("options", $conf);
|
||||
$mems = $options->{'members'};
|
||||
my $conf = &get_config();
|
||||
my $options = &find("options", $conf);
|
||||
my $mems = $options->{'members'};
|
||||
|
||||
# Start of the form
|
||||
print &ui_form_start("save_files.cgi", "post");
|
||||
@@ -33,4 +37,3 @@ print &ui_form_end([ [ undef, $text{'save'} ] ]);
|
||||
|
||||
&ui_print_footer("", $text{'index_return'});
|
||||
|
||||
|
||||
|
||||
@@ -1,15 +1,19 @@
|
||||
#!/usr/local/bin/perl
|
||||
# conf_forwarding.cgi
|
||||
# Display global forwarding and transfer options
|
||||
use strict;
|
||||
use warnings;
|
||||
# Globals
|
||||
our (%access, %text);
|
||||
|
||||
require './bind8-lib.pl';
|
||||
$access{'defaults'} || &error($text{'forwarding_ecannot'});
|
||||
&ui_print_header(undef, $text{'forwarding_title'}, "",
|
||||
undef, undef, undef, undef, &restart_links());
|
||||
|
||||
$conf = &get_config();
|
||||
$options = &find("options", $conf);
|
||||
$mems = $options->{'members'};
|
||||
my $conf = &get_config();
|
||||
my $options = &find("options", $conf);
|
||||
my $mems = $options->{'members'};
|
||||
|
||||
# Start of the form
|
||||
print &ui_form_start("save_forwarding.cgi", "post");
|
||||
|
||||
@@ -1,22 +1,27 @@
|
||||
#!/usr/local/bin/perl
|
||||
# conf_keys.cgi
|
||||
# Display options for other DNS servers
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
require './bind8-lib.pl';
|
||||
# Globals
|
||||
our (%access, %text);
|
||||
|
||||
$access{'defaults'} || &error($text{'keys_ecannot'});
|
||||
&ui_print_header(undef, $text{'keys_title'}, "",
|
||||
undef, undef, undef, undef, &restart_links());
|
||||
|
||||
$conf = &get_config();
|
||||
@keys = ( &find("key", $conf), { } );
|
||||
my $conf = &get_config();
|
||||
my @keys = ( &find("key", $conf), { } );
|
||||
|
||||
# Build table of keys
|
||||
@table = ( );
|
||||
for($i=0; $i<@keys; $i++) {
|
||||
$k = $keys[$i];
|
||||
@algs = ( "hmac-md5" );
|
||||
$alg = &find_value("algorithm", $k->{'members'});
|
||||
$secret = &find_value("secret", $k->{'members'});
|
||||
my @table = ( );
|
||||
for(my $i=0; $i<@keys; $i++) {
|
||||
my $k = $keys[$i];
|
||||
my @algs = ( "hmac-md5" );
|
||||
my $alg = &find_value("algorithm", $k->{'members'});
|
||||
my $secret = &find_value("secret", $k->{'members'});
|
||||
push(@table, [ &ui_textbox("id_$i", $k->{'value'}, 15),
|
||||
&ui_select("alg_$i", $alg, \@algs, 1, 0, $alg ? 1 : 0),
|
||||
&ui_textbox("secret_$i", $secret, 65) ]);
|
||||
|
||||
@@ -1,18 +1,22 @@
|
||||
#!/usr/local/bin/perl
|
||||
# conf_logging.cgi
|
||||
# Display global logging options
|
||||
use strict;
|
||||
use warnings;
|
||||
our (%access, %text, %in);
|
||||
our (@syslog_levels, @severities, @cat_list);
|
||||
|
||||
require './bind8-lib.pl';
|
||||
$access{'defaults'} || &error($text{'logging_ecannot'});
|
||||
&ui_print_header(undef, $text{'logging_title'}, "",
|
||||
undef, undef, undef, undef, &restart_links());
|
||||
&ReadParse();
|
||||
$conf = &get_config();
|
||||
$logging = &find("logging", $conf);
|
||||
$mems = $logging ? $logging->{'members'} : [ ];
|
||||
my $conf = &get_config();
|
||||
my $logging = &find("logging", $conf);
|
||||
my $mems = $logging ? $logging->{'members'} : [ ];
|
||||
|
||||
# Start of tabs for channels and categories
|
||||
@tabs = ( [ "chans", $text{'logging_chans'}, "conf_logging.cgi?mode=chans" ],
|
||||
my @tabs = ( [ "chans", $text{'logging_chans'}, "conf_logging.cgi?mode=chans" ],
|
||||
[ "cats", $text{'logging_cats'}, "conf_logging.cgi?mode=cats" ] );
|
||||
print &ui_tabs_start(\@tabs, "mode", $in{'mode'} || "chans", 1);
|
||||
|
||||
@@ -20,8 +24,8 @@ print &ui_tabs_start_tab("mode", "chans");
|
||||
print $text{'logging_chansdesc'},"<p>\n";
|
||||
|
||||
# Add default channels to table
|
||||
@table = ( );
|
||||
@defchans = ( { 'name' => 'default_syslog',
|
||||
my @table = ( );
|
||||
my @defchans = ( { 'name' => 'default_syslog',
|
||||
'syslog' => 'daemon',
|
||||
'severity' => 'info' },
|
||||
{ 'name' => 'default_debug',
|
||||
@@ -32,7 +36,7 @@ print $text{'logging_chansdesc'},"<p>\n";
|
||||
'severity' => 'info' },
|
||||
{ 'name' => 'null',
|
||||
'null' => 1 } );
|
||||
foreach $c (@defchans) {
|
||||
foreach my $c (@defchans) {
|
||||
push(@table, [
|
||||
$c->{'name'},
|
||||
$c->{'syslog'} ? $c->{'syslog'} :
|
||||
@@ -47,17 +51,17 @@ foreach $c (@defchans) {
|
||||
|
||||
# Add user-defined channels
|
||||
# XXX
|
||||
@chans = &find("channel", $mems);
|
||||
@channames = ( (map { $_->{'value'} } @chans) ,
|
||||
my @chans = &find("channel", $mems);
|
||||
my @channames = ( (map { $_->{'value'} } @chans) ,
|
||||
'default_syslog', 'default_debug', 'default_stderr', 'null' );
|
||||
push(@chans, { });
|
||||
for($i=0; $i<@chans; $i++) {
|
||||
$cmems = $chans[$i]->{'members'};
|
||||
$file = &find("file", $cmems);
|
||||
$filestr = $file ? join(" ", @{$file->{'values'}}) : "";
|
||||
$syslog = &find_value("syslog", $cmems);
|
||||
$null = &find("null", $cmems);
|
||||
$stderr = &find("stderr", $cmems);
|
||||
for(my $i=0; $i<@chans; $i++) {
|
||||
my $cmems = $chans[$i]->{'members'};
|
||||
my $file = &find("file", $cmems);
|
||||
my $filestr = $file ? join(" ", @{$file->{'values'}}) : "";
|
||||
my $syslog = &find_value("syslog", $cmems);
|
||||
my $null = &find("null", $cmems);
|
||||
my $stderr = &find("stderr", $cmems);
|
||||
my @cols;
|
||||
|
||||
# Channel name
|
||||
@@ -65,7 +69,7 @@ for($i=0; $i<@chans; $i++) {
|
||||
|
||||
# Log destination
|
||||
my @dests;
|
||||
$to = $file ? 0 : $syslog ? 1 : $stderr ? 3 : $null ? 2 : 0;
|
||||
my $to = $file ? 0 : $syslog ? 1 : $stderr ? 3 : $null ? 2 : 0;
|
||||
push(@dests, [ 0, $text{'logging_file'},
|
||||
&ui_filebox("file_$i", $file->{'value'}, 40) ]);
|
||||
push(@dests, [ 1, $text{'logging_syslog'},
|
||||
@@ -76,7 +80,7 @@ for($i=0; $i<@chans; $i++) {
|
||||
push(@cols, &ui_radio_table("to_$i", $to, \@dests));
|
||||
|
||||
# Severity
|
||||
$sev = &find("severity", $cmems);
|
||||
my $sev = &find("severity", $cmems);
|
||||
push(@cols, &ui_select("sev_$i", $sev->{'value'},
|
||||
[ [ "", " " ],
|
||||
map { [ $_, $_ eq 'debug' ? $text{'logging_debug'} :
|
||||
@@ -124,10 +128,10 @@ print $text{'logging_catsdesc'},"<p>\n";
|
||||
|
||||
# Build table of categories
|
||||
@table = ( );
|
||||
@cats = ( &find("category", $mems), { } );
|
||||
for($i=0; $i<@cats; $i++) {
|
||||
my @cats = ( &find("category", $mems), { } );
|
||||
for(my $i=0; $i<@cats; $i++) {
|
||||
my %cchan;
|
||||
foreach $c (@{$cats[$i]->{'members'}}) {
|
||||
foreach my $c (@{$cats[$i]->{'members'}}) {
|
||||
$cchan{$c->{'name'}}++;
|
||||
}
|
||||
push(@table, [
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
#!/usr/local/bin/perl
|
||||
# Show a page for manually editing named.conf
|
||||
use strict;
|
||||
use warnings;
|
||||
# Globals
|
||||
our (%access, %text, %in);
|
||||
|
||||
require './bind8-lib.pl';
|
||||
$access{'defaults'} || &error($text{'manual_ecannot'});
|
||||
@@ -8,8 +12,8 @@ $access{'defaults'} || &error($text{'manual_ecannot'});
|
||||
undef, undef, undef, undef, &restart_links());
|
||||
|
||||
# Work out and show the files
|
||||
$conf = &get_config();
|
||||
@files = &get_all_config_files($conf);
|
||||
my $conf = &get_config();
|
||||
my @files = &get_all_config_files($conf);
|
||||
$in{'file'} ||= $files[0];
|
||||
&indexof($in{'file'}, @files) >= 0 || &error($text{'manual_efile'});
|
||||
print &ui_form_start("conf_manual.cgi");
|
||||
@@ -23,7 +27,7 @@ print &ui_form_end();
|
||||
print &ui_form_start("save_manual.cgi", "form-data");
|
||||
print &ui_hidden("file", $in{'file'}),"\n";
|
||||
print &ui_table_start(undef, "width=100%", 2);
|
||||
$data = &read_file_contents(&make_chroot($in{'file'}));
|
||||
my $data = &read_file_contents(&make_chroot($in{'file'}));
|
||||
print &ui_table_row(undef,
|
||||
&ui_textarea("data", $data, 20, 80, undef, 0, "style='width:100%'"), 2);
|
||||
print &ui_table_end();
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
#!/usr/local/bin/perl
|
||||
# conf_misc.cgi
|
||||
# Display miscellaneous options
|
||||
use strict;
|
||||
use warnings;
|
||||
# Globals
|
||||
our (%access, %text);
|
||||
|
||||
require './bind8-lib.pl';
|
||||
$access{'defaults'} || &error($text{'misc_ecannot'});
|
||||
@@ -8,9 +12,9 @@ $access{'defaults'} || &error($text{'misc_ecannot'});
|
||||
undef, undef, undef, undef, &restart_links());
|
||||
|
||||
&ReadParse();
|
||||
$conf = &get_config();
|
||||
$options = &find("options", $conf);
|
||||
$mems = $options->{'members'};
|
||||
my $conf = &get_config();
|
||||
my $options = &find("options", $conf);
|
||||
my $mems = $options->{'members'};
|
||||
|
||||
# Start of the form
|
||||
print &ui_form_start("save_misc.cgi", "post");
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
#!/usr/local/bin/perl
|
||||
# Check the whole BIND config and report problems
|
||||
use strict;
|
||||
use warnings;
|
||||
# Globals
|
||||
our (%access, %text, %config);
|
||||
|
||||
require './bind8-lib.pl';
|
||||
&ReadParse();
|
||||
@@ -8,8 +12,8 @@ $access{'defaults'} || &error($text{'ncheck_ecannot'});
|
||||
&ui_print_header(undef, $text{'ncheck_title'}, "",
|
||||
undef, undef, undef, undef, &restart_links());
|
||||
|
||||
$file = &make_chroot($config{'named_conf'});
|
||||
@errs = &check_bind_config();
|
||||
my $file = &make_chroot($config{'named_conf'});
|
||||
my @errs = &check_bind_config();
|
||||
if (@errs) {
|
||||
# Show list of errors
|
||||
print "<b>",&text('ncheck_errs', "<tt>$file</tt>"),"</b><p>\n";
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
#!/usr/local/bin/perl
|
||||
# Display global networking options
|
||||
use strict;
|
||||
use warnings;
|
||||
# Globals
|
||||
our (%access, %text);
|
||||
|
||||
require './bind8-lib.pl';
|
||||
$access{'defaults'} || &error($text{'net_ecannot'});
|
||||
@@ -7,26 +11,26 @@ $access{'defaults'} || &error($text{'net_ecannot'});
|
||||
undef, undef, undef, undef, &restart_links());
|
||||
|
||||
&ReadParse();
|
||||
$conf = &get_config();
|
||||
$options = &find("options", $conf);
|
||||
$mems = $options->{'members'};
|
||||
my $conf = &get_config();
|
||||
my $options = &find("options", $conf);
|
||||
my $mems = $options->{'members'};
|
||||
|
||||
# Start of form
|
||||
print &ui_form_start("save_net.cgi", "post");
|
||||
print &ui_table_start($text{'net_header'}, "width=100%", 4);
|
||||
|
||||
# Ports and addresses to listen on
|
||||
@listen = &find("listen-on", $mems);
|
||||
$ltable = &ui_radio("listen_def", @listen ? 0 : 1,
|
||||
my @listen = &find("listen-on", $mems);
|
||||
my $ltable = &ui_radio("listen_def", @listen ? 0 : 1,
|
||||
[ [ 1, $text{'default'} ],
|
||||
[ 0, $text{'net_below'} ] ])."<br>\n";
|
||||
|
||||
@table = ( );
|
||||
my @table = ( );
|
||||
push(@listen, { });
|
||||
for($i=0; $i<@listen; $i++) {
|
||||
$port = $listen[$i]->{'value'} eq 'port' ?
|
||||
for(my $i=0; $i<@listen; $i++) {
|
||||
my $port = $listen[$i]->{'value'} eq 'port' ?
|
||||
$listen[$i]->{'values'}->[1] : undef;
|
||||
@vals = map { $_->{'name'} } @{$listen[$i]->{'members'}};
|
||||
my @vals = map { $_->{'name'} } @{$listen[$i]->{'members'}};
|
||||
push(@table, [
|
||||
&ui_radio("pdef_$i", $port ? 0 : 1,
|
||||
[ [ 1, $text{'default'} ],
|
||||
@@ -42,11 +46,12 @@ $ltable .= &ui_columns_table(
|
||||
1);
|
||||
|
||||
print &ui_table_row($text{'net_listen'}, $ltable, 3);
|
||||
print &ui_table_hr();
|
||||
#print &ui_table_hr();
|
||||
|
||||
# Source address for queries
|
||||
$src = &find("query-source", $mems);
|
||||
$srcstr = join(" ", @{$src->{'values'}});
|
||||
my $src = &find("query-source", $mems);
|
||||
my $srcstr = join(" ", $src->{'values'});
|
||||
my ($sport, $saddr);
|
||||
$sport = $1 if ($srcstr =~ /port\s+(\d+)/i);
|
||||
$saddr = $1 if ($srcstr =~ /address\s+([0-9\.]+)/i);
|
||||
print &ui_table_row($text{'net_saddr'},
|
||||
@@ -60,7 +65,8 @@ print &ui_table_row($text{'net_sport'},
|
||||
|
||||
# Source port for transfers
|
||||
$src = &find("transfer-source", $mems);
|
||||
$srcstr = join(" ", @{$src->{'values'}});
|
||||
$srcstr = join(" ", $src->{'values'});
|
||||
my ($tport, $taddr);
|
||||
$tport = $1 if ($srcstr =~ /port\s+(\d+)/i);
|
||||
$taddr = $1 if ($srcstr =~ /^([0-9\.]+|\*)/i);
|
||||
print &ui_table_row($text{'net_taddr'},
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
#!/usr/local/bin/perl
|
||||
# Show a form for setting up RNDC
|
||||
# XXX should check if already working!
|
||||
use strict;
|
||||
use warnings;
|
||||
# Globals
|
||||
our (%access, %text, %config);
|
||||
our $module_name;
|
||||
|
||||
require './bind8-lib.pl';
|
||||
$access{'defaults'} || &error($text{'rndc_ecannot'});
|
||||
@@ -16,6 +21,7 @@ if (!&has_command($config{'rndcconf_cmd'})) {
|
||||
}
|
||||
|
||||
# Check if already working
|
||||
my $out;
|
||||
&execute_command("$config{'rndc_cmd'} status", undef, \$out);
|
||||
if (!$? && $out !~ /failed/) {
|
||||
print "<b>",$text{'rndc_desc2'},"</b><p>\n";
|
||||
@@ -23,7 +29,7 @@ if (!$? && $out !~ /failed/) {
|
||||
|
||||
# Show form
|
||||
print &ui_form_start("save_rndc.cgi", "post");
|
||||
$ex = -s $config{'rndc_conf'};
|
||||
my $ex = -s $config{'rndc_conf'};
|
||||
print &text($ex ? 'rndc_rusure' : 'rndc_rusure2',
|
||||
"<tt>$config{'rndc_conf'}</tt>"),"<p>\n";
|
||||
print &ui_submit($text{'rndc_ok'});
|
||||
|
||||
@@ -1,15 +1,19 @@
|
||||
#!/usr/local/bin/perl
|
||||
# conf_servers.cgi
|
||||
# Display options for other DNS servers
|
||||
use strict;
|
||||
use warnings;
|
||||
# Globals
|
||||
our (%access, %text);
|
||||
|
||||
require './bind8-lib.pl';
|
||||
$access{'defaults'} || &error($text{'servers_ecannot'});
|
||||
&ui_print_header(undef, $text{'servers_title'}, "",
|
||||
undef, undef, undef, undef, &restart_links());
|
||||
|
||||
$conf = &get_config();
|
||||
@servers = ( &find("server", $conf), { } );
|
||||
@keys = &find("key", $conf);
|
||||
my $conf = &get_config();
|
||||
my @servers = ( &find("server", $conf), { } );
|
||||
my @keys = &find("key", $conf);
|
||||
|
||||
print &ui_form_start("save_servers.cgi", "post");
|
||||
print &ui_columns_start([ $text{'servers_ip'},
|
||||
@@ -17,34 +21,34 @@ print &ui_columns_start([ $text{'servers_ip'},
|
||||
$text{'servers_format'},
|
||||
$text{'servers_trans'},
|
||||
@keys ? ( $text{'servers_keys'} ) : ( ) ], 100);
|
||||
for($i=0; $i<@servers; $i++) {
|
||||
$s = $servers[$i];
|
||||
@cols = ( );
|
||||
for(my $i=0; $i<@servers; $i++) {
|
||||
my $s = $servers[$i];
|
||||
my @cols = ( );
|
||||
push(@cols, &ui_textbox("ip_$i", $s->{'value'}, 30));
|
||||
|
||||
$bogus = &find_value("bogus", $s->{'members'});
|
||||
my $bogus = &find_value("bogus", $s->{'members'});
|
||||
push(@cols, &ui_radio("bogus_$i", lc($bogus) eq 'yes' ? 1 : 0,
|
||||
[ [ 1, $text{'yes'} ],
|
||||
[ 0, $text{'no'} ] ]));
|
||||
|
||||
$format = &find_value("transfer-format", $s->{'members'});
|
||||
my $format = &find_value("transfer-format", $s->{'members'});
|
||||
push(@cols, &ui_radio("format_$i", lc($format),
|
||||
[ [ 'one-answer', $text{'servers_one'} ],
|
||||
[ 'many-answers', $text{'servers_many'} ],
|
||||
[ '', $text{'default'} ] ]));
|
||||
|
||||
$trans = &find_value("transfers", $s->{'members'});
|
||||
my $trans = &find_value("transfers", $s->{'members'});
|
||||
push(@cols, &ui_textbox("trans_$i", $trans, 8));
|
||||
|
||||
if (@keys) {
|
||||
local %haskey;
|
||||
$keys = &find("keys", $s->{'members'});
|
||||
foreach $k (@{$keys->{'members'}}) {
|
||||
my %haskey;
|
||||
my $keys = &find("keys", $s->{'members'});
|
||||
foreach my $k (@{$keys->{'members'}}) {
|
||||
$haskey{$k->{'name'}}++;
|
||||
}
|
||||
$cbs = "";
|
||||
foreach $k (@keys) {
|
||||
local $v = $k->{'value'};
|
||||
my $cbs = "";
|
||||
foreach my $k (@keys) {
|
||||
my $v = $k->{'value'};
|
||||
$cbs .= &ui_checkbox("keys_$i", $v, $v, $haskey{$v}).
|
||||
"\n";
|
||||
}
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
#!/usr/local/bin/perl
|
||||
# Show a form for setting up DNSSEC verification and trusted keys
|
||||
use strict;
|
||||
use warnings;
|
||||
# Globals
|
||||
our (%access, %text);
|
||||
our $dnssec_dlv_zone;
|
||||
|
||||
require './bind8-lib.pl';
|
||||
&ReadParse();
|
||||
@@ -7,11 +12,11 @@ $access{'defaults'} || &error($text{'trusted_ecannot'});
|
||||
&supports_dnssec_client() || &error($text{'trusted_esupport'});
|
||||
&ui_print_header(undef, $text{'trusted_title'}, "",
|
||||
undef, undef, undef, undef, &restart_links());
|
||||
$conf = &get_config();
|
||||
$options = &find("options", $conf);
|
||||
$mems = $options->{'members'};
|
||||
@dlv = &find("dnssec-lookaside", $mems);
|
||||
$tkeys = &find("trusted-keys", $conf);
|
||||
my $conf = &get_config();
|
||||
my $options = &find("options", $conf);
|
||||
my $mems = $options->{'members'};
|
||||
my @dlv = &find("dnssec-lookaside", $mems);
|
||||
my $tkeys = &find("trusted-keys", $conf);
|
||||
$tkeys ||= { 'members' => [ ] };
|
||||
|
||||
# Check if not setup at all
|
||||
@@ -43,10 +48,10 @@ if (&supports_dnssec_client() == 2) {
|
||||
print &ui_table_hr();
|
||||
|
||||
# Trusted DLVs
|
||||
@dtable = ( );
|
||||
$i = 0;
|
||||
foreach $d (@dlv, { 'values' => [ '.' ] }) {
|
||||
$dlv = $d->{'values'}->[0];
|
||||
my @dtable = ( );
|
||||
my $i = 0;
|
||||
foreach my $d (@dlv, { 'values' => [ '.' ] }) {
|
||||
my $dlv = $d->{'values'}->[0];
|
||||
$dlv = "" if ($dlv eq ".");
|
||||
push(@dtable, [ &ui_opt_textbox("anchor_$i", $d->{'values'}->[2],
|
||||
30, $text{'trusted_none'}),
|
||||
@@ -60,11 +65,11 @@ print &ui_table_row($text{'trusted_dlvs'},
|
||||
\@dtable), 3);
|
||||
|
||||
# Trusted keys
|
||||
@ktable = ( );
|
||||
my @ktable = ( );
|
||||
$i = 0;
|
||||
foreach $k (@{$tkeys->{'members'}}, { }) {
|
||||
@v = @{$k->{'values'}};
|
||||
@wrapped = ( );
|
||||
foreach my $k (@{$tkeys->{'members'}}, { }) {
|
||||
my @v = @{$k->{'values'}};
|
||||
my @wrapped = ( );
|
||||
while(length($v[3]) > 30) {
|
||||
push(@wrapped, substr($v[3], 0, 30));
|
||||
$v[3] = substr($v[3], 30);
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
#!/usr/local/bin/perl
|
||||
# conf_zonedef.cgi
|
||||
# Display defaults for master zones
|
||||
use strict;
|
||||
use warnings;
|
||||
# Globals
|
||||
our (%access, %text, %config);
|
||||
|
||||
require './bind8-lib.pl';
|
||||
$access{'defaults'} || &error($text{'zonedef_ecannot'});
|
||||
@@ -10,6 +14,7 @@ $access{'defaults'} || &error($text{'zonedef_ecannot'});
|
||||
# Start of defaults for new zones form
|
||||
print &ui_form_start("save_zonedef.cgi", "post");
|
||||
print &ui_table_start($text{'zonedef_msg'}, "width=100%", 4);
|
||||
my %zd;
|
||||
&get_zone_defaults(\%zd);
|
||||
|
||||
# Default refresh time
|
||||
@@ -33,9 +38,9 @@ print &ui_table_row($text{'master_minimum'},
|
||||
&time_unit_choice("minunit", $zd{'minunit'}));
|
||||
|
||||
# Records for new zones, as a table
|
||||
@table = ( );
|
||||
for($i=0; $i<2 || $config{"tmpl_".($i-1)}; $i++) {
|
||||
@c = split(/\s+/, $config{"tmpl_$i"}, 3);
|
||||
my @table = ( );
|
||||
for(my $i=0; $i<2 || $config{"tmpl_".($i-1)}; $i++) {
|
||||
my @c = split(/\s+/, $config{"tmpl_$i"}, 3);
|
||||
push(@table, [ &ui_textbox("name_$i", $c[0], 15),
|
||||
&ui_select("type_$i", $c[1],
|
||||
[ map { [ $_, $text{"type_".$_} ] }
|
||||
@@ -89,7 +94,7 @@ if (&supports_dnssec()) {
|
||||
[ &list_dnssec_algorithms() ]), 3);
|
||||
|
||||
# Default size
|
||||
$sizedef = $config{'tmpl_dnssecsizedef'};
|
||||
my $sizedef = $config{'tmpl_dnssecsizedef'};
|
||||
$sizedef = 1 if ($sizedef eq '');
|
||||
print &ui_table_row($text{'zonedef_size'},
|
||||
&ui_radio("size_def", $sizedef,
|
||||
@@ -108,10 +113,11 @@ if (&supports_dnssec()) {
|
||||
print &ui_table_end();
|
||||
|
||||
# Start of table for global BIND options
|
||||
$conf = &get_config();
|
||||
$options = &find("options", $conf);
|
||||
$mems = $options->{'members'};
|
||||
foreach $c (&find("check-names", $mems)) {
|
||||
my $conf = &get_config();
|
||||
my $options = &find("options", $conf);
|
||||
my $mems = $options->{'members'};
|
||||
my %check;
|
||||
foreach my $c (&find("check-names", $mems)) {
|
||||
$check{$c->{'values'}->[0]} = $c->{'values'}->[1];
|
||||
}
|
||||
print &ui_table_start($text{'zonedef_msg2'}, "width=100%", 4);
|
||||
|
||||
@@ -1,13 +1,17 @@
|
||||
#!/usr/local/bin/perl
|
||||
# convert_master.cgi
|
||||
# Convert a master zone into a slave
|
||||
use strict;
|
||||
use warnings;
|
||||
# Globals
|
||||
our (%access, %text, %in, %config);
|
||||
|
||||
require './bind8-lib.pl';
|
||||
&ReadParse();
|
||||
&error_setup($text{'convert_err'});
|
||||
|
||||
$zone = &get_zone_name_or_error($in{'zone'}, $in{'view'});
|
||||
$zconf = &zone_to_config($zone);
|
||||
my $zone = &get_zone_name_or_error($in{'zone'}, $in{'view'});
|
||||
my $zconf = &zone_to_config($zone);
|
||||
|
||||
$access{'slave'} || &error($text{'screate_ecannot1'});
|
||||
&lock_file(&make_chroot($zconf->{'file'}));
|
||||
@@ -18,7 +22,7 @@ $access{'slave'} || &error($text{'screate_ecannot1'});
|
||||
|
||||
# Add a masters section
|
||||
if ($config{'default_master'}) {
|
||||
@mdirs = map { { 'name' => $_ } } split(/\s+/, $config{'default_master'});
|
||||
my @mdirs = map { { 'name' => $_ } } split(/\s+/, $config{'default_master'});
|
||||
&save_directive($zconf, 'masters', [ { 'name' => 'masters',
|
||||
'type' => 1,
|
||||
'members' => \@mdirs } ], 1);
|
||||
|
||||
@@ -1,16 +1,20 @@
|
||||
#!/usr/local/bin/perl
|
||||
# convert_slave.cgi
|
||||
# Convert a slave/stub zone into a master
|
||||
use strict;
|
||||
use warnings;
|
||||
# Globals
|
||||
our (%access, %text, %in);
|
||||
|
||||
require './bind8-lib.pl';
|
||||
&ReadParse();
|
||||
&error_setup($text{'convert_err'});
|
||||
|
||||
$zone = &get_zone_name_or_error($in{'zone'}, $in{'view'});
|
||||
$zconf = &zone_to_config($zone);
|
||||
my $zone = &get_zone_name_or_error($in{'zone'}, $in{'view'});
|
||||
my $zconf = &zone_to_config($zone);
|
||||
|
||||
$access{'master'} || &error($text{'mcreate_ecannot'});
|
||||
$file = &find_value("file", $zconf->{'members'});
|
||||
my $file = &find_value("file", $zconf->{'members'});
|
||||
if (!$file) {
|
||||
&error($text{'convert_efile'});
|
||||
}
|
||||
@@ -35,9 +39,9 @@ if (!-s $file) {
|
||||
if (&is_raw_format_records($file)) {
|
||||
&has_command("named-compilezone") ||
|
||||
&error($text{'convert_ebinary'});
|
||||
$temp = &transname();
|
||||
my $temp = &transname();
|
||||
©_source_dest($file, $temp);
|
||||
$out = &backquote_logged("named-compilezone -f raw -F text ".
|
||||
my $out = &backquote_logged("named-compilezone -f raw -F text ".
|
||||
"-o $file $zone->{'name'} $temp 2>&1");
|
||||
&error(&text('convert_ecompile', "<tt>".&html_escape($out)."</tt>"))
|
||||
if ($?);
|
||||
|
||||
@@ -1,15 +1,20 @@
|
||||
#!/usr/local/bin/perl
|
||||
# create_forward.cgi
|
||||
# Create a new forward zone
|
||||
use strict;
|
||||
use warnings;
|
||||
# Globals
|
||||
our (%access, %text, %in, %config);
|
||||
|
||||
require './bind8-lib.pl';
|
||||
&ReadParse();
|
||||
&error_setup($text{'dcreate_err'});
|
||||
$access{'delegation'} || &error($text{'dcreate_ecannot'});
|
||||
$access{'ro'} && &error($text{'master_ero'});
|
||||
$conf = &get_config();
|
||||
my $conf = &get_config();
|
||||
my $vconf;
|
||||
if ($in{'view'} ne '') {
|
||||
$view = $conf->[$in{'view'}];
|
||||
my $view = $conf->[$in{'view'}];
|
||||
&can_edit_view($view) || &error($text{'master_eviewcannot'});
|
||||
$vconf = $view->{'members'};
|
||||
}
|
||||
@@ -19,7 +24,7 @@ else {
|
||||
|
||||
# validate inputs
|
||||
if ($in{'rev'}) {
|
||||
local($ipv4);
|
||||
my $ipv4;
|
||||
($ipv4 = &check_net_ip($in{'zone'})) ||
|
||||
$config{'support_aaaa'} &&
|
||||
(($in{'zone'} =~ /^([\w:]+)(\/\d+)$/) || &check_ip6address($1)) ||
|
||||
@@ -38,15 +43,14 @@ else {
|
||||
&error(&text('create_edom', $in{'zone'}));
|
||||
}
|
||||
$in{'zone'} =~ s/\.$//;
|
||||
foreach $z (&find("zone", $vconf)) {
|
||||
foreach my $z (&find("zone", $vconf)) {
|
||||
if (lc($z->{'value'}) eq lc($in{'zone'})) {
|
||||
&error($text{'master_etaken'});
|
||||
}
|
||||
}
|
||||
|
||||
# Create structure
|
||||
@mdirs = map { { 'name' => $_ } } @masters;
|
||||
$dir = { 'name' => 'zone',
|
||||
my $dir = { 'name' => 'zone',
|
||||
'values' => [ $in{'zone'} ],
|
||||
'type' => 1,
|
||||
'members' => [ { 'name' => 'type',
|
||||
@@ -59,7 +63,7 @@ $dir = { 'name' => 'zone',
|
||||
&webmin_log("create", "delegation", $in{'zone'}, \%in);
|
||||
|
||||
# Get the new zone's index
|
||||
$idx = &get_zone_index($in{'zone'}, $in{'view'});
|
||||
my $idx = &get_zone_index($in{'zone'}, $in{'view'});
|
||||
|
||||
&add_zone_access($in{'zone'});
|
||||
&redirect("edit_delegation.cgi?zone=$in{'zone'}&view=$in{'view'}");
|
||||
|
||||
@@ -1,15 +1,20 @@
|
||||
#!/usr/local/bin/perl
|
||||
# create_forward.cgi
|
||||
# Create a new forward zone
|
||||
use strict;
|
||||
use warnings;
|
||||
# Globals
|
||||
our (%access, %text, %in, %config);
|
||||
|
||||
require './bind8-lib.pl';
|
||||
&ReadParse();
|
||||
&error_setup($text{'fcreate_err'});
|
||||
$access{'forward'} || &error($text{'fcreate_ecannot'});
|
||||
$access{'ro'} && &error($text{'master_ero'});
|
||||
$conf = &get_config();
|
||||
my $conf = &get_config();
|
||||
my $vconf;
|
||||
if ($in{'view'} ne '') {
|
||||
$view = $conf->[$in{'view'}];
|
||||
my $view = $conf->[$in{'view'}];
|
||||
&can_edit_view($view) || &error($text{'master_eviewcannot'});
|
||||
$vconf = $view->{'members'};
|
||||
}
|
||||
@@ -19,7 +24,7 @@ else {
|
||||
|
||||
# validate inputs
|
||||
if ($in{'rev'}) {
|
||||
local($ipv4);
|
||||
my $ipv4;
|
||||
($ipv4 = &check_net_ip($in{'zone'})) ||
|
||||
$config{'support_aaaa'} &&
|
||||
(($in{'zone'} =~ /^([\w:]+)(\/\d+)$/) || &check_ip6address($1)) ||
|
||||
@@ -38,23 +43,23 @@ else {
|
||||
&error(&text('create_edom', $in{'zone'}));
|
||||
}
|
||||
$in{'zone'} =~ s/\.$//;
|
||||
@masters = split(/\s+/, $in{'masters'});
|
||||
foreach $m (@masters) {
|
||||
my @masters = split(/\s+/, $in{'masters'});
|
||||
foreach my $m (@masters) {
|
||||
&check_ipaddress($m) || &check_ip6address($m) ||
|
||||
&error(&text('create_emaster', $m));
|
||||
}
|
||||
#if (!@masters) {
|
||||
# &error($text{'create_enone'});
|
||||
# }
|
||||
foreach $z (&find("zone", $vconf)) {
|
||||
foreach my $z (&find("zone", $vconf)) {
|
||||
if (lc($z->{'value'}) eq lc($in{'zone'})) {
|
||||
&error($text{'master_etaken'});
|
||||
}
|
||||
}
|
||||
|
||||
# Create structure
|
||||
@mdirs = map { { 'name' => $_ } } @masters;
|
||||
$dir = { 'name' => 'zone',
|
||||
my @mdirs = map { { 'name' => $_ } } @masters;
|
||||
my $dir = { 'name' => 'zone',
|
||||
'values' => [ $in{'zone'} ],
|
||||
'type' => 1,
|
||||
'members' => [ { 'name' => 'type',
|
||||
@@ -70,7 +75,7 @@ $dir = { 'name' => 'zone',
|
||||
&webmin_log("create", "forward", $in{'zone'}, \%in);
|
||||
|
||||
# Get the new zone's index
|
||||
$idx = &get_zone_index($in{'zone'}, $in{'view'});
|
||||
my $idx = &get_zone_index($in{'zone'}, $in{'view'});
|
||||
|
||||
&add_zone_access($in{'zone'});
|
||||
&redirect("edit_forward.cgi?zone=$in{'zone'}&view=$in{'view'}");
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
#!/usr/local/bin/perl
|
||||
# create_hint.cgi
|
||||
# Create a new root zone
|
||||
use strict;
|
||||
use warnings;
|
||||
# Globals
|
||||
our (%access, %text, %in);
|
||||
our $module_root_directory;
|
||||
|
||||
require './bind8-lib.pl';
|
||||
&ReadParse();
|
||||
@@ -12,14 +17,14 @@ $access{'ro'} && &error($text{'master_ero'});
|
||||
&allowed_zone_file(\%access, $in{'file'}) ||
|
||||
&error(&text('hcreate_efile', $in{'file'}));
|
||||
&lock_file(&make_chroot($in{'file'}));
|
||||
open(FILE, ">>".&make_chroot($in{'file'})) ||
|
||||
open(my $FILE, ">>", &make_chroot($in{'file'})) ||
|
||||
&error($text{'hcreate_efile2'});
|
||||
close(FILE);
|
||||
close($FILE);
|
||||
|
||||
# Get the root server information
|
||||
if ($in{'real'} == 1) {
|
||||
# Download from internic
|
||||
$err = &download_root_zone($in{'file'});
|
||||
my $err = &download_root_zone($in{'file'});
|
||||
&error($err) if ($err);
|
||||
}
|
||||
elsif ($in{'real'} == 2) {
|
||||
@@ -29,13 +34,13 @@ elsif ($in{'real'} == 2) {
|
||||
}
|
||||
else {
|
||||
# Just check the existing file
|
||||
@recs = &read_zone_file(&make_chroot($in{'file'}), ".");
|
||||
my @recs = &read_zone_file(&make_chroot($in{'file'}), ".");
|
||||
&error($text{'mcreate_erecs'}) if (@recs < 2);
|
||||
}
|
||||
&unlock_file(&make_chroot($in{'file'}));
|
||||
|
||||
# Create zone structure
|
||||
$dir = { 'name' => 'zone',
|
||||
my $dir = { 'name' => 'zone',
|
||||
'values' => [ '.' ],
|
||||
'type' => 1,
|
||||
'members' => [ { 'name' => 'type',
|
||||
@@ -46,7 +51,7 @@ $dir = { 'name' => 'zone',
|
||||
};
|
||||
|
||||
# Add a new hint zone
|
||||
$conf = &get_config();
|
||||
my $conf = &get_config();
|
||||
&create_zone($dir, $conf, $in{'view'});
|
||||
&webmin_log("create", "hint", ".", \%in);
|
||||
&redirect("");
|
||||
|
||||
@@ -1,13 +1,18 @@
|
||||
#!/usr/local/bin/perl
|
||||
# create_master.cgi
|
||||
# Create a new master zone
|
||||
use strict;
|
||||
use warnings;
|
||||
# Globals
|
||||
our (%access, %text, %in, %config);
|
||||
|
||||
require './bind8-lib.pl';
|
||||
&ReadParse();
|
||||
&error_setup($text{'mcreate_err'});
|
||||
$access{'master'} || &error($text{'mcreate_ecannot'});
|
||||
$access{'ro'} && &error($text{'master_ero'});
|
||||
$conf = &get_config();
|
||||
my $conf = &get_config();
|
||||
my ($view, $viewname, $vconf);
|
||||
if ($in{'view'} ne '') {
|
||||
$view = $conf->[$in{'view'}];
|
||||
&can_edit_view($view) || &error($text{'master_eviewcannot'});
|
||||
@@ -21,7 +26,7 @@ else {
|
||||
|
||||
# validate inputs
|
||||
if ($in{'rev'}) {
|
||||
local($ipv4);
|
||||
my $ipv4;
|
||||
($ipv4 = &check_net_ip($in{'zone'})) ||
|
||||
$config{'support_aaaa'} &&
|
||||
($in{'zone'} =~ /^([\w:]+)(\/\d+)?$/ && &check_ip6address($1)) ||
|
||||
@@ -54,7 +59,7 @@ $in{'expiry'} =~ /^\d+$/ ||
|
||||
&error(&text('master_eexpiry', $in{'expiry'}));
|
||||
$in{'minimum'} =~ /^\d+$/ ||
|
||||
&error(&text('master_eminimum', $in{'minimum'}));
|
||||
$base = $access{'dir'} ne '/' ? $access{'dir'} :
|
||||
my $base = $access{'dir'} ne '/' ? $access{'dir'} :
|
||||
$config{'master_dir'} ? $config{'master_dir'} :
|
||||
&base_directory($conf);
|
||||
$base =~ s/\/+$// if ($base ne '/');
|
||||
@@ -63,14 +68,14 @@ if ($base !~ /^([a-z]:)?\//) {
|
||||
$base = &base_directory()."/".$base;
|
||||
}
|
||||
if ($in{'tmpl'}) {
|
||||
for($i=0; $config{"tmpl_$i"}; $i++) {
|
||||
@c = split(/\s+/, $config{"tmpl_$i"}, 3);
|
||||
for(my $i=0; $config{"tmpl_$i"}; $i++) {
|
||||
my @c = split(/\s+/, $config{"tmpl_$i"}, 3);
|
||||
if ($c[1] eq 'A' && !$c[2] && !&check_ipaddress($in{'ip'})) {
|
||||
&error($text{'master_eip'});
|
||||
}
|
||||
}
|
||||
}
|
||||
foreach $z (&find("zone", $vconf)) {
|
||||
foreach my $z (&find("zone", $vconf)) {
|
||||
if (lc($z->{'value'}) eq lc($in{'zone'})) {
|
||||
&error($text{'master_etaken'});
|
||||
}
|
||||
@@ -89,10 +94,11 @@ else {
|
||||
$view ? $view->{'value'} : undef);
|
||||
}
|
||||
-r &make_chroot($in{'file'}) && &error(&text('create_efile4', $in{'file'}));
|
||||
my @mips;
|
||||
if ($in{'onslave'}) {
|
||||
@mips = split(/\s+/, $in{'mip'});
|
||||
@mips || &error($text{'master_emips'});
|
||||
foreach $m (@mips) {
|
||||
foreach my $m (@mips) {
|
||||
&check_ipaddress($m) || &error(&text('master_emip', $m));
|
||||
}
|
||||
}
|
||||
@@ -109,12 +115,12 @@ if ($in{'onslave'}) {
|
||||
|
||||
if ($config{'relative_paths'}) {
|
||||
# Make path relative to BIND base directory
|
||||
$bdir = &base_directory($conf);
|
||||
my $bdir = &base_directory($conf);
|
||||
$in{'file'} =~ s/^\Q$bdir\/\E//;
|
||||
}
|
||||
|
||||
# create the zone directive
|
||||
$dir = { 'name' => 'zone',
|
||||
my $dir = { 'name' => 'zone',
|
||||
'values' => [ $in{'zone'} ],
|
||||
'type' => 1,
|
||||
'members' => [ { 'name' => 'type',
|
||||
@@ -125,12 +131,12 @@ $dir = { 'name' => 'zone',
|
||||
|
||||
# Add also-notify for slaves
|
||||
if ($in{'onslave'}) {
|
||||
@slaves = &list_slave_servers();
|
||||
my @slaves = &list_slave_servers();
|
||||
if (@slaves) {
|
||||
$also = { 'name' => 'also-notify',
|
||||
my $also = { 'name' => 'also-notify',
|
||||
'type' => 1,
|
||||
'members' => [ ] };
|
||||
foreach $s (@slaves) {
|
||||
foreach my $s (@slaves) {
|
||||
push(@{$also->{'members'}},
|
||||
{ 'name' => &to_ipaddress($s->{'host'}) });
|
||||
}
|
||||
@@ -148,7 +154,7 @@ if ($in{'onslave'}) {
|
||||
|
||||
# Create on slave servers
|
||||
if ($in{'onslave'} && $access{'remote'}) {
|
||||
@slaveerrs = &create_on_slaves($in{'zone'}, $mips[0],
|
||||
my @slaveerrs = &create_on_slaves($in{'zone'}, $mips[0],
|
||||
$in{'sfile_def'} == 1 ? "none" :
|
||||
$in{'sfile_def'} == 2 ? undef : $in{'sfile'},
|
||||
undef, $viewname);
|
||||
@@ -163,7 +169,7 @@ if ($in{'onslave'} && $access{'remote'}) {
|
||||
if (&have_dnssec_tools_support() && $in{'enable_dt'}) {
|
||||
my $err;
|
||||
my $nsec3 = 0;
|
||||
$zone = &get_zone_name($in{'zone'},
|
||||
my $zone = &get_zone_name($in{'zone'},
|
||||
$in{'view'} eq '' ? 'ANY' : $in{'view'});
|
||||
|
||||
if ($zone) {
|
||||
@@ -183,4 +189,3 @@ if (&have_dnssec_tools_support() && $in{'enable_dt'}) {
|
||||
|
||||
&redirect("edit_master.cgi?zone=$in{'zone'}&view=$in{'view'}");
|
||||
|
||||
|
||||
|
||||
@@ -4,6 +4,10 @@
|
||||
# Modified by Howard Wilkinson <howard@cohtech.co.uk> 7th NOvember 2001
|
||||
# Added a facility to create a slave zone with the master(s)
|
||||
# on a non-standard port
|
||||
use strict;
|
||||
use warnings;
|
||||
# Globals
|
||||
our (%access, %text, %in, %config);
|
||||
|
||||
require './bind8-lib.pl';
|
||||
&ReadParse();
|
||||
@@ -11,7 +15,8 @@ require './bind8-lib.pl';
|
||||
$access{'slave'} || &error($in{'type'} ? $text{'screate_ecannot1'}
|
||||
: $text{'screate_ecannot2'});
|
||||
$access{'ro'} && &error($text{'master_ero'});
|
||||
$conf = &get_config();
|
||||
my $conf = &get_config();
|
||||
my ($view, $vconf, $viewname);
|
||||
if ($in{'view'} ne '') {
|
||||
$view = $conf->[$in{'view'}];
|
||||
&can_edit_view($view) || &error($text{'master_eviewcannot'});
|
||||
@@ -25,7 +30,7 @@ else {
|
||||
|
||||
# validate inputs
|
||||
if ($in{'rev'}) {
|
||||
local($ipv4);
|
||||
my $ipv4;
|
||||
($ipv4 = &check_net_ip($in{'zone'})) ||
|
||||
$config{'support_aaaa'} &&
|
||||
($in{'zone'} =~ /^([\w:]+)(\/\d+)$/ || &check_ip6address($1)) ||
|
||||
@@ -44,21 +49,21 @@ else {
|
||||
&error(&text('create_edom', $in{'zone'}));
|
||||
}
|
||||
$in{'zone'} =~ s/\.$//;
|
||||
foreach $z (&find("zone", $vconf)) {
|
||||
foreach my $z (&find("zone", $vconf)) {
|
||||
if (lc($z->{'value'}) eq lc($in{'zone'})) {
|
||||
&error($text{'master_etaken'});
|
||||
}
|
||||
}
|
||||
$masterport = $in{'port_def'} ? undef : $in{'port'};
|
||||
@masters = split(/\s+/, $in{'masters'});
|
||||
foreach $m (@masters) {
|
||||
my $masterport = $in{'port_def'} ? undef : $in{'port'};
|
||||
my @masters = split(/\s+/, $in{'masters'});
|
||||
foreach my $m (@masters) {
|
||||
&check_ipaddress($m) || &check_ip6address($m) ||
|
||||
&error(&text('create_emaster', $m));
|
||||
}
|
||||
if (!@masters) {
|
||||
&error($text{'create_enone'});
|
||||
}
|
||||
$base = $access{'dir'} ne '/' ? $access{'dir'} :
|
||||
my $base = $access{'dir'} ne '/' ? $access{'dir'} :
|
||||
$config{'slave_dir'} ? $config{'slave_dir'} :
|
||||
&base_directory($conf);
|
||||
$base =~ s/\/+$// if ($base ne '/');
|
||||
@@ -66,6 +71,7 @@ if ($base !~ /^([a-z]:)?\//) {
|
||||
# Slave dir is relative .. make absolute
|
||||
$base = &base_directory()."/".$base;
|
||||
}
|
||||
my $file;
|
||||
if ($in{'file_def'} == 0) {
|
||||
# Use the entered filename
|
||||
$in{'file'} =~ /^\S+$/ ||
|
||||
@@ -83,21 +89,22 @@ elsif ($in{'file_def'} == 2) {
|
||||
$view ? $view->{'value'} : undef);
|
||||
}
|
||||
if ($file) {
|
||||
&open_tempfile(ZONE, ">".&make_chroot($file), 1, 1) ||
|
||||
my $ZONE;
|
||||
&open_tempfile($ZONE, ">". &make_chroot($file), 1, 1) ||
|
||||
&error(&text('create_efile3', $file, $!));
|
||||
&close_tempfile(ZONE);
|
||||
&close_tempfile($ZONE);
|
||||
&set_ownership(&make_chroot($file));
|
||||
}
|
||||
|
||||
# Create the structure
|
||||
@mdirs = map { { 'name' => $_ } } @masters;
|
||||
$masters = { 'name' => 'masters',
|
||||
my @mdirs = map { { 'name' => $_ } } @masters;
|
||||
my $masters = { 'name' => 'masters',
|
||||
'type' => 1,
|
||||
'members' => \@mdirs };
|
||||
if (defined($masterport)) {
|
||||
$masters->{'values'} = [ 'port', $masterport ];
|
||||
}
|
||||
$dir = { 'name' => 'zone',
|
||||
my $dir = { 'name' => 'zone',
|
||||
'values' => [ $in{'zone'} ],
|
||||
'type' => 1,
|
||||
'members' => [ { 'name' => 'type',
|
||||
@@ -117,13 +124,13 @@ if ($file) {
|
||||
&webmin_log("create", $in{'type'} ? 'slave' : 'stub', $in{'zone'}, \%in);
|
||||
|
||||
# Get the new zone's index
|
||||
$idx = &get_zone_index($in{'zone'}, $in{'view'});
|
||||
my $idx = &get_zone_index($in{'zone'}, $in{'view'});
|
||||
|
||||
&add_zone_access($in{'zone'});
|
||||
|
||||
# Create on slave servers
|
||||
if ($in{'onslave'} && $access{'remote'}) {
|
||||
@slaveerrs = &create_on_slaves($in{'zone'}, $masters[0],
|
||||
my @slaveerrs = &create_on_slaves($in{'zone'}, $masters[0],
|
||||
$in{'file_def'} == 1 ? "none" :
|
||||
$in{'file_def'} == 2 ? undef : $in{'sfile'},
|
||||
undef, $viewname);
|
||||
|
||||
@@ -1,19 +1,23 @@
|
||||
#!/usr/local/bin/perl
|
||||
# create_view.cgi
|
||||
use strict;
|
||||
use warnings;
|
||||
# Globals
|
||||
our (%access, %text, %in);
|
||||
|
||||
require './bind8-lib.pl';
|
||||
&error_setup($text{'vcreate_err'});
|
||||
&ReadParse();
|
||||
$add_to_file = &add_to_file();
|
||||
$pconf = &get_config_parent($add_to_file);
|
||||
$conf = $pconf->{'members'};
|
||||
my $add_to_file = &add_to_file();
|
||||
my $pconf = &get_config_parent($add_to_file);
|
||||
my $conf = $pconf->{'members'};
|
||||
$access{'views'} == 1 || &error($text{'vcreate_ecannot'});
|
||||
$access{'ro'} && &error($text{'vcreate_ecannot'});
|
||||
|
||||
# Validate inputs
|
||||
$in{'name'} =~ /^\S+$/ || &error($text{'vcreate_ename'});
|
||||
@views = &find("view", $conf);
|
||||
foreach $v (@views) {
|
||||
my @views = &find("view", $conf);
|
||||
foreach my $v (@views) {
|
||||
&error($text{'vcreate_etaken'}) if ($v->{'value'} eq $in{'name'});
|
||||
}
|
||||
$in{'class_def'} || $in{'class'} =~ /^[A-Za-z0-9]+$/ ||
|
||||
@@ -21,7 +25,7 @@ $in{'class_def'} || $in{'class'} =~ /^[A-Za-z0-9]+$/ ||
|
||||
|
||||
# Create the view
|
||||
&lock_file(&make_chroot($add_to_file));
|
||||
$dir = { 'name' => 'view',
|
||||
my $dir = { 'name' => 'view',
|
||||
'values' => [ $in{'name'}, $in{'class_def'} ? ( ) : ( $in{'class'} ) ],
|
||||
'type' => 1,
|
||||
'members' => [ ],
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
#!/usr/local/bin/perl
|
||||
# delegation_form.cgi
|
||||
# A form for creating a new delegation-only
|
||||
use strict;
|
||||
use warnings;
|
||||
# Globals
|
||||
our (%access, %text, %config);
|
||||
|
||||
require './bind8-lib.pl';
|
||||
$access{'delegation'} || &error($text{'dcreate_ecannot'});
|
||||
@@ -22,10 +26,10 @@ print &ui_table_row($text{'fcreate_dom'},
|
||||
&ui_textbox("zone", undef, 60), 3);
|
||||
|
||||
# In view
|
||||
$conf = &get_config();
|
||||
@views = &find("view", $conf);
|
||||
my $conf = &get_config();
|
||||
my @views = &find("view", $conf);
|
||||
if (@views) {
|
||||
($defview) = grep { lc($_->{'values'}->[0]) eq
|
||||
my ($defview) = grep { lc($_->{'values'}->[0]) eq
|
||||
lc($config{'default_view'}) } @views;
|
||||
print &ui_table_row($text{'mcreate_view'},
|
||||
&ui_select("view", $defview ? $defview->{'index'} : undef,
|
||||
|
||||
@@ -1,18 +1,22 @@
|
||||
#!/usr/local/bin/perl
|
||||
# Delete multiple records from a zone file
|
||||
use strict;
|
||||
use warnings;
|
||||
# Globals
|
||||
our (%access, %text, %in, %config);
|
||||
|
||||
require './bind8-lib.pl';
|
||||
&ReadParse();
|
||||
&error_setup($text{'drecs_err'});
|
||||
$zone = &get_zone_name_or_error($in{'zone'}, $in{'view'});
|
||||
$dom = $zone->{'name'};
|
||||
my $zone = &get_zone_name_or_error($in{'zone'}, $in{'view'});
|
||||
my $dom = $zone->{'name'};
|
||||
&can_edit_zone($zone) ||
|
||||
&error($text{'recs_ecannot'});
|
||||
&can_edit_type($in{'type'}, \%access) ||
|
||||
&error($text{'recs_ecannottype'});
|
||||
|
||||
# Find the records
|
||||
@d = split(/\0/, $in{'d'});
|
||||
my @d = split(/\0/, $in{'d'});
|
||||
@d || &error($text{'drecs_enone'});
|
||||
|
||||
# Check if confirmation is needed
|
||||
@@ -33,19 +37,20 @@ if (!$in{'confirm'} && $config{'confirm_rec'}) {
|
||||
}
|
||||
else {
|
||||
# Delete them
|
||||
@recs = &read_zone_file($zone->{'file'}, $dom);
|
||||
my @recs = &read_zone_file($zone->{'file'}, $dom);
|
||||
|
||||
foreach $d (sort { $b <=> $a } @d) {
|
||||
($num, $id) = split(/\//, $d, 2);
|
||||
$r = &find_record_by_id(\@recs, $id, $num);
|
||||
my %bumpedrev;
|
||||
foreach my $d (sort { $b <=> $a } @d) {
|
||||
my ($num, $id) = split(/\//, $d, 2);
|
||||
my $r = &find_record_by_id(\@recs, $id, $num);
|
||||
next if (!$r);
|
||||
if ($in{'rev'}) {
|
||||
# Find the reverse
|
||||
$fulloldvalue0 = &convert_to_absolute(
|
||||
my $fulloldvalue0 = &convert_to_absolute(
|
||||
$r->{'values'}->[0], $dom);
|
||||
$fulloldname = &convert_to_absolute(
|
||||
my $fulloldname = &convert_to_absolute(
|
||||
$r->{'name'}, $dom);
|
||||
($orevconf, $orevfile, $orevrec) = &find_reverse(
|
||||
my ($orevconf, $orevfile, $orevrec) = &find_reverse(
|
||||
$r->{'values'}->[0], $in{'view'});
|
||||
|
||||
if ($orevrec && &can_edit_reverse($orevconf) &&
|
||||
@@ -56,7 +61,7 @@ else {
|
||||
&lock_file(&make_chroot($orevrec->{'file'}));
|
||||
&delete_record($orevrec->{'file'} , $orevrec);
|
||||
&lock_file(&make_chroot($orevfile));
|
||||
@orrecs = &read_zone_file($orevfile, $orevconf->{'name'});
|
||||
my @orrecs = &read_zone_file($orevfile, $orevconf->{'name'});
|
||||
if (!$bumpedrev{$orevfile}++) {
|
||||
&bump_soa_record($orevfile, \@orrecs);
|
||||
}
|
||||
|
||||
@@ -1,24 +1,30 @@
|
||||
#!/usr/local/bin/perl
|
||||
# delete_zone.cgi
|
||||
# Delete an existing view and all its zones
|
||||
use strict;
|
||||
use warnings;
|
||||
# Globals
|
||||
our (%access, %text, %in);
|
||||
|
||||
require './bind8-lib.pl';
|
||||
&ReadParse();
|
||||
$parent = &get_config_parent();
|
||||
$conf = $parent->{'members'};
|
||||
$vconf = $conf->[$in{'index'}];
|
||||
my $parent = &get_config_parent();
|
||||
my $conf = $parent->{'members'};
|
||||
my $vconf = $conf->[$in{'index'}];
|
||||
$access{'views'} || &error($text{'view_ecannot'});
|
||||
|
||||
my @zones;
|
||||
if (!$in{'confirm'}) {
|
||||
# Ask the user if he is sure ..
|
||||
&ui_print_header(undef, $text{'vdelete_title'}, "");
|
||||
|
||||
# Build input for moving zones to another view
|
||||
@zones = &find("zone", $vconf->{'members'});
|
||||
my $movefield;
|
||||
if (@zones) {
|
||||
@moveopts = ( [ 0, $text{'vdelete_delete'} ],
|
||||
my @moveopts = ( [ 0, $text{'vdelete_delete'} ],
|
||||
[ 1, $text{'vdelete_root'} ] );
|
||||
@views = &find("view", $conf);
|
||||
my @views = &find("view", $conf);
|
||||
if (@views > 1) {
|
||||
push(@moveopts, [ 2, $text{'vdelete_move'}." ".
|
||||
&ui_select("newview", undef,
|
||||
@@ -44,6 +50,7 @@ if (!$in{'confirm'}) {
|
||||
|
||||
# deal with the zones in this view
|
||||
@zones = &find("zone", $vconf->{'members'});
|
||||
my $dest;
|
||||
if ($in{'mode'} == 1) {
|
||||
# Adding to top level
|
||||
$dest = &get_config_parent(&add_to_file());
|
||||
@@ -53,12 +60,12 @@ else {
|
||||
$dest = $conf->[$in{'newview'}];
|
||||
}
|
||||
&lock_file(&make_chroot($dest->{'file'}));
|
||||
foreach $z (@zones) {
|
||||
local $type = &find_value("type", $z->{'members'});
|
||||
foreach my $z (@zones) {
|
||||
my $type = &find_value("type", $z->{'members'});
|
||||
next if (!$type || $type eq 'hint');
|
||||
if ($in{'mode'} == 0) {
|
||||
# Delete the records file, and perhaps journal
|
||||
local $f = &find_value("file", $z->{'members'});
|
||||
my $f = &find_value("file", $z->{'members'});
|
||||
if ($f) {
|
||||
&delete_records_file($f->{'value'});
|
||||
}
|
||||
|
||||
@@ -1,28 +1,34 @@
|
||||
#!/usr/local/bin/perl
|
||||
# delete_zone.cgi
|
||||
# Delete an existing master, slave or secondary zone, and it's records file
|
||||
use strict;
|
||||
use warnings;
|
||||
# Globals from bind8-lib.pl
|
||||
our (%access, %text, %in, %config);
|
||||
# Globals from records-lib.pl
|
||||
our $ipv6revzone;
|
||||
|
||||
require './bind8-lib.pl';
|
||||
&ReadParse();
|
||||
|
||||
$zone = &get_zone_name_or_error($in{'zone'}, $in{'view'});
|
||||
($zconf, $conf, $parent) = &zone_to_config($zone);
|
||||
&can_edit_zone($zconf, $view) ||
|
||||
my $zone = &get_zone_name_or_error($in{'zone'}, $in{'view'});
|
||||
my ($zconf, $conf, $parent) = &zone_to_config($zone);
|
||||
&can_edit_zone($zconf) ||
|
||||
&error($text{'master_edelete'});
|
||||
|
||||
$access{'ro'} && &error($text{'master_ero'});
|
||||
$access{'delete'} || &error($text{'master_edeletecannot'});
|
||||
|
||||
$rev = ($zconf->{'value'} =~ /in-addr\.arpa/i ||
|
||||
my $rev = ($zconf->{'value'} =~ /in-addr\.arpa/i ||
|
||||
$zconf->{'value'} =~ /\.$ipv6revzone/i);
|
||||
$type = &find("type", $zconf->{'members'})->{'value'};
|
||||
my $type = &find("type", $zconf->{'members'})->{'value'};
|
||||
if (!$in{'confirm'} && $config{'confirm_zone'}) {
|
||||
# Ask the user if he is sure ..
|
||||
&ui_print_header(undef, $text{'delete_title'}, "",
|
||||
undef, undef, undef, undef, &restart_links());
|
||||
|
||||
# Check if deleted on slaves too
|
||||
@servers = &list_slave_servers();
|
||||
my @servers = &list_slave_servers();
|
||||
if ($type eq 'slave' || $type eq 'stub') {
|
||||
@servers = grep { $_->{'sec'} } @servers;
|
||||
}
|
||||
@@ -30,7 +36,7 @@ if (!$in{'confirm'} && $config{'confirm_zone'}) {
|
||||
@servers = ( );
|
||||
}
|
||||
|
||||
$zdesc = "<tt>".&ip6int_to_net(&arpa_to_ip($zconf->{'value'}))."</tt>";
|
||||
my $zdesc = "<tt>".&ip6int_to_net(&arpa_to_ip($zconf->{'value'}))."</tt>";
|
||||
print &ui_confirmation_form("delete_zone.cgi",
|
||||
$type eq 'hint' ? $text{'delete_mesg2'} :
|
||||
$type eq 'master' ? &text('delete_mesg', $zdesc) :
|
||||
@@ -50,14 +56,15 @@ if (!$in{'confirm'} && $config{'confirm_zone'}) {
|
||||
exit;
|
||||
}
|
||||
|
||||
my @recs;
|
||||
if (!$rev && $in{'rev'} && $type eq 'master') {
|
||||
# find and delete reverse records
|
||||
local $file = &find("file", $zconf->{'members'})->{'value'};
|
||||
my $file = &find("file", $zconf->{'members'})->{'value'};
|
||||
&lock_file(&make_chroot($file));
|
||||
@recs = &read_zone_file($file, $zconf->{'value'});
|
||||
foreach $r (@recs) {
|
||||
foreach my $r (@recs) {
|
||||
next if ($r->{'type'} ne "A" && $r->{'type'} ne "AAAA");
|
||||
($orevconf, $orevfile, $orevrec) =
|
||||
my ($orevconf, $orevfile, $orevrec) =
|
||||
&find_reverse($r->{'values'}->[0], $in{'view'});
|
||||
if ($orevrec && &can_edit_reverse($orevconf) &&
|
||||
$r->{'name'} eq $orevrec->{'values'}->[0] &&
|
||||
@@ -68,7 +75,7 @@ if (!$rev && $in{'rev'} && $type eq 'master') {
|
||||
&lock_file(&make_chroot($orevrec->{'file'}));
|
||||
&delete_record($orevrec->{'file'} , $orevrec);
|
||||
&lock_file(&make_chroot($orevfile));
|
||||
@orrecs = &read_zone_file($orevfile,
|
||||
my @orrecs = &read_zone_file($orevfile,
|
||||
$orevconf->{'name'});
|
||||
&bump_soa_record($orevfile, \@orrecs);
|
||||
&sign_dnssec_zone_if_key($orevconf, \@orrecs);
|
||||
@@ -77,12 +84,12 @@ if (!$rev && $in{'rev'} && $type eq 'master') {
|
||||
}
|
||||
elsif ($rev && $in{'rev'} && $type eq 'master') {
|
||||
# find and delete forward records
|
||||
local $file = &find("file", $zconf->{'members'})->{'value'};
|
||||
my $file = &find("file", $zconf->{'members'})->{'value'};
|
||||
&lock_file(&make_chroot($file));
|
||||
@recs = &read_zone_file($file, $zconf->{'value'});
|
||||
foreach $r (@recs) {
|
||||
foreach my $r (@recs) {
|
||||
next if ($r->{'type'} ne "PTR");
|
||||
($ofwdconf, $ofwdfile, $ofwdrec) =
|
||||
my ($ofwdconf, $ofwdfile, $ofwdrec) =
|
||||
&find_forward($r->{'values'}->[0]);
|
||||
if ($ofwdrec && &can_edit_zone($ofwdconf) &&
|
||||
($ofwdrec->{'type'} eq "A" &&
|
||||
@@ -93,7 +100,7 @@ elsif ($rev && $in{'rev'} && $type eq 'master') {
|
||||
&lock_file(&make_chroot($ofwdrec->{'file'}));
|
||||
&delete_record($ofwdrec->{'file'} , $ofwdrec);
|
||||
&lock_file(&make_chroot($ofwdfile));
|
||||
@ofrecs = &read_zone_file($ofwdfile,
|
||||
my @ofrecs = &read_zone_file($ofwdfile,
|
||||
$ofwdconf->{'name'});
|
||||
&bump_soa_record($ofwdfile, \@ofrecs);
|
||||
&sign_dnssec_zone_if_key($ofwdconf, \@ofrecs);
|
||||
@@ -102,7 +109,7 @@ elsif ($rev && $in{'rev'} && $type eq 'master') {
|
||||
}
|
||||
|
||||
# delete the records file
|
||||
$f = &find("file", $zconf->{'members'});
|
||||
my $f = &find("file", $zconf->{'members'});
|
||||
if ($f && $type ne 'hint') {
|
||||
&delete_records_file($f->{'value'});
|
||||
}
|
||||
@@ -122,9 +129,10 @@ if ($f && $type ne 'hint') {
|
||||
$zconf->{'value'}, \%in);
|
||||
|
||||
# remove from acl files
|
||||
my %wusers;
|
||||
&read_acl(undef, \%wusers);
|
||||
foreach $u (keys %wusers) {
|
||||
%uaccess = &get_module_acl($u);
|
||||
foreach my $u (keys %wusers) {
|
||||
my %uaccess = &get_module_acl($u);
|
||||
if ($uaccess{'zones'} ne '*') {
|
||||
$uaccess{'zones'} = join(' ', grep { $_ ne $zconf->{'value'} }
|
||||
split(/\s+/, $uaccess{'zones'}));
|
||||
@@ -135,7 +143,7 @@ foreach $u (keys %wusers) {
|
||||
# Also delete from slave servers
|
||||
delete($ENV{'HTTP_REFERER'});
|
||||
if ($in{'onslave'} && $access{'remote'}) {
|
||||
@slaveerrs = &delete_on_slaves($zone->{'name'}, undef, $zone->{'view'});
|
||||
my @slaveerrs = &delete_on_slaves($zone->{'name'}, undef, $zone->{'view'});
|
||||
if (@slaveerrs) {
|
||||
&error(&text('delete_errslave',
|
||||
"<p>".join("<br>", map { "$_->[0]->{'host'} : $_->[1]" }
|
||||
@@ -145,8 +153,3 @@ if ($in{'onslave'} && $access{'remote'}) {
|
||||
|
||||
&redirect("");
|
||||
|
||||
sub slave_error_handler
|
||||
{
|
||||
$slave_error = $_[0];
|
||||
}
|
||||
|
||||
|
||||
@@ -1,20 +1,19 @@
|
||||
#!/usr/local/bin/perl
|
||||
# Remove the signing key records for a zone
|
||||
use strict;
|
||||
use warnings;
|
||||
our (%access, %text, %in);
|
||||
|
||||
require './bind8-lib.pl';
|
||||
|
||||
local $zone;
|
||||
local $dom;
|
||||
local $desc;
|
||||
|
||||
&error_setup($text{'dt_zone_err'});
|
||||
&ReadParse();
|
||||
$zone = &get_zone_name_or_error($in{'zone'}, $in{'view'});
|
||||
$dom = $zone->{'name'};
|
||||
my $zone = &get_zone_name_or_error($in{'zone'}, $in{'view'});
|
||||
my $dom = $zone->{'name'};
|
||||
&can_edit_zone($zone) ||
|
||||
&error($text{'master_ecannot'});
|
||||
$access{'dnssec'} || &error($text{'dnssec_ecannot'});
|
||||
$desc = &ip6int_to_net(&arpa_to_ip($dom));
|
||||
my $desc = &ip6int_to_net(&arpa_to_ip($dom));
|
||||
|
||||
&ui_print_unbuffered_header($desc, $text{'dt_enable_title'}, "",
|
||||
undef, undef, undef, undef, &restart_links($zone));
|
||||
|
||||
@@ -1,19 +1,23 @@
|
||||
#!/usr/local/bin/perl
|
||||
# Remove the signing key records for a zone
|
||||
use strict;
|
||||
use warnings;
|
||||
our (%access, %text, %in);
|
||||
|
||||
require './bind8-lib.pl';
|
||||
&error_setup($text{'zonekey_err'});
|
||||
&ReadParse();
|
||||
$zone = &get_zone_name_or_error($in{'zone'}, $in{'view'});
|
||||
$dom = $zone->{'name'};
|
||||
my $zone = &get_zone_name_or_error($in{'zone'}, $in{'view'});
|
||||
my $dom = $zone->{'name'};
|
||||
&can_edit_zone($zone) ||
|
||||
&error($text{'master_ecannot'});
|
||||
$desc = &ip6int_to_net(&arpa_to_ip($dom));
|
||||
my $desc = &ip6int_to_net(&arpa_to_ip($dom));
|
||||
|
||||
&lock_file(&make_chroot(&absolute_path($zone->{'file'})));
|
||||
$key = &get_dnssec_key($zone);
|
||||
my $key = &get_dnssec_key($zone);
|
||||
my @keyfiles;
|
||||
if ($key) {
|
||||
@keyfiles = map { $k->{$_} } ('publicfile', 'privatefile');
|
||||
@keyfiles = map { $key->{$_} } ('publicfile', 'privatefile');
|
||||
}
|
||||
foreach my $k (@keyfiles) {
|
||||
&lock_file($k);
|
||||
|
||||
@@ -1,24 +1,27 @@
|
||||
#!/usr/local/bin/perl
|
||||
# dns_boot.cgi
|
||||
# Create an empty named.conf file and start the name server
|
||||
use strict;
|
||||
use warnings;
|
||||
our (%text, %config, %in);
|
||||
|
||||
require './bind8-lib.pl';
|
||||
&error_setup($text{'boot_err'});
|
||||
&ReadParse();
|
||||
|
||||
$config{'named_conf'} =~ /^(\S+)\/([^\/]+)$/;
|
||||
$conf_directory = $1;
|
||||
$pid_file = $config{'pid_file'} || "/var/run/named.pid";
|
||||
my $conf_directory = $1;
|
||||
my $pid_file = $config{'pid_file'} || "/var/run/named.pid";
|
||||
&lock_file(&make_chroot($config{'named_conf'}));
|
||||
&lock_file(&make_chroot("$conf_directory/db.cache"));
|
||||
$conf_temp = &transname("webmin.named.conf");
|
||||
open(BOOT, ">$conf_temp");
|
||||
print BOOT "options {\n";
|
||||
print BOOT "\tdirectory \"$conf_directory\";\n";
|
||||
print BOOT "\tpid-file \"$pid_file\";\n";
|
||||
print BOOT "\t};\n";
|
||||
print BOOT "\n";
|
||||
$chroot = &get_chroot();
|
||||
my $conf_temp = &transname("webmin.named.conf");
|
||||
open(my $BOOT, ">", $conf_temp);
|
||||
print $BOOT "options {\n";
|
||||
print $BOOT "\tdirectory \"$conf_directory\";\n";
|
||||
print $BOOT "\tpid-file \"$pid_file\";\n";
|
||||
print $BOOT "\t};\n";
|
||||
print $BOOT "\n";
|
||||
my $chroot = &get_chroot();
|
||||
if ($chroot && !-d $chroot) {
|
||||
mkdir($chroot, 0755);
|
||||
}
|
||||
@@ -32,14 +35,15 @@ if ($config{'slave_dir'} && !-d &make_chroot($config{'slave_dir'})) {
|
||||
mkdir(&make_chroot($config{'slave_dir'}), 0777);
|
||||
}
|
||||
if ($pid_file =~ /^(.*)\//) {
|
||||
$pid_dir = $1;
|
||||
my $pid_dir = $1;
|
||||
if (!-d &make_chroot($pid_dir)) {
|
||||
mkdir(&make_chroot($pid_dir), 0777);
|
||||
}
|
||||
}
|
||||
if (!-r &make_chroot($pid_file)) {
|
||||
&open_tempfile(PID, ">".&make_chroot($pid_file));
|
||||
&close_tempfile(PID);
|
||||
my $PID;
|
||||
&open_tempfile($PID, ">", &make_chroot($pid_file));
|
||||
&close_tempfile($PID);
|
||||
&set_ownership(&make_chroot($pid_file));
|
||||
}
|
||||
if ($in{real} == 0) {
|
||||
@@ -48,24 +52,24 @@ if ($in{real} == 0) {
|
||||
elsif ($in{real} == 1) {
|
||||
# Try to download the root servers file from
|
||||
# ftp://rs.internic.net/domain/named.root
|
||||
$err = &download_root_zone("$conf_directory/db.cache");
|
||||
my $err = &download_root_zone("$conf_directory/db.cache");
|
||||
&error($err) if ($err);
|
||||
print BOOT "zone \".\" {\n";
|
||||
print BOOT "\ttype hint;\n";
|
||||
print BOOT "\tfile \"$conf_directory/db.cache\";\n";
|
||||
print BOOT "\t};\n";
|
||||
print BOOT "\n";
|
||||
print $BOOT "zone \".\" {\n";
|
||||
print $BOOT "\ttype hint;\n";
|
||||
print $BOOT "\tfile \"$conf_directory/db.cache\";\n";
|
||||
print $BOOT "\t};\n";
|
||||
print $BOOT "\n";
|
||||
}
|
||||
elsif ($in{real} == 2) {
|
||||
# Use builtin db.cache
|
||||
&execute_command("cp ./db.cache ".&make_chroot("$conf_directory/db.cache"));
|
||||
print BOOT "zone \".\" {\n";
|
||||
print BOOT "\ttype hint;\n";
|
||||
print BOOT "\tfile \"$conf_directory/db.cache\";\n";
|
||||
print BOOT "\t};\n";
|
||||
print BOOT "\n";
|
||||
print $BOOT "zone \".\" {\n";
|
||||
print $BOOT "\ttype hint;\n";
|
||||
print $BOOT "\tfile \"$conf_directory/db.cache\";\n";
|
||||
print $BOOT "\t};\n";
|
||||
print $BOOT "\n";
|
||||
}
|
||||
close(BOOT);
|
||||
close($BOOT);
|
||||
©_source_dest($conf_temp, &make_chroot($config{'named_conf'}));
|
||||
unlink($conf_temp);
|
||||
&unlock_file(&make_chroot("$conf_directory/db.cache"));
|
||||
|
||||
@@ -1,19 +1,22 @@
|
||||
#!/usr/local/bin/perl
|
||||
# edit_delegation.cgi
|
||||
# Display options for an existing delegation-only
|
||||
use strict;
|
||||
use warnings;
|
||||
our (%access, %in, %text);
|
||||
|
||||
require './bind8-lib.pl';
|
||||
&ReadParse();
|
||||
|
||||
$in{'view'} = 'any' if ($in{'view'} eq '');
|
||||
$zone = &get_zone_name_or_error($in{'zone'}, $in{'view'});
|
||||
$z = &zone_to_config($zone);
|
||||
$zconf = $z->{'members'};
|
||||
$dom = $zone->{'name'};
|
||||
my $zone = &get_zone_name_or_error($in{'zone'}, $in{'view'});
|
||||
my $z = &zone_to_config($zone);
|
||||
my $zconf = $z->{'members'};
|
||||
my $dom = $zone->{'name'};
|
||||
&can_edit_zone($zone) ||
|
||||
&error($text{'master_ecannot'});
|
||||
|
||||
$desc = &ip6int_to_net(&arpa_to_ip($dom));
|
||||
my $desc = &ip6int_to_net(&arpa_to_ip($dom));
|
||||
&ui_print_header($desc, $text{'delegation_title'}, "",
|
||||
undef, undef, undef, undef, &restart_links());
|
||||
|
||||
@@ -24,6 +27,7 @@ if (!$access{'ro'}) {
|
||||
print &ui_buttons_start();
|
||||
|
||||
# Move to another view
|
||||
my $bconf = &get_config();
|
||||
print &move_zone_button($bconf, $zone->{'viewindex'}, $in{'zone'});
|
||||
|
||||
# Delete zone
|
||||
|
||||
@@ -1,22 +1,25 @@
|
||||
#!/usr/local/bin/perl
|
||||
# edit_forward.cgi
|
||||
# Display options for an existing forward zone
|
||||
use strict;
|
||||
use warnings;
|
||||
our (%access, %in, %text);
|
||||
|
||||
require './bind8-lib.pl';
|
||||
&ReadParse();
|
||||
|
||||
$in{'view'} = 'any' if ($in{'view'} eq '');
|
||||
$zone = &get_zone_name_or_error($in{'zone'}, $in{'view'});
|
||||
$z = &zone_to_config($zone);
|
||||
$zconf = $z->{'members'};
|
||||
$dom = $zone->{'name'};
|
||||
my $zone = &get_zone_name_or_error($in{'zone'}, $in{'view'});
|
||||
my $z = &zone_to_config($zone);
|
||||
my $zconf = $z->{'members'};
|
||||
my $dom = $zone->{'name'};
|
||||
&can_edit_zone($zone) ||
|
||||
&error($text{'master_ecannot'});
|
||||
|
||||
$dom = $zone->{'name'};
|
||||
&can_edit_zone($zone, $view) ||
|
||||
&can_edit_zone($zone) ||
|
||||
&error($text{'fwd_ecannot'});
|
||||
$desc = &ip6int_to_net(&arpa_to_ip($dom));
|
||||
my $desc = &ip6int_to_net(&arpa_to_ip($dom));
|
||||
&ui_print_header($desc, $text{'fwd_title'}, "",
|
||||
undef, undef, undef, undef, &restart_links());
|
||||
|
||||
@@ -48,6 +51,7 @@ else {
|
||||
print &ui_buttons_start();
|
||||
|
||||
# Move to another view
|
||||
my $bconf = &get_config();
|
||||
print &move_zone_button($bconf, $zone->{'viewindex'}, $in{'zone'});
|
||||
|
||||
# Delete zone
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
#!/usr/local/bin/perl
|
||||
# edit_hint.cgi
|
||||
# Display information about the hint (root) zone
|
||||
use strict;
|
||||
use warnings;
|
||||
our (%in, %text);
|
||||
|
||||
require './bind8-lib.pl';
|
||||
&ReadParse();
|
||||
$zone = &get_zone_name_or_error($in{'zone'}, $in{'view'});
|
||||
$dom = $zone->{'name'};
|
||||
my $zone = &get_zone_name_or_error($in{'zone'}, $in{'view'});
|
||||
my $dom = $zone->{'name'};
|
||||
&can_edit_zone($zone) ||
|
||||
&error($text{'hint_ecannot'});
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user