Compare commits

..

24 Commits
2.302 ... 2.303

Author SHA1 Message Date
Joe Cooper
1cb53ff00a Merge pull request #2435 from swelljoe/fix-makemoduledeb
We don't have to build debs on Debian
2025-03-16 18:43:50 -05:00
Joe Cooper
8043aabf18 We don't have to build debs on Debian 2025-03-16 18:43:04 -05:00
Ilia Ross
3a94ea3788 Update translations 2025-03-15 21:52:41 +02:00
Jamie Cameron
2183088706 Merge branch 'master' of github.com:webmin/webmin 2025-03-15 09:59:08 -07:00
Jamie Cameron
3736f26a84 Handle case where --to-destination is followed by a bare IPv6 address
https://github.com/webmin/webmin/issues/2434
2025-03-15 09:58:46 -07:00
Ilia Ross
f2307ae1fa Fix to stop using MD5 module that was deprecated 2025-03-14 14:42:49 +02:00
Jamie Cameron
45ef8d11c1 Merge branch 'master' of github.com:webmin/webmin 2025-03-13 17:13:44 -07:00
Jamie Cameron
b17df99700 Check the UID that is used for file operations 2025-03-13 17:13:37 -07:00
Ilia Ross
a3f2e64315 Update date 2025-03-14 00:29:51 +02:00
Ilia Ross
853bde5e1a Update CHANGELOG.md 2025-03-14 00:24:23 +02:00
Ilia Ross
083f9b09a2 Ensure li tags are always closed 2025-03-14 00:10:12 +02:00
Jamie Cameron
81e8fc6c37 Merge branch 'master' of github.com:webmin/webmin 2025-03-12 21:39:35 -07:00
Jamie Cameron
b9d2910d60 Run the man command as nobody, to prevent misuse of the section param 2025-03-12 21:38:04 -07:00
Ilia Ross
574f66c251 Merge pull request #2433 from MacSteini/master
Update de
2025-03-12 18:24:45 +02:00
MacSteini
56a231e78d Update de 2025-03-12 11:44:43 +00:00
Ilia Ross
85e7f6c292 Fix to filter out scope identifier
* We could support it but it would be much more work
2025-03-10 13:32:39 +02:00
Ilia Ross
9fa35cc2c9 Fix to save IPv6 nameservers 2025-03-10 13:31:32 +02:00
Jamie Cameron
23cb74fa35 Add function to show warnings in records 2025-03-09 16:34:14 -07:00
Jamie Cameron
e1d87fac1c Some sendmail hash files end with .cdb
https://forum.virtualmin.com/t/issues-editing-sendmail-8-18-1-on-webmin-2-302/132460/7
2025-03-07 17:21:25 -08:00
Jamie Cameron
9ba9bfd524 Merge branch 'master' of github.com:webmin/webmin 2025-03-06 19:03:47 -08:00
Jamie Cameron
6c5c5fa225 No need for modprobe since IPv6 is always in the kernel these days
https://github.com/webmin/webmin/issues/2432
2025-03-06 18:51:14 -08:00
Ilia Ross
495a196b2f Fix type when adding addr 2025-03-06 14:22:49 +02:00
Jamie Cameron
50eb61b89e Use the ip command instead of ifconfig 2025-03-05 20:56:42 -08:00
Jamie Cameron
3cb358fe9e Preserve ordering in module.info files 2025-03-05 11:23:09 -08:00
49 changed files with 146 additions and 33 deletions

View File

@@ -1,5 +1,13 @@
## Changelog
#### 2.303 (March 14, 2025)
* Fix permissions error when attempting to open a temp file for writing
* Fix Network Configuration module to use `ip` command instead of `ifconfig` on Debian systems
* Fix to correctly save IPv6 nameservers in Network Configuration module
* Fix to run `man` as `nobody` to prevent section param misuse in System Documentation module
* Add support for Sendmail hash files ending with `.cdb`
* Update German translations
#### 2.302 (March 3, 2025)
* Add ability to preserve allow/deny IPs in Webmin Configuration module #2427
* Add enhancements to module config saving to ensure reliability under all conditions

View File

@@ -3174,6 +3174,36 @@ my $out = &backquote_command(
return $? ? split(/\r?\n/, $out) : ( );
}
# check_zone_warnings(&zone-name|&zone)
# Returns a list of warnings from checking some zone file, if any
sub check_zone_warnings
{
my ($zone) = @_;
my ($zonename, $zonefile);
if ($zone->{'values'}) {
# Zone object
$zonename = $zone->{'values'}->[0];
my $f = &find("file", $zone->{'members'});
$zonefile = $f->{'values'}->[0];
}
else {
# Zone name object
$zonename = $zone->{'name'};
$zonefile = $zone->{'file'};
}
my $absfile = &make_chroot(&absolute_path($zonefile));
my $out = &backquote_command(
$config{'checkzone'}." ".quotemeta($zonename)." ".
quotemeta($absfile)." 2>&1 </dev/null");
my @rv;
foreach my $l (split(/\r?\n/, $out)) {
if ($l =~ /^\Q$absfile\E:\d+:\s*(.*)/) {
push(@rv, $1);
}
}
return @rv;
}
# supports_check_conf()
# Returns 1 if BIND configuration checking is supported, 0 if not
sub supports_check_conf

View File

@@ -20,12 +20,22 @@ my $desc = &ip6int_to_net(&arpa_to_ip($zone->{'name'}));
my $file = &make_chroot(&absolute_path($zone->{'file'}));
my @errs = &check_zone_records($zone);
my @warns = &check_zone_warnings($zone);
if (@errs) {
# Show list of errors
print "<b>",&text('check_errs', "<tt>$file</tt>"),"</b><p>\n";
print "<ul>\n";
foreach my $e (@errs) {
print "<li>".&html_escape($e)."\n";
print "<li>".&html_escape($e)."</li>\n";
}
print "</ul>\n";
}
elsif (@warns) {
# Just show warnings
print "<b>",&text('check_warns', "<tt>$file</tt>"),"</b><p>\n";
print "<ul>\n";
foreach my $e (@warns) {
print "<li>".&html_escape($e)."</li>\n";
}
print "</ul>\n";
}

View File

@@ -21,7 +21,7 @@ if (@errs) {
print "<b>",&text('ncheck_errs', "<tt>$file</tt>"),"</b><p>\n";
print "<ul>\n";
foreach my $e (@errs) {
print "<li>".&html_escape($e)."\n";
print "<li>".&html_escape($e)."</li>\n";
}
print "</ul>\n";
}

View File

@@ -1173,6 +1173,7 @@ rmass_clash=إنشاء حتى لو كان السجل موجود بالفعل؟
check_title=تحقق السجلات
check_ecannot=غير مسموح لك بالتحقق من السجلات
check_errs=The following errors were found in the records file $1 ..
check_warns=تم العثور على التحذيرات التالية في ملف السجلات $1 ..
check_allok=No errors were found in the records file $1.
ncheck_title=تحقق BIND التكوين

View File

@@ -59,6 +59,8 @@ log_delete_recs2=Изтрити $1 записи в зона $2
massdelete_vwarn=Някои зони са свързани с домейна Virtualmin $1 и затова не трябва да се изтриват тук!
massdelete_vwarn2=Някои зони са свързани с домейна Virtualmin $1 и $2 други и затова не трябва да се изтриват тук!
check_warns=Следните предупреждения бяха намерени във файла със записи $1 ..
zonekey_algorithm=DNSSEC алгоритъм : $1
zonekey_ds_keytag=Ключов етикет
zonekey_ds_alg=Алгоритъм

View File

@@ -63,6 +63,8 @@ log_delete_recs2=S'han suprimit $1 registres a la zona $2
massdelete_vwarn=Algunes zones estan associades al domini Virtualmin $1, per tant, no hauríem de suprimir-les aquí.
massdelete_vwarn2=Algunes zones estan associades al domini Virtualmin $1 i $2, per tant, no hauríem de suprimir-les.
check_warns=S'han trobat els advertiments següents al fitxer de registres $1 ..
zonekey_algorithm=Algorisme DNSSEC : $1
zonekey_ds_keytag=Etiqueta clau
zonekey_ds_alg=Algorisme

View File

@@ -289,6 +289,7 @@ rmass_eclash2=.. záznam se stejným názvem a stejnou hodnotou $1 již existuje
check_title=Zkontrolujte záznamy
check_ecannot=Není dovoleno kontrolovat záznamy
check_errs=V souboru záznamů $1 byly nalezeny následující chyby.
check_warns=V souboru záznamů $1 byla nalezena následující varování ..
check_allok=V souboru záznamů $1 nebyly nalezeny žádné chyby.
ncheck_title=Zkontrolujte BIND Config

View File

@@ -1173,6 +1173,7 @@ rmass_clash=Opret, selvom der allerede findes en post?
check_title=Tjek poster
check_ecannot=Du har ikke tilladelse til at kontrollere poster
check_errs=Følgende fejl blev fundet i posteringsfilen $1 ..
check_warns=Følgende advarsler blev fundet i postfilen $1 ..
check_allok=Der blev ikke fundet nogen fejl i postfilen $1.
ncheck_title=Kontroller BIND Config

View File

@@ -1173,6 +1173,7 @@ rmass_clash=Erstellen, auch wenn Eintrag bereits existiert?
check_title=Einträge prüfen
check_ecannot=Sie sind nicht berechtigt, Einträge zu überprüfen.
check_errs=Die folgenden Fehler wurden in der Eintragsdatei $1 gefunden ..
check_warns=Die folgenden Warnungen wurden in der Eintragsdatei $1 gefunden ..
check_allok=Keine Fehler in der Eintragsdatei $1 gefunden.
ncheck_title=BIND-Konfiguration prüfen

View File

@@ -1173,6 +1173,7 @@ rmass_clash=Δημιουργήστε ακόμα και αν υπάρχει ήδ
check_title=Ελέγξτε τις εγγραφές
check_ecannot=Δεν επιτρέπεται να ελέγχετε τα αρχεία
check_errs=Τα παρακάτω σφάλματα βρέθηκαν στο αρχείο εγγραφών $1 ..
check_warns=Οι ακόλουθες προειδοποιήσεις βρέθηκαν στο αρχείο εγγραφών $1 ..
check_allok=Δεν βρέθηκαν σφάλματα στο αρχείο εγγραφών $1.
ncheck_title=Ελέγξτε το BIND Config

View File

@@ -1173,6 +1173,7 @@ rmass_clash=Create even if record already exists?
check_title=Check Records
check_ecannot=You are not allowed to check records
check_errs=The following errors were found in the records file $1 ..
check_warns=The following warnings were found in the records file $1 ..
check_allok=No errors were found in the records file $1.
ncheck_title=Check BIND Config

View File

@@ -489,6 +489,7 @@ rmass_clash=¿Crear incluso si el registro ya existe?
check_title=Verificar registros
check_ecannot=No tiene permiso para verificar registros
check_errs=Se encontraron los siguientes errores en el archivo de registros $1 ..
check_warns=Las siguientes advertencias se encontraron en el archivo de registros $1 ..
check_allok=No se encontraron errores en el archivo de registros $1.
ncheck_title=Verifique la configuración de BIND

View File

@@ -1173,6 +1173,7 @@ rmass_clash=Sortu erregistroa dagoeneko badago?
check_title=Egiaztatu Erregistroak
check_ecannot=Ezin duzu erregistroak egiaztatu
check_errs=Ondorengo akatsak aurkitu dira $1 erregistroko fitxategian.
check_warns=Honako abisu hauek $1 erregistro fitxategian aurkitu dira ..
check_allok=Ez da akatsik aurkitu $1 erregistroko fitxategian.
ncheck_title=Begiratu BIND Config

View File

@@ -429,6 +429,7 @@ rmass_clash=حتی اگر سابقه قبلاً وجود داشته باشد ا
check_title=سوابق را بررسی کنید
check_ecannot=شما مجاز به بررسی سوابق نیستید
check_errs=The following errors were found in the records file $1 ..
check_warns=اخطارهای زیر در فایل سوابق $1 یافت شد ..
check_allok=No errors were found in the records file $1.
ncheck_title=پیکربندی BIND را بررسی کنید

View File

@@ -1173,6 +1173,7 @@ rmass_clash=Luo vaikka tietue on jo olemassa?
check_title=Tarkista tietueet
check_ecannot=Et voi tarkistaa tietueita
check_errs=Seuraavat virheet löytyivät tietuetiedostosta $1 ..
check_warns=Tietuetiedostosta $1.. löytyi seuraavat varoitukset ..
check_allok=Tietuetiedostossa $1 ei löytynyt virheitä.
ncheck_title=Tarkista BIND-kokoonpano

View File

@@ -44,6 +44,8 @@ value_NAPTR3_P=Action spécifique au protocole
log_delete_recs2=$1 enregistrements supprimés dans la zone $2
check_warns=Les avertissements suivants ont été trouvés dans le fichier d'enregistrements $1 ..
zonekey_algorithm=Algorithme DNSSEC  : $1
zonekey_ds_keytag=Porte-clés
zonekey_ds_alg=Algorithme

View File

@@ -1173,6 +1173,7 @@ rmass_clash=Kreirajte čak i ako zapis već postoji?
check_title=Provjerite zapise
check_ecannot=Nije vam dopušteno provjeravati zapise
check_errs=Sljedeće pogreške pronađene su u datoteci zapisa $1.
check_warns=Sljedeća upozorenja pronađena su u datoteci zapisa $1 ..
check_allok=U datoteci zapisa $1 nisu pronađene pogreške.
ncheck_title=Označite BIND Config

View File

@@ -167,6 +167,8 @@ massdelete_vwarn2=Egyes zónák a (z) $1 és a (z) $2 Virtualmin domainhez vanna
rmass_esign=.. kész, de az aláírás sikertelen : $1
check_warns=A következő figyelmeztetések találhatók a(z) $1.. rekordfájlban ..
dnssec_secs=másodperc
dnssectools_title=DNSSEC-Tools automatizálás

View File

@@ -562,6 +562,7 @@ rmass_clash=Crea anche se il record esiste già?
check_title=Controlla i record
check_ecannot=Non è consentito controllare i record
check_errs=I seguenti errori sono stati trovati nel file dei record $1 ..
check_warns=Sono stati trovati i seguenti avvisi nel file di record $1 ..
check_allok=Nessun errore trovato nel file dei record $1.
ncheck_title=Controlla la configurazione BIND

View File

@@ -221,6 +221,7 @@ rmass_name2=(ドメイン名に<tt>@</tt>を入力します)
rmass_esign=..完了しましたが、署名に失敗しました:$1
rmass_eclash2=..同じ名前と同じ値を持つレコード$1はすでに存在します。
check_warns=レコード ファイル $1 に次の警告が見つかりました。
ncheck_title=BIND Configを確認してください
ncheck_ecannot=BIND構成を確認することはできません
ncheck_errs=BIND構成ファイル$1または参照ゾーンファイルで次のエラーが見つかりました。

View File

@@ -747,6 +747,7 @@ rmass_clash=레코드가 이미 존재하더라도 작성 하시겠습니까?
check_title=기록 확인
check_ecannot=기록을 확인할 수 없습니다
check_errs=레코드 파일 $1에서 다음 오류가 발견되었습니다.
check_warns=다음 경고가 $1 레코드 파일에서 발견되었습니다 ..
check_allok=레코드 파일 $1에서 오류가 발견되지 않았습니다.
ncheck_title=BIND 구성 확인

View File

@@ -1171,6 +1171,7 @@ rmass_clash=Buat walaupun rekod sudah wujud?
check_title=Semak Rekod
check_ecannot=Anda tidak dibenarkan menyemak rekod
check_errs=Kesalahan berikut telah dijumpai dalam fail rekod $1 ..
check_warns=Amaran berikut ditemui dalam fail rekod $1 ..
check_allok=Tiada ralat ditemui dalam fail rekod $1.
ncheck_title=Semak BIND Config

View File

@@ -157,6 +157,8 @@ massdelete_vwarn2=Sommige zones zijn geassocieerd met het Virtualmin-domein $1 e
rmass_esign=.. klaar, maar ondertekenen mislukt : $1
check_warns=De volgende waarschuwingen zijn gevonden in het recordbestand $1 ..
dnssec_secs=seconden
zonekey_publicfile=Bestand met openbare sleutel : $1

View File

@@ -44,6 +44,8 @@ value_NAPTR3_P=Protokollspesifikk handling
log_delete_recs2=Slettet $1 poster i sone $2
check_warns=Følgende advarsler ble funnet i postfilen $1 ..
zonekey_algorithm=DNSSEC-algoritme : $1
zonekey_ds_keytag=Nøkkelbrikke
zonekey_ds_alg=Algoritme

View File

@@ -107,6 +107,8 @@ log_delete_recs2=Usunięto $1 rekordów w strefie $2
massdelete_vwarn=Niektóre strefy są powiązane z domeną Virtualmin $1, dlatego nie należy ich tutaj usuwać!
massdelete_vwarn2=Niektóre strefy są powiązane z domeną Virtualmin $1 i $2 innymi, dlatego nie należy ich tutaj usuwać!
check_warns=Znaleziono następujące ostrzeżenia w pliku rekordów $1 ..
dnssec_secs=sekundy
dt_zone_zskrolldesc=Wymuś najazd klucza podpisującego strefę

View File

@@ -839,6 +839,7 @@ rmass_clash=Criar mesmo se o registro já existir?
check_title=Verificar registros
check_ecannot=Você não tem permissão para verificar registros
check_errs=Os seguintes erros foram encontrados no arquivo de registros $1 ..
check_warns=Os seguintes avisos foram encontrados no arquivo de registros $1 ..
check_allok=Nenhum erro foi encontrado no arquivo de registros $1.
ncheck_title=Verifique a configuração do BIND

View File

@@ -197,6 +197,8 @@ rmass_name2=(Digite <tt>@</tt> para o nome do domínio)
rmass_esign=.. feito, mas a assinatura falhou : $1
rmass_eclash2=.. um registro com o mesmo nome e o mesmo valor $1 já existe.
check_warns=Os seguintes avisos foram encontrados no arquivo de registros $1 ..
dnssec_secs=segundos
dnssectools_title=Automação de Ferramentas DNSSEC

View File

@@ -589,6 +589,7 @@ rmass_clash=Создать, даже если запись уже существ
check_title=Проверьте записи
check_ecannot=Вам не разрешено проверять записи
check_errs=Следующие ошибки были обнаружены в файле записей $1 ..
check_warns=В файле записей $1 были обнаружены следующие предупреждения ..
check_allok=В файле записей $1 ошибок не обнаружено.
ncheck_title=Проверьте BIND Config

View File

@@ -1173,6 +1173,7 @@ rmass_clash=Vytvoriť, aj keď už záznam existuje?
check_title=Skontrolujte záznamy
check_ecannot=Nemáte oprávnenie kontrolovať záznamy
check_errs=V súbore záznamov $1 sa našli nasledujúce chyby.
check_warns=V súbore záznamov $1 sa našli nasledujúce upozornenia ..
check_allok=V súbore záznamov $1 sa nenašli žiadne chyby.
ncheck_title=Skontrolujte BIND Config

View File

@@ -314,6 +314,7 @@ rmass_clash=Skapa även om posten redan finns?
check_title=Kontrollera poster
check_ecannot=Du får inte kontrollera poster
check_errs=Följande fel hittades i registerfilen $1 ..
check_warns=Följande varningar hittades i postfilen $1 ..
check_allok=Inga fel hittades i registerfilen $1.
ncheck_title=Kontrollera BIND Config

View File

@@ -335,6 +335,7 @@ rmass_clash=Kayıt zaten mevcut olsa bile oluşturulsun mu?
check_title=Kayıtları Kontrol Et
check_ecannot=Kayıtları kontrol etme izniniz yok
check_errs=$1 kayıt dosyasında aşağıdaki hatalar bulundu.
check_warns=$1 kayıt dosyasında aşağıdaki uyarılar bulundu ..
check_allok=$1 kayıt dosyasında hata bulunamadı.
ncheck_title=BIND Config'i kontrol edin

View File

@@ -589,6 +589,7 @@ rmass_clash=Створити, навіть якщо запис уже існує
check_title=Перевірте записи
check_ecannot=Вам заборонено перевіряти записи
check_errs=У файлі записів $1 виявлено такі помилки.
check_warns=Наступні попередження знайдено у файлі записів $1 ..
check_allok=У файлі записів $1 не виявлено помилок.
ncheck_title=Перевірте налаштування BIND

View File

@@ -564,6 +564,7 @@ rmass_clash=即使记录已经存在也创建吗?
check_title=检查记录
check_ecannot=您无权检查记录
check_errs=在记录文件$1中发现以下错误。
check_warns=在记录文件 $1 中发现下列警告。
check_allok=在记录文件$1中未找到错误。
ncheck_title=检查BIND配置

View File

@@ -845,6 +845,7 @@ rmass_clash=即使記錄已經存在也創建嗎?
check_title=檢查記錄
check_ecannot=您無權檢查記錄
check_errs=在記錄文件$1中發現以下錯誤。
check_warns=在記錄文件 $1 中發現下列警告。
check_allok=在記錄文件$1中未找到錯誤。
ncheck_title=檢查BIND配置

View File

@@ -141,6 +141,12 @@ if (($table->{'name'} eq 'nat' && $rule->{'chain'} ne 'POSTROUTING') &&
$dpfrom = $2;
$dpto = $4;
}
elsif (&check_ipvx_ipaddress($rule->{'to-destination'}->[1])) {
$dipfrom = $rule->{'to-destination'}->[1];
$dipto = "";
$dpfrom = "";
$dpto = "";
}
}
print &ui_table_row($text{'edit_dnat'},
&ui_radio("dnatdef", $dipfrom eq "" ? 1 : 0,

View File

@@ -39,7 +39,7 @@ else {
"icmp6-addr-unreachable", "icmp6-port-unreachable",
"echo-reply", "tcp-reset" );
$ipvx_todestpattern='^\[([0-9A-Fa-f:]+)](\-([0-9A-Fa-f:]+))?(:(\d+)(\-(\d+))?)?$';
$ipvx_todestpattern='^\[([0-9A-Fa-f:]+)\](\-([0-9A-Fa-f:]+))?(:(\d+)(\-(\d+))?)?$';
# set IP Version
&set_ipvx_version('ipv6');

View File

@@ -259,12 +259,13 @@ if ($min && !$release) {
# Fill an associative array with name=value pairs from a file
sub read_file
{
open(ARFILE, $_[0]) || return 0;
my ($file, $data_hash, $order) = @_;
open(ARFILE, $file) || return 0;
while(<ARFILE>) {
chop;
if (!/^#/ && /^([^=]+)=(.*)$/) {
$_[1]->{$1} = $2;
push(@{$_[2]}, $1);
$data_hash->{$1} = $2;
push(@$order, $1) if ($order);
}
}
close(ARFILE);
@@ -275,11 +276,20 @@ return 1;
# Write out the contents of an associative array as name=value lines
sub write_file
{
local($arr);
$arr = $_[1];
open(ARFILE, "> $_[0]");
foreach $k (keys %$arr) {
print ARFILE "$k=$$arr{$k}\n";
my ($file, $data_hash) = @_;
my (%old, @order);
&read_file($file, \%old, \@order);
open(ARFILE, ">$file");
my %done;
foreach my $k (@order) {
if (exists($data_hash->{$k}) && !$done{$k}++) {
print ARFILE $k,"=",$data_hash->{$k},"\n";
}
}
foreach $k (keys %$data_hash) {
if (!exists($old{$k}) && !$done{$k}++) {
print ARFILE $k,"=",$data_hash->{$k},"\n";
}
}
close(ARFILE);
}

View File

@@ -24,9 +24,6 @@ my $copyright_file = "$debian_dir/copyright";
my $changelog_file = "$debian_dir/changelog";
my $files_file = "$debian_dir/files";
-r "/etc/debian_version" ||
die RED, "makemoduledeb.pl must be run on Debian", RESET;
# Parse command-line args
my ($force_theme, $url, $upstream, $provides, $debdepends, $debrecommends,
$no_prefix, $force_usermin, $release, $allow_overwrite, $final_mod,

View File

@@ -33,7 +33,8 @@ SECT: foreach $sec (@sects) {
$cmd = $ocmd;
$cmd =~ s/PAGE/$qpage/;
$cmd =~ s/SECTION/$qsec/;
$out = &backquote_command("$cmd 2>&1", 1);
$out = &backquote_command(
&command_as_user("nobody", 0, $cmd)." 2>&1", 1);
if ($out !~ /^.*no manual entry/i && $out !~ /^.*no entry/i &&
$out !~ /^.*nothing appropriate/i) {
# Found it

View File

@@ -254,7 +254,12 @@ if(($cfg->{'vlan'} == 1) && ($gconfig{'os_version'} < 5)) {
}
}
if(($cfg->{'vlan'} == 1) && ($cfg->{'mtu'})) {
push(@options, ['pre-up', '/sbin/ifconfig '.$cfg->{'physical'}.' mtu '.$cfg->{'mtu'}]);
if (&has_command("ip")) {
push(@options, ['pre-up', 'ip link set mtu '.$cfg->{'mtu'}.' dev '.$cfg->{'physical'}]);
}
else {
push(@options, ['pre-up', '/sbin/ifconfig '.$cfg->{'physical'}.' mtu '.$cfg->{'mtu'}]);
}
}
# Find the existing interface section
@@ -328,9 +333,6 @@ else {
my @options6;
my @address6 = @{$cfg->{'address6'}};
my @netmask6 = @{$cfg->{'netmask6'}};
if (@address6 || $cfg->{'auto6'}) {
push(@options6, ['pre-up', '/sbin/modprobe -q ipv6 ; /bin/true']);
}
if (@address6) {
push(@options6, [ "address", shift(@address6) ]);
push(@options6, [ "netmask", shift(@netmask6) ]);
@@ -338,7 +340,12 @@ if (@address6) {
while(@address6) {
my $a = shift(@address6);
my $n = shift(@netmask6);
push(@options6, [ "up","ifconfig $cfg->{'fullname'} inet6 add $a/$n" ]);
if (&has_command("ip")) {
push(@options6, [ "up", "ip addr add $a/$n dev $cfg->{'fullname'}" ]);
}
else {
push(@options6, [ "up", "ifconfig $cfg->{'fullname'} inet6 add $a/$n" ]);
}
}
if ($cfg->{'gateway6'}) {
push(@options6, [ "gateway", $cfg->{'gateway6'} ]);

View File

@@ -230,8 +230,10 @@ my $method6 = $iface->{'auto6'} ? "auto" :
# Update nameservers
my @ns = $iface->{'nameserver'} ? @{$iface->{'nameserver'}} : ();
&save_nm_config($cfg, "ipv4", "dns",
@ns ? join(" ", @ns) : undef);
my @ns4 = grep { &check_ipaddress($_) } @ns;
my @ns6 = grep { &check_ip6address($ns6) } @ns;
&save_nm_config($cfg, "ipv4", "dns", @ns4 ? join(" ", @ns4) : undef) if (@ns4);
&save_nm_config($cfg, "ipv6", "dns", @ns6 ? join(" ", @ns6) : undef) if (@ns6);
my @sr = $iface->{'search'} ? @{$iface->{'search'}} : ();
&save_nm_config($cfg, "ipv4", "dns-search",
@sr ? join(" ", @sr) : undef);

View File

@@ -21,9 +21,12 @@ for($i=0; defined($ns = $in{"nameserver_$i"}); $i++) {
$ns = $in{"nameserver_$i"};
$ns =~ s/^\s+//; $ns =~ s/\s+$//;
if ($ns) {
&check_ipaddress_any($ns) ||
my $nns = $ns;
# Just remove scope identifier (%interface) for simplicity
$nns =~ s/\%.*$//;
&check_ipaddress_any($nns) ||
&error(&text('dns_ens', &html_escape($ns)));
push(@{$dns->{'nameserver'}}, $ns);
push(@{$dns->{'nameserver'}}, $nns);
}
}
if ($in{'name0'}) {

View File

@@ -226,11 +226,11 @@ sub find_textfile
local($conf, $dbm) = @_;
if ($conf) { return $conf; }
elsif (!$dbm) { return undef; }
elsif ($dbm =~ /^(.*)\.(db|dbm|pag|dir|hash)$/i && -r $1) {
elsif ($dbm =~ /^(.*)\.(db|dbm|pag|dir|hash|cdb)$/i && -r $1) {
# Database is like /etc/virtusertable.db, text is /etc/virtusertable
return $1;
}
elsif ($dbm =~ /^(.*)\.(db|dbm|pag|dir|hash)$/i && -r "$1.txt") {
elsif ($dbm =~ /^(.*)\.(db|dbm|pag|dir|hash|cdb)$/i && -r "$1.txt") {
# Database is like /etc/virtusertable.db, text is /etc/virtusertable.txt
return "$1.txt";
}
@@ -238,7 +238,7 @@ elsif (-r "$dbm.txt") {
# Database is like /etc/virtusertable, text is /etc/virtusertable.txt
return "$dbm.txt";
}
elsif ($dbm =~ /^(.*)\.(db|dbm|pag|dir|hash)$/i) {
elsif ($dbm =~ /^(.*)\.(db|dbm|pag|dir|hash|cdb)$/i) {
# Database is like /etc/virtusertable.db, text is /etc/virtusertable,
# but doesn't exist yet.
return $1;

View File

@@ -10,7 +10,7 @@ our (%text, %in, %access, $squid_version, %config, $module_name);
require './squid-lib.pl';
if ($config{'crypt_conf'} == 1) {
eval "use MD5";
eval "use Digest::MD5";
if ($@) {
&error(&text('eauth_nomd5', $module_name));
}

View File

@@ -9,7 +9,7 @@ no warnings 'uninitialized';
our (%text, %in, %access, $squid_version, %config, $module_name);
require './squid-lib.pl';
if ($config{'crypt_conf'} == 1) {
eval "use MD5";
eval "use Digest::MD5";
if ($@) {
&error(&text('eauth_nomd5', $module_name));
}

View File

@@ -13,7 +13,7 @@ sub useradmin_create_user
my ($uinfo) = @_;
return if (!$config{'sync_create'});
if ($config{'crypt_conf'} == 1) {
eval "use MD5";
eval "use Digest::MD5";
return if ($@);
}
return if ($uinfo->{'passmode'} != 3);
@@ -78,7 +78,7 @@ sub useradmin_modify_user
my ($uinfo) = @_;
return if (!$config{'sync_modify'});
if ($config{'crypt_conf'} == 1) {
eval "use MD5";
eval "use Digest::MD5";
return if ($@);
}
my $conf = &get_config();

View File

@@ -1 +1 @@
2.302
2.303

View File

@@ -10675,7 +10675,7 @@ else {
my $directopen = 0;
my $tmp = &open_tempfile($file);
my $ok = open($fh, ">$tmp");
if (!$ok && $! =~ /permission/i && $< != 0) {
if (!$ok && $! =~ /permission/i && $> != 0) {
# Could not open temp file .. try opening actual file
# instead directly
$ok = open($fh, ">$file");