tor-commits
Threads by month
- ----- 2025 -----
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
January 2016
- 19 participants
- 1450 discussions
[translation/tails-misc_completed] Update translations for tails-misc_completed
by translation@torproject.org 15 Jan '16
by translation@torproject.org 15 Jan '16
15 Jan '16
commit ebef2c4a227bdab0b6ccb30fec48a1821ca71344
Author: Translation commit bot <translation(a)torproject.org>
Date: Fri Jan 15 18:15:44 2016 +0000
Update translations for tails-misc_completed
---
hu.po | 216 ++++++++++++++++++++++++++++++++++-------------------------------
1 file changed, 114 insertions(+), 102 deletions(-)
diff --git a/hu.po b/hu.po
index cb16e52..228376e 100644
--- a/hu.po
+++ b/hu.po
@@ -3,19 +3,20 @@
# This file is distributed under the same license as the PACKAGE package.
#
# Translators:
-# benewfy <benewfy(a)gmail.com>, 2015
+# benewfy <benewfy(a)gmail.com>, 2015-2016
# Blackywantscookies <gaborcika(a)citromail.hu>, 2014
# Blackywantscookies <gaborcika(a)citromail.hu>, 2014
# iskr <iscreamd(a)gmail.com>, 2013
# Lajos Pasztor <mrlajos(a)gmail.com>, 2014
+# Robert Zsolt <physx_ms(a)outlook.com>, 2016
# vargaviktor <viktor.varga(a)gmail.com>, 2013,2015
msgid ""
msgstr ""
"Project-Id-Version: The Tor Project\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-09-20 19:32+0200\n"
-"PO-Revision-Date: 2015-10-17 19:50+0000\n"
-"Last-Translator: benewfy <benewfy(a)gmail.com>\n"
+"POT-Creation-Date: 2016-01-11 21:00+0100\n"
+"PO-Revision-Date: 2016-01-15 18:15+0000\n"
+"Last-Translator: Robert Zsolt <physx_ms(a)outlook.com>\n"
"Language-Team: Hungarian (http://www.transifex.com/otf/torproject/language/hu/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -23,15 +24,15 @@ msgstr ""
"Language: hu\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-#: config/chroot_local-includes/etc/NetworkManager/dispatcher.d/60-tor-ready.sh:43
+#: config/chroot_local-includes/etc/NetworkManager/dispatcher.d/60-tor-ready.sh:39
msgid "Tor is ready"
-msgstr "Tor készen áll."
+msgstr "A Tor készen áll."
-#: config/chroot_local-includes/etc/NetworkManager/dispatcher.d/60-tor-ready.sh:44
+#: config/chroot_local-includes/etc/NetworkManager/dispatcher.d/60-tor-ready.sh:40
msgid "You can now access the Internet."
-msgstr "Most már hozzáférsz az internethez."
+msgstr "Most már hozzáféhetsz az internethez."
-#: config/chroot_local-includes/etc/whisperback/config.py:64
+#: config/chroot_local-includes/etc/whisperback/config.py:65
#, python-format
msgid ""
"<h1>Help us fix your bug!</h1>\n"
@@ -46,29 +47,31 @@ msgid ""
"an opportunity for eavesdroppers, like your email or Internet provider, to\n"
"confirm that you are using Tails.\n"
"</p>\n"
-msgstr "<h1>Segítsen kijavítani a hibát!</h1>\n<p>Olvassa el <a href=\"%s\">hibabejelentési útmutatót</a>.</p>\n<p><strong>Kérjük a szükségesnél több személyes információt ne adjon meg!</strong></p>\n<h2>Az email címe megadásáról</h2>\n<p>\nHa megadja nekünk az email címét, fel tudjuk venni a kapcsolatot a probléma tisztázásához. Az esetek többségében ez a legtöbb hibabejelentéshez szükséges, a hibabejelentés többsége sajnos e nélkül használhatatlan.\n\nA másik oldalról nézve ez lehetővé teszi egy lehallgatónak, legyen ez email lehallgató, vagy ISP hogy megtudja hogy használja a Tails-t.\n</p>\n"
+msgstr "<h1>Segítsen kijavítani a hibát!</h1>\n<p>Olvasd el <a href=\"%s\">hibabejelentési útmutató</a>.</p>\n<p><strong>Kérjük a szükségesnél több személyes információt ne adjon meg!</strong></p>\n<h2>Az email címed megadásáról</h2>\n<p>\nHa megadja nekünk az email címét, fel tudjuk venni a kapcsolatot a probléma tisztázásához. Az esetek többségében ez a legtöbb hibabejelentéshez szükséges, nélküle nem tudunk segíteni a hibaelhárításban.\n\nViszont ez lehetővé teszi egy harmadik fél részére, pl. internet- vagy email szolgáltató, hogy tudomást szerezzen arról, hogy esetenként proxy átjárókat használ az interneteléréshez.\n</p>\n"
#: config/chroot_local-includes/usr/local/bin/electrum:14
msgid "Persistence is disabled for Electrum"
-msgstr "A kapcsolatok közötti állapotmegőrzés (perzisztencia) kikapcsolt az Electum esetében"
+msgstr "A kapcsolatok közötti állapotmegőrzés (perzisztencia) kikapcsolt az Electum használatakor."
#: config/chroot_local-includes/usr/local/bin/electrum:16
msgid ""
"When you reboot Tails, all of Electrum's data will be lost, including your "
"Bitcoin wallet. It is strongly recommended to only run Electrum when its "
"persistence feature is activated."
-msgstr "Ha újraindítja a Tailst, akkor minden Electum adat el fog veszni, beleértve a Bitcoin pénztárcát is. Erősen ajánlott, hogy csak akkor futtasa az Eletum-ot, ha kapcsolatok közötti állapot megőrzése (perzisztencia) be van kapcsolva."
+msgstr "Ha újraindítja a Tails-t, akkor minden Electum adat el fog veszni, beleértve a Bitcoin pénztárcáját is. Erősen ajánlott, hogy csak akkor futtasa az Electum-ot, ha a kapcsolatok közötti állapot megőrzése (perzisztencia) be van kapcsolva."
#: config/chroot_local-includes/usr/local/bin/electrum:18
msgid "Do you want to start Electrum anyway?"
-msgstr "Szeretné elindítani az Electumot mindenféleképpen?"
+msgstr "Mindenképp el szeretné indítani az Electum-ot?"
#: config/chroot_local-includes/usr/local/bin/electrum:20
+#: config/chroot_local-includes/usr/local/bin/icedove:22
#: config/chroot_local-includes/usr/local/sbin/unsafe-browser:36
msgid "_Launch"
msgstr "_Indítás"
#: config/chroot_local-includes/usr/local/bin/electrum:21
+#: config/chroot_local-includes/usr/local/bin/icedove:23
#: config/chroot_local-includes/usr/local/sbin/unsafe-browser:37
msgid "_Exit"
msgstr "_Kilépés"
@@ -95,7 +98,7 @@ msgstr "Vágólap aláírása/titkosítása Publikus _kulcsokkal"
#: config/chroot_local-includes/usr/local/bin/gpgApplet:200
msgid "_Decrypt/Verify Clipboard"
-msgstr "Vágólap _Kititkosítása/Ellenőrzése"
+msgstr "Vágólap _Visszafejtése/Hitelesítése"
#: config/chroot_local-includes/usr/local/bin/gpgApplet:204
msgid "_Manage Keys"
@@ -103,29 +106,29 @@ msgstr "_Kulcsok kezelése"
#: config/chroot_local-includes/usr/local/bin/gpgApplet:208
msgid "_Open Text Editor"
-msgstr "_Szövegeditor megnyitása"
+msgstr "_Szövegszerkesztő megnyitása"
#: config/chroot_local-includes/usr/local/bin/gpgApplet:252
msgid "The clipboard does not contain valid input data."
-msgstr "A vágólap nem tartalmaz érvényes bemeneti adatot"
+msgstr "A vágólap nem tartalmaz érvényes adatot."
#: config/chroot_local-includes/usr/local/bin/gpgApplet:303
#: config/chroot_local-includes/usr/local/bin/gpgApplet:305
#: config/chroot_local-includes/usr/local/bin/gpgApplet:307
msgid "Unknown Trust"
-msgstr "Ismeretlen megbízhatóság"
+msgstr "Nem megbízható"
#: config/chroot_local-includes/usr/local/bin/gpgApplet:309
msgid "Marginal Trust"
-msgstr "Kis megbízhatóság"
+msgstr "Kevéssé megbízható"
#: config/chroot_local-includes/usr/local/bin/gpgApplet:311
msgid "Full Trust"
-msgstr "Teljes megbizhatóság"
+msgstr "Nagyon megbízható"
#: config/chroot_local-includes/usr/local/bin/gpgApplet:313
msgid "Ultimate Trust"
-msgstr "Legmagasabb megbizhatóság"
+msgstr "Teljesen megbízható"
#: config/chroot_local-includes/usr/local/bin/gpgApplet:366
msgid "Name"
@@ -165,7 +168,7 @@ msgstr "Címzettek elrejtése"
msgid ""
"Hide the user IDs of all recipients of an encrypted message. Otherwise "
"anyone that sees the encrypted message can see who the recipients are."
-msgstr "A titkosított üzenet összes címzettje felhasználói ID-jének elrejtése. Egyébként aki látja a titkosított üzenetet, megtudhatja kik voltak még a címzettek."
+msgstr "Rejtse el az összes címzett ID-jét titkosított üzenet küldése esetén. Egyébként aki látja a titkosított üzenetet, megtudhatja ki volt a többi címzett."
#: config/chroot_local-includes/usr/local/bin/gpgApplet:513
msgid "Sign message as:"
@@ -177,7 +180,7 @@ msgstr "Válasszon kulcsokat"
#: config/chroot_local-includes/usr/local/bin/gpgApplet:557
msgid "Do you trust these keys?"
-msgstr "Megbízik ebben a kulcsban?"
+msgstr "Megbízik ezekben a kulcsokban?"
#: config/chroot_local-includes/usr/local/bin/gpgApplet:560
msgid "The following selected key is not fully trusted:"
@@ -189,7 +192,7 @@ msgstr[1] "Az alábbi kiválaszott kulcsok nem teljesen megbízhatóak:"
msgid "Do you trust this key enough to use it anyway?"
msgid_plural "Do you trust these keys enough to use them anyway?"
msgstr[0] "Megbízik ebben a kulcsban annyira, hogy használja ennek ellenére?"
-msgstr[1] "Megbízik ezekben a kulcsban annyira, hogy használja ennek ellenére?"
+msgstr[1] "Megbízik ezekben a kulcsokban annyira, hogy mindenképp használja őket?"
#: config/chroot_local-includes/usr/local/bin/gpgApplet:591
msgid "No keys selected"
@@ -199,16 +202,16 @@ msgstr "Nincs kulcs kiválasztva"
msgid ""
"You must select a private key to sign the message, or some public keys to "
"encrypt the message, or both."
-msgstr "Az üzenet aláírásához ki kell választani egy privát kulcsot, vagy valamelyik nyílvános kulcsot esetleg mindkettőt az üzenet titkosításához."
+msgstr "Ki kell választania egy privát kulcsot az üzenet aláírásához, vagy egy publikusat a titkosításához. Egyszerre használhatja mindkét opciót is."
#: config/chroot_local-includes/usr/local/bin/gpgApplet:621
msgid "No keys available"
-msgstr "Nem érhetőek el kulcsok"
+msgstr "Nincs elérhető kulcs"
#: config/chroot_local-includes/usr/local/bin/gpgApplet:623
msgid ""
"You need a private key to sign messages or a public key to encrypt messages."
-msgstr "Szükséged van egy privát kulcsra az üzenet aláírásához vagy egy nyílvános kulcsra a titkosításhoz."
+msgstr "Szüksége van egy privát kulcsra az üzenet aláírásához vagy egy nyílvános kulcsra a titkosításához."
#: config/chroot_local-includes/usr/local/bin/gpgApplet:751
msgid "GnuPG error"
@@ -228,15 +231,27 @@ msgstr "GnuPG kimenet:"
#: config/chroot_local-includes/usr/local/bin/gpgApplet:853
msgid "Other messages provided by GnuPG:"
-msgstr "Egyéb GnuPG által adott üzenetek:"
+msgstr "Egyéb üzenetek a GnuPG-től:"
-#: config/chroot_local-includes/usr/local/lib/shutdown-helper-applet:39
-msgid "Shutdown Immediately"
-msgstr "Azonnali leállítás"
+#: config/chroot_local-includes/usr/local/bin/icedove:18
+msgid "The <b>Claws Mail</b> persistence feature is activated."
+msgstr "A <b>Claws Mail</b> perzisztencia aktiválva."
+
+#: config/chroot_local-includes/usr/local/bin/icedove:20
+msgid ""
+"If you have emails saved in <b>Claws Mail</b>, you should <a "
+"href='https://tails.boum.org/doc/anonymous_internet/claws_mail_to_icedove'>migrate"
+" your data</a> before starting <b>Icedove</b>."
+msgstr "Ha vannak elmentett emailjei a <b>Claws Mail-ben</b>, akkor <a href='https://tails.boum.org/doc/anonymous_internet/claws_mail_to_icedove'>másolja át az adatait</a> az <b>Icedove</b> indítása előtt."
-#: config/chroot_local-includes/usr/local/lib/shutdown-helper-applet:40
-msgid "Reboot Immediately"
-msgstr "Újraindítást most"
+#: config/chroot_local-includes/usr/share/gnome-shell/extensions/shutdown-helper@tails.boum.org/extension.js:71
+msgid "Restart"
+msgstr "Újraindítás"
+
+#: config/chroot_local-includes/usr/share/gnome-shell/extensions/shutdown-helper@tails.boum.org/extension.js:74
+#: ../config/chroot_local-includes/usr/share/applications/tails-shutdown.desktop.in.h:1
+msgid "Power Off"
+msgstr "Leállítás"
#: config/chroot_local-includes/usr/local/bin/tails-about:16
msgid "not available"
@@ -249,19 +264,19 @@ msgstr "Tails"
#: config/chroot_local-includes/usr/local/bin/tails-about:24
msgid "The Amnesic Incognito Live System"
-msgstr "The Amnesic Incognito Live System"
+msgstr "Az Amnesic Incognito Live System"
#: config/chroot_local-includes/usr/local/bin/tails-about:25
#, python-format
msgid ""
"Build information:\n"
"%s"
-msgstr "Fordítási információ:\n%s"
+msgstr "Verzió információ:\n%s"
#: config/chroot_local-includes/usr/local/bin/tails-about:27
#: ../config/chroot_local-includes/usr/share/applications/tails-about.desktop.in.h:1
msgid "About Tails"
-msgstr "A Tails-ról"
+msgstr "A Tails-ről"
#: config/chroot_local-includes/usr/local/sbin/tails-additional-software:118
#: config/chroot_local-includes/usr/local/sbin/tails-additional-software:124
@@ -275,76 +290,68 @@ msgid ""
"The upgrade failed. This might be due to a network problem. Please check "
"your network connection, try to restart Tails, or read the system log to "
"understand better the problem."
-msgstr "A frissítés nem sikerült. Ennek lehetséges hálózati hiba az oka. Kérlek ellenőrizd a hálózati kapcsolatot, próbáld újraindítani a Tails-t vagy olvasd át a rendszer naplófájlokat, a hiba okának megértéséhez."
+msgstr "A frissítés nem sikerült. Ezt okozhatta hálózati hiba. Kérem ellenőrizze a hálózati kapcsolatát, próbálja újraindítani a Tails-t vagy olvassa át a rendszernaplót, a hiba okának megkereséséhez."
#: config/chroot_local-includes/usr/local/sbin/tails-additional-software:125
msgid "The upgrade was successful."
msgstr "A frissítés sikeres volt."
-#: config/chroot_local-includes/usr/local/bin/tails-htp-notify-user:52
+#: config/chroot_local-includes/usr/local/lib/tails-htp-notify-user:52
msgid "Synchronizing the system's clock"
msgstr "A rendszer órájának szinkronizálása"
-#: config/chroot_local-includes/usr/local/bin/tails-htp-notify-user:53
+#: config/chroot_local-includes/usr/local/lib/tails-htp-notify-user:53
msgid ""
"Tor needs an accurate clock to work properly, especially for Hidden "
"Services. Please wait..."
-msgstr "Tor-nak szüksége van egy megbízható órára a megfelelő működéshez, különösképp a rejtett szolgáltatásokhoz. Kérlek várj..."
+msgstr "A Tor-nak szüksége van egy megbízható órára a megfelelő működéshez, különösen a rejtett szolgáltatásokhoz. Kérlem várjon..."
-#: config/chroot_local-includes/usr/local/bin/tails-htp-notify-user:87
+#: config/chroot_local-includes/usr/local/lib/tails-htp-notify-user:87
msgid "Failed to synchronize the clock!"
msgstr "Az óra szinkronizálása nem sikerült!"
-#: config/chroot_local-includes/usr/local/sbin/tails-restricted-network-detector:38
-msgid "Network connection blocked?"
-msgstr "Hálózati kapcsolat blokkolva van?"
-
-#: config/chroot_local-includes/usr/local/sbin/tails-restricted-network-detector:40
-msgid ""
-"It looks like you are blocked from the network. This may be related to the "
-"MAC spoofing feature. For more information, see the <a "
-"href=\\\"file:///usr/share/doc/tails/website/doc/first_steps/startup_options/mac_spoofing.en.html#blocked\\\">MAC"
-" spoofing documentation</a>."
-msgstr "Úgy néz ki blokkolva van a hálózati kapcsolatod. Lehet köze van a MAC cím átejtés eljáráshoz. További információkért nézd meg ezt <a href=\\\"file:///usr/share/doc/tails/website/doc/first_steps/startup_options/mac_spoofing.en.html#blocked\\\">MAC spoofing dokumentáció</a>."
-
-#: config/chroot_local-includes/usr/local/bin/tails-security-check:151
+#: config/chroot_local-includes/usr/local/bin/tails-security-check:146
msgid "This version of Tails has known security issues:"
msgstr "A Tails ezen verziója ismert biztonsági problémákkal rendelkezik:"
-#: config/chroot_local-includes/usr/local/sbin/tails-spoof-mac:45
+#: config/chroot_local-includes/usr/local/bin/tails-security-check:156
+msgid "Known security issues"
+msgstr "Ismert biztonsági problémák"
+
+#: config/chroot_local-includes/usr/local/lib/tails-spoof-mac:51
#, sh-format
msgid "Network card ${nic} disabled"
msgstr "Hálózati kártya ${nic} letiltva"
-#: config/chroot_local-includes/usr/local/sbin/tails-spoof-mac:46
+#: config/chroot_local-includes/usr/local/lib/tails-spoof-mac:52
#, sh-format
msgid ""
"MAC spoofing failed for network card ${nic_name} (${nic}) so it is temporarily disabled.\n"
-"You might prefer to restart Tails and disable MAC spoofing. See the <a href='file:///usr/share/doc/tails/website/doc/first_steps/startup_options/mac_spoofing.en.html'>documentation</a>."
-msgstr "MAC spoofing nem sikerült a ${nic_name} (${nic}) hálózati kártyához így átmenetileg le lett tiltva.\nTalán újra kell indítanod a Tails-t és letiltani a MAC spoofing-ot. Nézd meg a dokumentációt itt <a href='file:///usr/share/doc/tails/website/doc/first_steps/startup_options/mac_spoofing.en.html'></a>."
+"You might prefer to restart Tails and disable MAC spoofing."
+msgstr "A MAC cím váltás a következő hálózati kártyán sikertelen volt: ${nic_name} (${nic}), úgyhogy a szolgáltatás átmenetileg le lett tiltva.\nÚjraindíthatja a Tails-t és letilthatja a MAC cím cserét."
-#: config/chroot_local-includes/usr/local/sbin/tails-spoof-mac:55
+#: config/chroot_local-includes/usr/local/lib/tails-spoof-mac:61
msgid "All networking disabled"
msgstr "Minden hálózat letiltva"
-#: config/chroot_local-includes/usr/local/sbin/tails-spoof-mac:56
+#: config/chroot_local-includes/usr/local/lib/tails-spoof-mac:62
#, sh-format
msgid ""
"MAC spoofing failed for network card ${nic_name} (${nic}). The error recovery also failed so all networking is disabled.\n"
-"You might prefer to restart Tails and disable MAC spoofing. See the <a href='file:///usr/share/doc/first_steps/startup_options/mac_spoofing.en.html'>documentation</a>."
-msgstr "MAC spoofing nem sikerült a ${nic_name} (${nic}) hálózati kártyához így átmenetileg le lett tiltva.\nTalán újra kell indítanod a Tails-t és letiltani a MAC spoofing-ot. Nézd meg a dokumentációt itt <a href='file:///usr/share/doc/tails/website/doc/first_steps/startup_options/mac_spoofing.en.html'></a>."
+"You might prefer to restart Tails and disable MAC spoofing."
+msgstr "A MAC cím váltás a következő hálózati kártyán sikertelen volt: ${nic_name} (${nic}). A hibaelhárítás is sikertelen volt, úgyhogy a hálózati kártya le lett tiltva.\nÚjraindíthatja a Tails-t és letilthatja a MAC cím cserét."
-#: config/chroot_local-includes/usr/local/bin/tails-upgrade-frontend-wrapper:19
+#: config/chroot_local-includes/usr/local/bin/tails-upgrade-frontend-wrapper:18
#: config/chroot_local-includes/usr/local/sbin/unsafe-browser:22
msgid "error:"
msgstr "hiba:"
-#: config/chroot_local-includes/usr/local/bin/tails-upgrade-frontend-wrapper:20
+#: config/chroot_local-includes/usr/local/bin/tails-upgrade-frontend-wrapper:19
#: config/chroot_local-includes/usr/local/sbin/unsafe-browser:23
msgid "Error"
msgstr "Hiba"
-#: config/chroot_local-includes/usr/local/bin/tails-upgrade-frontend-wrapper:40
+#: config/chroot_local-includes/usr/local/bin/tails-upgrade-frontend-wrapper:39
msgid ""
"<b>Not enough memory available to check for upgrades.</b>\n"
"\n"
@@ -355,36 +362,45 @@ msgid ""
"\n"
"Or do a manual upgrade.\n"
"See https://tails.boum.org/doc/first_steps/upgrade#manual"
-msgstr "<b>Nincs elég memória a frissítések ellenőrzéséhez.</b>\n\nGyőződj meg róla a rendszer megfelel a szükséges követeleményeknek a Tails futtatásához.\nNézd meg a fájlt:///usr/share/doc/tails/website/doc/about/requirements.en.html\n\nPróbáld újraindítani a Tails-t és frissíteni ismét.\n\nVagy frissíts manuálisan.\nNézd meg ezt: https://tails.boum.org/doc/first_steps/upgrade#manual"
+msgstr "<b>Nincs elég memória a frissítések ellenőrzéséhez.</b>\n\nGyőződjön meg róla a számítógépe megfelel a minimális rendszerkövetelményeknek.\nTovábbi információt itt talál: file:///usr/share/doc/tails/website/doc/about/requirements.en.html\n\nIndítsa újra a Tail-s és próbálja meg mégegyszer frissíteni.\n\nVagy frissítse manuálisan: https://tails.boum.org/doc/first_steps/upgrade#manual"
-#: config/chroot_local-includes/usr/local/bin/tails-virt-notify-user:53
+#: config/chroot_local-includes/usr/local/lib/tails-virt-notify-user:67
msgid "Warning: virtual machine detected!"
-msgstr "Figyelem: virtuális gép érzékelve!"
+msgstr "Figyelem: virtualizált gép /VM/ érzékelve!"
-#: config/chroot_local-includes/usr/local/bin/tails-virt-notify-user:55
+#: config/chroot_local-includes/usr/local/lib/tails-virt-notify-user:69
msgid ""
"Both the host operating system and the virtualization software are able to "
"monitor what you are doing in Tails."
-msgstr "Mind a gazda operációs rendszer, mind a virtualizációs szoftver képes megfigyelni amit a Tails-ben tesz."
+msgstr "Az operációs rendszer, és a virtualizációs szoftver is képes megfigyelni amit a Tails-ben csinál!"
+
+#: config/chroot_local-includes/usr/local/lib/tails-virt-notify-user:72
+msgid "Warning: non-free virtual machine detected!"
+msgstr "Figyelem: nem ingyenes virtualizációs szoftver /VM/ érzékelve!"
-#: config/chroot_local-includes/usr/local/bin/tails-virt-notify-user:57
+#: config/chroot_local-includes/usr/local/lib/tails-virt-notify-user:74
msgid ""
-"<a "
-"href='file:///usr/share/doc/tails/website/doc/advanced_topics/virtualization.en.html#security'>Learn"
-" more...</a>"
-msgstr "<a href='file:///usr/share/doc/tails/website/doc/advanced_topics/virtualization.en.html#security'>Tudjon meg többet...</a>"
+"Both the host operating system and the virtualization software are able to "
+"monitor what you are doing in Tails. Only free software can be considered "
+"trustworthy, for both the host operating system and the virtualization "
+"software."
+msgstr "Az operációs rendszer, és a virtualizációs szoftver is képes megfigyelni amit a Tails-ben csinál! Általában csak az ingyenes szoftverek megbízhatóak, ezért ajánljuk hogy használjon ingyenes operációs rendszert és virtualizációs szoftvert."
+
+#: config/chroot_local-includes/usr/local/lib/tails-virt-notify-user:79
+msgid "Learn more"
+msgstr "További információ"
#: config/chroot_local-includes/usr/local/bin/tor-browser:29
msgid "Tor is not ready"
-msgstr "Tor még nem működésre kész"
+msgstr "A Tor még nem áll készen a működésre"
#: config/chroot_local-includes/usr/local/bin/tor-browser:30
msgid "Tor is not ready. Start Tor Browser anyway?"
-msgstr "Tor még nem működésre kész. Elindítod a Tor Browser-t ennek ellenére?"
+msgstr "A Tor még nem áll készen a működésre. Mindenképp el szeretné indítani?"
#: config/chroot_local-includes/usr/local/bin/tor-browser:31
msgid "Start Tor Browser"
-msgstr "Tor Browser indítása"
+msgstr "A Tor Browser indítása"
#: config/chroot_local-includes/usr/local/bin/tor-browser:32
msgid "Cancel"
@@ -396,10 +412,10 @@ msgstr "Biztosan el akarja indítani az Unsafe Browser-t?"
#: config/chroot_local-includes/usr/local/sbin/unsafe-browser:35
msgid ""
-"Network activity within the Unsafe Browser is <b>not anonymous</b>. Only use"
-" the Unsafe Browser if necessary, for example if you have to login or "
+"Network activity within the Unsafe Browser is <b>not anonymous</b>.\\nOnly "
+"use the Unsafe Browser if necessary, for example\\nif you have to login or "
"register to activate your Internet connection."
-msgstr "Hálózati aktivitás az Unsafe Browser-n belül <b>nem névtelen</b>. Csak szükség esetén használja az Unsafe Browser-t, például ha be kell jelentkeznie, vagy regisztrálnia kell az internet kapcsolata aktiválásához."
+msgstr "A hálózati aktivitás az Unsafe Browser-en keresztül <b>nem titkosítva</b> történik. Csak akkor használja az Unsafe Browser-t ha mindenképp szüksége van rá, pl. az internet kapcsolat aktiválásakor."
#: config/chroot_local-includes/usr/local/sbin/unsafe-browser:47
msgid "Starting the Unsafe Browser..."
@@ -417,7 +433,7 @@ msgstr "Az Unsafe Browser leállítása..."
msgid ""
"This may take a while, and you may not restart the Unsafe Browser until it "
"is properly shut down."
-msgstr "Ez időbe telhet, és nem indíthatja újra az Unsafe Browser-t míg az nem lett megfelelően leállítva."
+msgstr "Ez eltarthat egy ideig, és addig nem indíthatja újra az Unsafe Browser-t amíg az megfelelően le nem állt."
#: config/chroot_local-includes/usr/local/sbin/unsafe-browser:66
msgid "Failed to restart Tor."
@@ -432,13 +448,13 @@ msgstr "Unsafe Browser"
msgid ""
"Another Unsafe Browser is currently running, or being cleaned up. Please "
"retry in a while."
-msgstr "Egy másik Unsafe Browser fut jelenleg vagy épp tisztítás folyamata zajlik. Kérlek térj vissza később."
+msgstr "Jelenleg egy másik példánya is fut az Unsafe Browser-nek, vagy épp tisztítás folyamata zajlik. Kérem térjen vissza később."
#: config/chroot_local-includes/usr/local/sbin/unsafe-browser:105
msgid ""
"NetworkManager passed us garbage data when trying to deduce the clearnet DNS"
" server."
-msgstr "A hálózatkezelő szemét adatot adott vissza mikor megpróbáltuk elérni a clearnet DNS szerverét."
+msgstr "A hálózatkezelő használhatatlan adatot küldött vissza, amikor megpróbáltuk elérni a valódi internet DNS szerverét."
#: config/chroot_local-includes/usr/local/sbin/unsafe-browser:115
msgid ""
@@ -448,50 +464,50 @@ msgstr "Nincs elérhető DNS szerver DHCP-n keresztül vagy kézzel van konfigur
#: config/chroot_local-includes/usr/local/sbin/unsafe-browser:123
msgid "Failed to setup chroot."
-msgstr "Sikertelen a chroot beállítása."
+msgstr "A chroot beállítása sikertelen."
#: config/chroot_local-includes/usr/local/sbin/unsafe-browser:129
msgid "Failed to configure browser."
-msgstr "Sikertelen a böngésző beállítása."
+msgstr "A böngésző beállítása sikertelen."
#: config/chroot_local-includes/usr/local/sbin/unsafe-browser:134
msgid "Failed to run browser."
-msgstr "Sikertelen a böngésző indítása."
+msgstr "A böngésző indítása sikertelen."
-#: config/chroot_local-includes/usr/local/sbin/tails-i2p:31
+#: config/chroot_local-includes/usr/local/sbin/tails-i2p:35
msgid "I2P failed to start"
-msgstr "I2P-t nem sikerült elindítani"
+msgstr "Az I2P-t nem sikerült elindítani"
-#: config/chroot_local-includes/usr/local/sbin/tails-i2p:32
+#: config/chroot_local-includes/usr/local/sbin/tails-i2p:36
msgid ""
"Something went wrong when I2P was starting. Check the logs in /var/log/i2p "
"for more information."
-msgstr "Valami hiba történt amikor az I2P elindult. Tobábbi információért nézze meg a naplókat itt: /var/log/i2p"
+msgstr "Hiba történt az I2P indítása közben. Tobábbi információért nézze meg a naplókat itt: /var/log/i2p"
-#: config/chroot_local-includes/usr/local/sbin/tails-i2p:43
+#: config/chroot_local-includes/usr/local/sbin/tails-i2p:53
msgid "I2P's router console is ready"
-msgstr "I2P-nek a router konzolja készen áll."
+msgstr "Az I2P router konzolja készen áll."
-#: config/chroot_local-includes/usr/local/sbin/tails-i2p:44
+#: config/chroot_local-includes/usr/local/sbin/tails-i2p:54
msgid "You can now access I2P's router console in the I2P Browser."
msgstr "Most hozzáférhetsz az I2P útválasztó konzoljához az I2P Browser-ben."
-#: config/chroot_local-includes/usr/local/sbin/tails-i2p:49
+#: config/chroot_local-includes/usr/local/sbin/tails-i2p:59
msgid "I2P is not ready"
msgstr "I2P nem áll készen."
-#: config/chroot_local-includes/usr/local/sbin/tails-i2p:50
+#: config/chroot_local-includes/usr/local/sbin/tails-i2p:60
msgid ""
"Eepsite tunnel not built within six minutes. Check the router console in the"
" I2P Browser or the logs in /var/log/i2p for more information. Reconnect to "
"the network to try again."
msgstr "Eepsite alagút nem épült fel hat percen belül. Ellenőrizd az útválasztó konzolt az I2P böngészőben vagy a naplókat a /var/log/i2p -ben a további információkért. Újracsatlakozás a hálózathoz az újrapróbálkozáshoz."
-#: config/chroot_local-includes/usr/local/sbin/tails-i2p:60
+#: config/chroot_local-includes/usr/local/sbin/tails-i2p:72
msgid "I2P is ready"
msgstr "I2P készen áll."
-#: config/chroot_local-includes/usr/local/sbin/tails-i2p:61
+#: config/chroot_local-includes/usr/local/sbin/tails-i2p:73
msgid "You can now access services on I2P."
msgstr "Most hozzáférhet a szolgáltatásokhoz az I2P-n."
@@ -528,10 +544,6 @@ msgstr "Újraindítás"
msgid "Immediately reboot computer"
msgstr "Azonnali újraindítás"
-#: ../config/chroot_local-includes/usr/share/applications/tails-shutdown.desktop.in.h:1
-msgid "Power Off"
-msgstr "Leállítás"
-
#: ../config/chroot_local-includes/usr/share/applications/tails-shutdown.desktop.in.h:2
msgid "Immediately shut down computer"
msgstr "Azonnali leállítás"
1
0
[translation/tails-misc] Update translations for tails-misc
by translation@torproject.org 15 Jan '16
by translation@torproject.org 15 Jan '16
15 Jan '16
commit 6e6305801b8ddb7f75b2bcdb8426986734ebc920
Author: Translation commit bot <translation(a)torproject.org>
Date: Fri Jan 15 18:15:40 2016 +0000
Update translations for tails-misc
---
hu.po | 56 ++++++++++++++++++++++++++++----------------------------
1 file changed, 28 insertions(+), 28 deletions(-)
diff --git a/hu.po b/hu.po
index 97a611c..228376e 100644
--- a/hu.po
+++ b/hu.po
@@ -15,7 +15,7 @@ msgstr ""
"Project-Id-Version: The Tor Project\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-01-11 21:00+0100\n"
-"PO-Revision-Date: 2016-01-15 17:43+0000\n"
+"PO-Revision-Date: 2016-01-15 18:15+0000\n"
"Last-Translator: Robert Zsolt <physx_ms(a)outlook.com>\n"
"Language-Team: Hungarian (http://www.transifex.com/otf/torproject/language/hu/)\n"
"MIME-Version: 1.0\n"
@@ -242,7 +242,7 @@ msgid ""
"If you have emails saved in <b>Claws Mail</b>, you should <a "
"href='https://tails.boum.org/doc/anonymous_internet/claws_mail_to_icedove'>migrate"
" your data</a> before starting <b>Icedove</b>."
-msgstr ""
+msgstr "Ha vannak elmentett emailjei a <b>Claws Mail-ben</b>, akkor <a href='https://tails.boum.org/doc/anonymous_internet/claws_mail_to_icedove'>másolja át az adatait</a> az <b>Icedove</b> indítása előtt."
#: config/chroot_local-includes/usr/share/gnome-shell/extensions/shutdown-helper@tails.boum.org/extension.js:71
msgid "Restart"
@@ -264,19 +264,19 @@ msgstr "Tails"
#: config/chroot_local-includes/usr/local/bin/tails-about:24
msgid "The Amnesic Incognito Live System"
-msgstr "The Amnesic Incognito Live System"
+msgstr "Az Amnesic Incognito Live System"
#: config/chroot_local-includes/usr/local/bin/tails-about:25
#, python-format
msgid ""
"Build information:\n"
"%s"
-msgstr "Fordítási információ:\n%s"
+msgstr "Verzió információ:\n%s"
#: config/chroot_local-includes/usr/local/bin/tails-about:27
#: ../config/chroot_local-includes/usr/share/applications/tails-about.desktop.in.h:1
msgid "About Tails"
-msgstr "A Tails-ról"
+msgstr "A Tails-ről"
#: config/chroot_local-includes/usr/local/sbin/tails-additional-software:118
#: config/chroot_local-includes/usr/local/sbin/tails-additional-software:124
@@ -290,7 +290,7 @@ msgid ""
"The upgrade failed. This might be due to a network problem. Please check "
"your network connection, try to restart Tails, or read the system log to "
"understand better the problem."
-msgstr "A frissítés nem sikerült. Ennek lehetséges hálózati hiba az oka. Kérlek ellenőrizd a hálózati kapcsolatot, próbáld újraindítani a Tails-t vagy olvasd át a rendszer naplófájlokat, a hiba okának megértéséhez."
+msgstr "A frissítés nem sikerült. Ezt okozhatta hálózati hiba. Kérem ellenőrizze a hálózati kapcsolatát, próbálja újraindítani a Tails-t vagy olvassa át a rendszernaplót, a hiba okának megkereséséhez."
#: config/chroot_local-includes/usr/local/sbin/tails-additional-software:125
msgid "The upgrade was successful."
@@ -304,7 +304,7 @@ msgstr "A rendszer órájának szinkronizálása"
msgid ""
"Tor needs an accurate clock to work properly, especially for Hidden "
"Services. Please wait..."
-msgstr "Tor-nak szüksége van egy megbízható órára a megfelelő működéshez, különösképp a rejtett szolgáltatásokhoz. Kérlek várj..."
+msgstr "A Tor-nak szüksége van egy megbízható órára a megfelelő működéshez, különösen a rejtett szolgáltatásokhoz. Kérlem várjon..."
#: config/chroot_local-includes/usr/local/lib/tails-htp-notify-user:87
msgid "Failed to synchronize the clock!"
@@ -328,7 +328,7 @@ msgstr "Hálózati kártya ${nic} letiltva"
msgid ""
"MAC spoofing failed for network card ${nic_name} (${nic}) so it is temporarily disabled.\n"
"You might prefer to restart Tails and disable MAC spoofing."
-msgstr ""
+msgstr "A MAC cím váltás a következő hálózati kártyán sikertelen volt: ${nic_name} (${nic}), úgyhogy a szolgáltatás átmenetileg le lett tiltva.\nÚjraindíthatja a Tails-t és letilthatja a MAC cím cserét."
#: config/chroot_local-includes/usr/local/lib/tails-spoof-mac:61
msgid "All networking disabled"
@@ -339,7 +339,7 @@ msgstr "Minden hálózat letiltva"
msgid ""
"MAC spoofing failed for network card ${nic_name} (${nic}). The error recovery also failed so all networking is disabled.\n"
"You might prefer to restart Tails and disable MAC spoofing."
-msgstr ""
+msgstr "A MAC cím váltás a következő hálózati kártyán sikertelen volt: ${nic_name} (${nic}). A hibaelhárítás is sikertelen volt, úgyhogy a hálózati kártya le lett tiltva.\nÚjraindíthatja a Tails-t és letilthatja a MAC cím cserét."
#: config/chroot_local-includes/usr/local/bin/tails-upgrade-frontend-wrapper:18
#: config/chroot_local-includes/usr/local/sbin/unsafe-browser:22
@@ -362,21 +362,21 @@ msgid ""
"\n"
"Or do a manual upgrade.\n"
"See https://tails.boum.org/doc/first_steps/upgrade#manual"
-msgstr "<b>Nincs elég memória a frissítések ellenőrzéséhez.</b>\n\nGyőződj meg róla a rendszer megfelel a szükséges követeleményeknek a Tails futtatásához.\nNézd meg a fájlt:///usr/share/doc/tails/website/doc/about/requirements.en.html\n\nPróbáld újraindítani a Tails-t és frissíteni ismét.\n\nVagy frissíts manuálisan.\nNézd meg ezt: https://tails.boum.org/doc/first_steps/upgrade#manual"
+msgstr "<b>Nincs elég memória a frissítések ellenőrzéséhez.</b>\n\nGyőződjön meg róla a számítógépe megfelel a minimális rendszerkövetelményeknek.\nTovábbi információt itt talál: file:///usr/share/doc/tails/website/doc/about/requirements.en.html\n\nIndítsa újra a Tail-s és próbálja meg mégegyszer frissíteni.\n\nVagy frissítse manuálisan: https://tails.boum.org/doc/first_steps/upgrade#manual"
#: config/chroot_local-includes/usr/local/lib/tails-virt-notify-user:67
msgid "Warning: virtual machine detected!"
-msgstr "Figyelem: virtuális gép érzékelve!"
+msgstr "Figyelem: virtualizált gép /VM/ érzékelve!"
#: config/chroot_local-includes/usr/local/lib/tails-virt-notify-user:69
msgid ""
"Both the host operating system and the virtualization software are able to "
"monitor what you are doing in Tails."
-msgstr "Mind a gazda operációs rendszer, mind a virtualizációs szoftver képes megfigyelni amit a Tails-ben tesz."
+msgstr "Az operációs rendszer, és a virtualizációs szoftver is képes megfigyelni amit a Tails-ben csinál!"
#: config/chroot_local-includes/usr/local/lib/tails-virt-notify-user:72
msgid "Warning: non-free virtual machine detected!"
-msgstr ""
+msgstr "Figyelem: nem ingyenes virtualizációs szoftver /VM/ érzékelve!"
#: config/chroot_local-includes/usr/local/lib/tails-virt-notify-user:74
msgid ""
@@ -384,23 +384,23 @@ msgid ""
"monitor what you are doing in Tails. Only free software can be considered "
"trustworthy, for both the host operating system and the virtualization "
"software."
-msgstr ""
+msgstr "Az operációs rendszer, és a virtualizációs szoftver is képes megfigyelni amit a Tails-ben csinál! Általában csak az ingyenes szoftverek megbízhatóak, ezért ajánljuk hogy használjon ingyenes operációs rendszert és virtualizációs szoftvert."
#: config/chroot_local-includes/usr/local/lib/tails-virt-notify-user:79
msgid "Learn more"
-msgstr ""
+msgstr "További információ"
#: config/chroot_local-includes/usr/local/bin/tor-browser:29
msgid "Tor is not ready"
-msgstr "Tor még nem működésre kész"
+msgstr "A Tor még nem áll készen a működésre"
#: config/chroot_local-includes/usr/local/bin/tor-browser:30
msgid "Tor is not ready. Start Tor Browser anyway?"
-msgstr "Tor még nem működésre kész. Elindítod a Tor Browser-t ennek ellenére?"
+msgstr "A Tor még nem áll készen a működésre. Mindenképp el szeretné indítani?"
#: config/chroot_local-includes/usr/local/bin/tor-browser:31
msgid "Start Tor Browser"
-msgstr "Tor Browser indítása"
+msgstr "A Tor Browser indítása"
#: config/chroot_local-includes/usr/local/bin/tor-browser:32
msgid "Cancel"
@@ -415,7 +415,7 @@ msgid ""
"Network activity within the Unsafe Browser is <b>not anonymous</b>.\\nOnly "
"use the Unsafe Browser if necessary, for example\\nif you have to login or "
"register to activate your Internet connection."
-msgstr ""
+msgstr "A hálózati aktivitás az Unsafe Browser-en keresztül <b>nem titkosítva</b> történik. Csak akkor használja az Unsafe Browser-t ha mindenképp szüksége van rá, pl. az internet kapcsolat aktiválásakor."
#: config/chroot_local-includes/usr/local/sbin/unsafe-browser:47
msgid "Starting the Unsafe Browser..."
@@ -433,7 +433,7 @@ msgstr "Az Unsafe Browser leállítása..."
msgid ""
"This may take a while, and you may not restart the Unsafe Browser until it "
"is properly shut down."
-msgstr "Ez időbe telhet, és nem indíthatja újra az Unsafe Browser-t míg az nem lett megfelelően leállítva."
+msgstr "Ez eltarthat egy ideig, és addig nem indíthatja újra az Unsafe Browser-t amíg az megfelelően le nem állt."
#: config/chroot_local-includes/usr/local/sbin/unsafe-browser:66
msgid "Failed to restart Tor."
@@ -448,13 +448,13 @@ msgstr "Unsafe Browser"
msgid ""
"Another Unsafe Browser is currently running, or being cleaned up. Please "
"retry in a while."
-msgstr "Egy másik Unsafe Browser fut jelenleg vagy épp tisztítás folyamata zajlik. Kérlek térj vissza később."
+msgstr "Jelenleg egy másik példánya is fut az Unsafe Browser-nek, vagy épp tisztítás folyamata zajlik. Kérem térjen vissza később."
#: config/chroot_local-includes/usr/local/sbin/unsafe-browser:105
msgid ""
"NetworkManager passed us garbage data when trying to deduce the clearnet DNS"
" server."
-msgstr "A hálózatkezelő szemét adatot adott vissza mikor megpróbáltuk elérni a clearnet DNS szerverét."
+msgstr "A hálózatkezelő használhatatlan adatot küldött vissza, amikor megpróbáltuk elérni a valódi internet DNS szerverét."
#: config/chroot_local-includes/usr/local/sbin/unsafe-browser:115
msgid ""
@@ -464,29 +464,29 @@ msgstr "Nincs elérhető DNS szerver DHCP-n keresztül vagy kézzel van konfigur
#: config/chroot_local-includes/usr/local/sbin/unsafe-browser:123
msgid "Failed to setup chroot."
-msgstr "Sikertelen a chroot beállítása."
+msgstr "A chroot beállítása sikertelen."
#: config/chroot_local-includes/usr/local/sbin/unsafe-browser:129
msgid "Failed to configure browser."
-msgstr "Sikertelen a böngésző beállítása."
+msgstr "A böngésző beállítása sikertelen."
#: config/chroot_local-includes/usr/local/sbin/unsafe-browser:134
msgid "Failed to run browser."
-msgstr "Sikertelen a böngésző indítása."
+msgstr "A böngésző indítása sikertelen."
#: config/chroot_local-includes/usr/local/sbin/tails-i2p:35
msgid "I2P failed to start"
-msgstr "I2P-t nem sikerült elindítani"
+msgstr "Az I2P-t nem sikerült elindítani"
#: config/chroot_local-includes/usr/local/sbin/tails-i2p:36
msgid ""
"Something went wrong when I2P was starting. Check the logs in /var/log/i2p "
"for more information."
-msgstr "Valami hiba történt amikor az I2P elindult. Tobábbi információért nézze meg a naplókat itt: /var/log/i2p"
+msgstr "Hiba történt az I2P indítása közben. Tobábbi információért nézze meg a naplókat itt: /var/log/i2p"
#: config/chroot_local-includes/usr/local/sbin/tails-i2p:53
msgid "I2P's router console is ready"
-msgstr "I2P-nek a router konzolja készen áll."
+msgstr "Az I2P router konzolja készen áll."
#: config/chroot_local-includes/usr/local/sbin/tails-i2p:54
msgid "You can now access I2P's router console in the I2P Browser."
1
0
15 Jan '16
commit eb03a4d194097ea61ac5faa5887f37e818d04453
Author: Sukhbir Singh <sukhbir(a)torproject.org>
Date: Fri Jan 15 13:13:26 2016 -0500
Update report.py to use last month in report
---
report.py | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/report.py b/report.py
index b75d7c8..23821e3 100644
--- a/report.py
+++ b/report.py
@@ -16,7 +16,7 @@
import os
import sys
import ConfigParser
-from datetime import datetime as dt
+import datetime as dt
import sqlite3
@@ -109,12 +109,17 @@ DESC""".format(each))
if not each[0] == "none"])
self.requests.append(result)
+ # Get the last month since we run the script on the first day of every
+ # month and generate the report for the previous.
+ first_day_current = dt.datetime.today().replace(day=1)
+ last_month = first_day_current - dt.timedelta(days=1)
+
with open(OUTPUT, "a") as f:
- f.write(REPORT.format(dt.now().strftime("%B %Y"),
+ f.write(REPORT.format(last_month.strftime("%B %Y"),
self.requests[0][0],
- dt.now().strftime("%B"),
+ last_month.strftime("%B"),
self.requests[1][1],
- dt.strptime(self.requests[1][0], "%Y-%m-%d")
+ dt.datetime.strptime(self.requests[1][0], "%Y-%m-%d")
.strftime("%B %-d"),
*self.requests[2:]))
self.conn.close()
1
0
15 Jan '16
commit 0ce10154e9686f22deed58b6e627283bde9677a3
Author: Damian Johnson <atagar(a)torproject.org>
Date: Fri Jan 15 10:00:34 2016 -0800
Skip empty files in descriptor tarballs
While reading a descriptor tarball from CollecTor we choked due to an empty file...
Traceback (most recent call last):
File "metrics.py", line 81, in <module>
measure_average_advertised_bandwidth('/home/atagar/Desktop/server-descriptors-2015-11.tar')
File "metrics.py", line 9, in measure_average_advertised_bandwidth
for desc in parse_file(path):
File "/home/atagar/Desktop/stem/stem/descriptor/__init__.py", line 171, in parse_file
for desc in handler(descriptor_file, descriptor_type, validate, document_handler, **kwargs):
File "/home/atagar/Desktop/stem/stem/descriptor/__init__.py", line 246, in _parse_file_for_tar_path
for desc in parse_file(tar_file, *args, **kwargs):
File "/home/atagar/Desktop/stem/stem/descriptor/__init__.py", line 171, in parse_file
for desc in handler(descriptor_file, descriptor_type, validate, document_handler, **kwargs):
File "/home/atagar/Desktop/stem/stem/descriptor/__init__.py", line 261, in _parse_file_for_tarfile
for desc in parse_file(entry, *args, **kwargs):
File "/home/atagar/Desktop/stem/stem/descriptor/__init__.py", line 228, in parse_file
for desc in parse(descriptor_file):
File "/home/atagar/Desktop/stem/stem/descriptor/__init__.py", line 226, in parse
raise TypeError("Unable to determine the descriptor's type. filename: '%s', first line: '%s'" % (filename, first_line))
TypeError: Unable to determine the descriptor's type. filename: 'f4b03227e12be3353af32761cbd25a62afb9ea42', first line: ''
In particular this was from...
server-descriptors-2015-11/f/4/f4b03227e12be3353af32761cbd25a62afb9ea42
Not sure if this is a problem or not on CollecTor's end but making us a little
more resilient by skipping empty files in tarballs.
---
stem/descriptor/__init__.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/stem/descriptor/__init__.py b/stem/descriptor/__init__.py
index a2877c8..6b18d65 100644
--- a/stem/descriptor/__init__.py
+++ b/stem/descriptor/__init__.py
@@ -256,6 +256,9 @@ def _parse_file_for_tarfile(descriptor_file, *args, **kwargs):
if tar_entry.isfile():
entry = descriptor_file.extractfile(tar_entry)
+ if entry.size == 0:
+ continue
+
try:
for desc in parse_file(entry, *args, **kwargs):
desc._set_archive_path(entry.name)
1
0
[translation/tails-openpgp-applet_completed] Update translations for tails-openpgp-applet_completed
by translation@torproject.org 15 Jan '16
by translation@torproject.org 15 Jan '16
15 Jan '16
commit e26e11e26b6edad30531d2b9b2dd16fed9dee87d
Author: Translation commit bot <translation(a)torproject.org>
Date: Fri Jan 15 17:46:47 2016 +0000
Update translations for tails-openpgp-applet_completed
---
hu/openpgp-applet.pot | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hu/openpgp-applet.pot b/hu/openpgp-applet.pot
index 98633dd..5092b3c 100644
--- a/hu/openpgp-applet.pot
+++ b/hu/openpgp-applet.pot
@@ -9,7 +9,7 @@ msgstr ""
"Project-Id-Version: The Tor Project\n"
"Report-Msgid-Bugs-To: tails(a)boum.org\n"
"POT-Creation-Date: 2015-08-10 15:55+0200\n"
-"PO-Revision-Date: 2015-11-29 00:53+0000\n"
+"PO-Revision-Date: 2016-01-15 17:42+0000\n"
"Last-Translator: benewfy <benewfy(a)gmail.com>\n"
"Language-Team: Hungarian (http://www.transifex.com/otf/torproject/language/hu/)\n"
"MIME-Version: 1.0\n"
1
0
[translation/tails-openpgp-applet] Update translations for tails-openpgp-applet
by translation@torproject.org 15 Jan '16
by translation@torproject.org 15 Jan '16
15 Jan '16
commit 331af0332c0fe7264244384c6aa73a2553edfb62
Author: Translation commit bot <translation(a)torproject.org>
Date: Fri Jan 15 17:46:42 2016 +0000
Update translations for tails-openpgp-applet
---
hu/openpgp-applet.pot | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hu/openpgp-applet.pot b/hu/openpgp-applet.pot
index 98633dd..5092b3c 100644
--- a/hu/openpgp-applet.pot
+++ b/hu/openpgp-applet.pot
@@ -9,7 +9,7 @@ msgstr ""
"Project-Id-Version: The Tor Project\n"
"Report-Msgid-Bugs-To: tails(a)boum.org\n"
"POT-Creation-Date: 2015-08-10 15:55+0200\n"
-"PO-Revision-Date: 2015-11-29 00:53+0000\n"
+"PO-Revision-Date: 2016-01-15 17:42+0000\n"
"Last-Translator: benewfy <benewfy(a)gmail.com>\n"
"Language-Team: Hungarian (http://www.transifex.com/otf/torproject/language/hu/)\n"
"MIME-Version: 1.0\n"
1
0
[translation/tails-misc] Update translations for tails-misc
by translation@torproject.org 15 Jan '16
by translation@torproject.org 15 Jan '16
15 Jan '16
commit 7cb6ccbc442e7dc9fffa2e0fedd49fd9421a09f5
Author: Translation commit bot <translation(a)torproject.org>
Date: Fri Jan 15 17:45:40 2016 +0000
Update translations for tails-misc
---
hu.po | 47 ++++++++++++++++++++++++-----------------------
1 file changed, 24 insertions(+), 23 deletions(-)
diff --git a/hu.po b/hu.po
index 187e2a5..97a611c 100644
--- a/hu.po
+++ b/hu.po
@@ -8,14 +8,15 @@
# Blackywantscookies <gaborcika(a)citromail.hu>, 2014
# iskr <iscreamd(a)gmail.com>, 2013
# Lajos Pasztor <mrlajos(a)gmail.com>, 2014
+# Robert Zsolt <physx_ms(a)outlook.com>, 2016
# vargaviktor <viktor.varga(a)gmail.com>, 2013,2015
msgid ""
msgstr ""
"Project-Id-Version: The Tor Project\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-01-11 21:00+0100\n"
-"PO-Revision-Date: 2016-01-13 19:12+0000\n"
-"Last-Translator: carolyn <carolyn(a)anhalt.org>\n"
+"PO-Revision-Date: 2016-01-15 17:43+0000\n"
+"Last-Translator: Robert Zsolt <physx_ms(a)outlook.com>\n"
"Language-Team: Hungarian (http://www.transifex.com/otf/torproject/language/hu/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -25,11 +26,11 @@ msgstr ""
#: config/chroot_local-includes/etc/NetworkManager/dispatcher.d/60-tor-ready.sh:39
msgid "Tor is ready"
-msgstr "Tor készen áll."
+msgstr "A Tor készen áll."
#: config/chroot_local-includes/etc/NetworkManager/dispatcher.d/60-tor-ready.sh:40
msgid "You can now access the Internet."
-msgstr "Most már hozzáférsz az internethez."
+msgstr "Most már hozzáféhetsz az internethez."
#: config/chroot_local-includes/etc/whisperback/config.py:65
#, python-format
@@ -46,22 +47,22 @@ msgid ""
"an opportunity for eavesdroppers, like your email or Internet provider, to\n"
"confirm that you are using Tails.\n"
"</p>\n"
-msgstr "<h1>Segítsen kijavítani a hibát!</h1>\n<p>Olvassa el <a href=\"%s\">hibabejelentési útmutatót</a>.</p>\n<p><strong>Kérjük a szükségesnél több személyes információt ne adjon meg!</strong></p>\n<h2>Az email címe megadásáról</h2>\n<p>\nHa megadja nekünk az email címét, fel tudjuk venni a kapcsolatot a probléma tisztázásához. Az esetek többségében ez a legtöbb hibabejelentéshez szükséges, a hibabejelentés többsége sajnos e nélkül használhatatlan.\n\nA másik oldalról nézve ez lehetővé teszi egy lehallgatónak, legyen ez email lehallgató, vagy ISP hogy megtudja hogy használja a Tails-t.\n</p>\n"
+msgstr "<h1>Segítsen kijavítani a hibát!</h1>\n<p>Olvasd el <a href=\"%s\">hibabejelentési útmutató</a>.</p>\n<p><strong>Kérjük a szükségesnél több személyes információt ne adjon meg!</strong></p>\n<h2>Az email címed megadásáról</h2>\n<p>\nHa megadja nekünk az email címét, fel tudjuk venni a kapcsolatot a probléma tisztázásához. Az esetek többségében ez a legtöbb hibabejelentéshez szükséges, nélküle nem tudunk segíteni a hibaelhárításban.\n\nViszont ez lehetővé teszi egy harmadik fél részére, pl. internet- vagy email szolgáltató, hogy tudomást szerezzen arról, hogy esetenként proxy átjárókat használ az interneteléréshez.\n</p>\n"
#: config/chroot_local-includes/usr/local/bin/electrum:14
msgid "Persistence is disabled for Electrum"
-msgstr "A kapcsolatok közötti állapotmegőrzés (perzisztencia) kikapcsolt az Electum esetében"
+msgstr "A kapcsolatok közötti állapotmegőrzés (perzisztencia) kikapcsolt az Electum használatakor."
#: config/chroot_local-includes/usr/local/bin/electrum:16
msgid ""
"When you reboot Tails, all of Electrum's data will be lost, including your "
"Bitcoin wallet. It is strongly recommended to only run Electrum when its "
"persistence feature is activated."
-msgstr "Ha újraindítja a Tailst, akkor minden Electum adat el fog veszni, beleértve a Bitcoin pénztárcát is. Erősen ajánlott, hogy csak akkor futtasa az Eletum-ot, ha kapcsolatok közötti állapot megőrzése (perzisztencia) be van kapcsolva."
+msgstr "Ha újraindítja a Tails-t, akkor minden Electum adat el fog veszni, beleértve a Bitcoin pénztárcáját is. Erősen ajánlott, hogy csak akkor futtasa az Electum-ot, ha a kapcsolatok közötti állapot megőrzése (perzisztencia) be van kapcsolva."
#: config/chroot_local-includes/usr/local/bin/electrum:18
msgid "Do you want to start Electrum anyway?"
-msgstr "Szeretné elindítani az Electumot mindenféleképpen?"
+msgstr "Mindenképp el szeretné indítani az Electum-ot?"
#: config/chroot_local-includes/usr/local/bin/electrum:20
#: config/chroot_local-includes/usr/local/bin/icedove:22
@@ -97,7 +98,7 @@ msgstr "Vágólap aláírása/titkosítása Publikus _kulcsokkal"
#: config/chroot_local-includes/usr/local/bin/gpgApplet:200
msgid "_Decrypt/Verify Clipboard"
-msgstr "Vágólap _Kititkosítása/Ellenőrzése"
+msgstr "Vágólap _Visszafejtése/Hitelesítése"
#: config/chroot_local-includes/usr/local/bin/gpgApplet:204
msgid "_Manage Keys"
@@ -105,29 +106,29 @@ msgstr "_Kulcsok kezelése"
#: config/chroot_local-includes/usr/local/bin/gpgApplet:208
msgid "_Open Text Editor"
-msgstr "_Szövegeditor megnyitása"
+msgstr "_Szövegszerkesztő megnyitása"
#: config/chroot_local-includes/usr/local/bin/gpgApplet:252
msgid "The clipboard does not contain valid input data."
-msgstr "A vágólap nem tartalmaz érvényes bemeneti adatot"
+msgstr "A vágólap nem tartalmaz érvényes adatot."
#: config/chroot_local-includes/usr/local/bin/gpgApplet:303
#: config/chroot_local-includes/usr/local/bin/gpgApplet:305
#: config/chroot_local-includes/usr/local/bin/gpgApplet:307
msgid "Unknown Trust"
-msgstr "Ismeretlen megbízhatóság"
+msgstr "Nem megbízható"
#: config/chroot_local-includes/usr/local/bin/gpgApplet:309
msgid "Marginal Trust"
-msgstr "Kis megbízhatóság"
+msgstr "Kevéssé megbízható"
#: config/chroot_local-includes/usr/local/bin/gpgApplet:311
msgid "Full Trust"
-msgstr "Teljes megbizhatóság"
+msgstr "Nagyon megbízható"
#: config/chroot_local-includes/usr/local/bin/gpgApplet:313
msgid "Ultimate Trust"
-msgstr "Legmagasabb megbizhatóság"
+msgstr "Teljesen megbízható"
#: config/chroot_local-includes/usr/local/bin/gpgApplet:366
msgid "Name"
@@ -167,7 +168,7 @@ msgstr "Címzettek elrejtése"
msgid ""
"Hide the user IDs of all recipients of an encrypted message. Otherwise "
"anyone that sees the encrypted message can see who the recipients are."
-msgstr "A titkosított üzenet összes címzettje felhasználói ID-jének elrejtése. Egyébként aki látja a titkosított üzenetet, megtudhatja kik voltak még a címzettek."
+msgstr "Rejtse el az összes címzett ID-jét titkosított üzenet küldése esetén. Egyébként aki látja a titkosított üzenetet, megtudhatja ki volt a többi címzett."
#: config/chroot_local-includes/usr/local/bin/gpgApplet:513
msgid "Sign message as:"
@@ -179,7 +180,7 @@ msgstr "Válasszon kulcsokat"
#: config/chroot_local-includes/usr/local/bin/gpgApplet:557
msgid "Do you trust these keys?"
-msgstr "Megbízik ebben a kulcsban?"
+msgstr "Megbízik ezekben a kulcsokban?"
#: config/chroot_local-includes/usr/local/bin/gpgApplet:560
msgid "The following selected key is not fully trusted:"
@@ -191,7 +192,7 @@ msgstr[1] "Az alábbi kiválaszott kulcsok nem teljesen megbízhatóak:"
msgid "Do you trust this key enough to use it anyway?"
msgid_plural "Do you trust these keys enough to use them anyway?"
msgstr[0] "Megbízik ebben a kulcsban annyira, hogy használja ennek ellenére?"
-msgstr[1] "Megbízik ezekben a kulcsban annyira, hogy használja ennek ellenére?"
+msgstr[1] "Megbízik ezekben a kulcsokban annyira, hogy mindenképp használja őket?"
#: config/chroot_local-includes/usr/local/bin/gpgApplet:591
msgid "No keys selected"
@@ -201,16 +202,16 @@ msgstr "Nincs kulcs kiválasztva"
msgid ""
"You must select a private key to sign the message, or some public keys to "
"encrypt the message, or both."
-msgstr "Az üzenet aláírásához ki kell választani egy privát kulcsot, vagy valamelyik nyílvános kulcsot esetleg mindkettőt az üzenet titkosításához."
+msgstr "Ki kell választania egy privát kulcsot az üzenet aláírásához, vagy egy publikusat a titkosításához. Egyszerre használhatja mindkét opciót is."
#: config/chroot_local-includes/usr/local/bin/gpgApplet:621
msgid "No keys available"
-msgstr "Nem érhetőek el kulcsok"
+msgstr "Nincs elérhető kulcs"
#: config/chroot_local-includes/usr/local/bin/gpgApplet:623
msgid ""
"You need a private key to sign messages or a public key to encrypt messages."
-msgstr "Szükséged van egy privát kulcsra az üzenet aláírásához vagy egy nyílvános kulcsra a titkosításhoz."
+msgstr "Szüksége van egy privát kulcsra az üzenet aláírásához vagy egy nyílvános kulcsra a titkosításához."
#: config/chroot_local-includes/usr/local/bin/gpgApplet:751
msgid "GnuPG error"
@@ -230,11 +231,11 @@ msgstr "GnuPG kimenet:"
#: config/chroot_local-includes/usr/local/bin/gpgApplet:853
msgid "Other messages provided by GnuPG:"
-msgstr "Egyéb GnuPG által adott üzenetek:"
+msgstr "Egyéb üzenetek a GnuPG-től:"
#: config/chroot_local-includes/usr/local/bin/icedove:18
msgid "The <b>Claws Mail</b> persistence feature is activated."
-msgstr ""
+msgstr "A <b>Claws Mail</b> perzisztencia aktiválva."
#: config/chroot_local-includes/usr/local/bin/icedove:20
msgid ""
1
0
commit da4dbb29b77bc6769781bf2eb38fd5364f232a54
Author: Nick Mathewson <nickm(a)torproject.org>
Date: Fri Jan 15 11:45:19 2016 -0500
Fix some leaks in the unit tests.
---
src/test/test_dir.c | 64 +++++++++++++++++---------------------------
src/test/test_dir_common.c | 3 ++-
2 files changed, 26 insertions(+), 41 deletions(-)
diff --git a/src/test/test_dir.c b/src/test/test_dir.c
index 34a2c3b..05fbe0a 100644
--- a/src/test/test_dir.c
+++ b/src/test/test_dir.c
@@ -1819,7 +1819,8 @@ test_a_networkstatus(
tt_str_op(cp,OP_EQ, "Authority:Exit:Fast:Guard:Running:Stable:V2Dir:Valid");
tor_free(cp);
tt_int_op(smartlist_len(v1->routerstatus_list),OP_EQ, n_vrs);
- tor_free(vote);
+ networkstatus_vote_free(vote);
+ vote = NULL;
if (vote_tweaks) params_tweaked += vote_tweaks(v1, 1, now);
@@ -1852,7 +1853,8 @@ test_a_networkstatus(
tt_assert(vrs);
vrs_test(vrs, 2, now);
}
- tor_free(vote);
+ networkstatus_vote_free(vote);
+ vote = NULL;
/* Generate the third vote with a legacy id. */
tt_assert(!dir_common_construct_vote_3(&vote, cert3, sign_skey_3, vrs_gen,
@@ -2094,32 +2096,19 @@ test_a_networkstatus(
tor_free(consensus_text);
tor_free(consensus_text_md);
- if (vote)
- networkstatus_vote_free(vote);
- if (v1)
- networkstatus_vote_free(v1);
- if (v2)
- networkstatus_vote_free(v2);
- if (v3)
- networkstatus_vote_free(v3);
- if (con)
- networkstatus_vote_free(con);
- if (con_md)
- networkstatus_vote_free(con_md);
- if (sign_skey_1)
- crypto_pk_free(sign_skey_1);
- if (sign_skey_2)
- crypto_pk_free(sign_skey_2);
- if (sign_skey_3)
- crypto_pk_free(sign_skey_3);
- if (sign_skey_leg1)
- crypto_pk_free(sign_skey_leg1);
- if (cert1)
- authority_cert_free(cert1);
- if (cert2)
- authority_cert_free(cert2);
- if (cert3)
- authority_cert_free(cert3);
+ networkstatus_vote_free(vote);
+ networkstatus_vote_free(v1);
+ networkstatus_vote_free(v2);
+ networkstatus_vote_free(v3);
+ networkstatus_vote_free(con);
+ networkstatus_vote_free(con_md);
+ crypto_pk_free(sign_skey_1);
+ crypto_pk_free(sign_skey_2);
+ crypto_pk_free(sign_skey_3);
+ crypto_pk_free(sign_skey_leg1);
+ authority_cert_free(cert1);
+ authority_cert_free(cert2);
+ authority_cert_free(cert3);
tor_free(consensus_text2);
tor_free(consensus_text3);
@@ -2127,18 +2116,13 @@ test_a_networkstatus(
tor_free(consensus_text_md3);
tor_free(detached_text1);
tor_free(detached_text2);
- if (con2)
- networkstatus_vote_free(con2);
- if (con3)
- networkstatus_vote_free(con3);
- if (con_md2)
- networkstatus_vote_free(con_md2);
- if (con_md3)
- networkstatus_vote_free(con_md3);
- if (dsig1)
- ns_detached_signatures_free(dsig1);
- if (dsig2)
- ns_detached_signatures_free(dsig2);
+
+ networkstatus_vote_free(con2);
+ networkstatus_vote_free(con3);
+ networkstatus_vote_free(con_md2);
+ networkstatus_vote_free(con_md3);
+ ns_detached_signatures_free(dsig1);
+ ns_detached_signatures_free(dsig2);
}
/** Run unit tests for generating and parsing V3 consensus networkstatus
diff --git a/src/test/test_dir_common.c b/src/test/test_dir_common.c
index 44ea93b..f9e97c9 100644
--- a/src/test/test_dir_common.c
+++ b/src/test/test_dir_common.c
@@ -362,7 +362,8 @@ dir_common_construct_vote_2(networkstatus_t **vote, authority_cert_t *cert,
*/
smartlist_add((*vote)->voters, voter);
(*vote)->cert = authority_cert_dup(cert);
- (*vote)->net_params = smartlist_new();
+ if (! (*vote)->net_params)
+ (*vote)->net_params = smartlist_new();
smartlist_split_string((*vote)->net_params,
"bar=2000000000 circuitwindow=20",
NULL, 0, 0);
1
0
15 Jan '16
commit f6ea7a62580da2efbadeabbd82e8c1df5ac925e1
Author: Nick Mathewson <nickm(a)torproject.org>
Date: Fri Jan 15 11:20:14 2016 -0500
Make the new directory tests build and run again.
Had to disable a couple.
Also add changes file for 17003.
---
changes/bug17003 | 3 +++
src/test/test_dir.c | 40 +++++++++++++++++++++++++++-------------
2 files changed, 30 insertions(+), 13 deletions(-)
diff --git a/changes/bug17003 b/changes/bug17003
new file mode 100644
index 0000000..8125f0e
--- /dev/null
+++ b/changes/bug17003
@@ -0,0 +1,3 @@
+ o Testing:
+ - New tests for directory.c functions. Closes ticket 17003. Patch
+ from Ola Bini.
diff --git a/src/test/test_dir.c b/src/test/test_dir.c
index b0ed307..34a2c3b 100644
--- a/src/test/test_dir.c
+++ b/src/test/test_dir.c
@@ -3885,7 +3885,8 @@ test_dir_should_not_init_request_to_ourselves(void *data)
set_server_identity_key(key);
crypto_pk_get_digest(key, (char*) &digest);
- ourself = trusted_dir_server_new("ourself", "127.0.0.1", 9059, 9060, digest,
+ ourself = trusted_dir_server_new("ourself", "127.0.0.1", 9059, 9060,
+ NULL, digest,
NULL, V3_DIRINFO, 1.0);
tt_assert(ourself);
@@ -3919,7 +3920,7 @@ test_dir_should_not_init_request_to_dir_auths_without_v3_info(void *data)
clear_dir_servers();
routerlist_free_all();
- ds = trusted_dir_server_new("ds", "10.0.0.1", 9059, 9060,
+ ds = trusted_dir_server_new("ds", "10.0.0.1", 9059, 9060, NULL,
"12345678901234567890", NULL, dirinfo_type, 1.0);
tt_assert(ds);
dir_server_add(ds);
@@ -3948,7 +3949,7 @@ test_dir_should_init_request_to_dir_auths(void *data)
clear_dir_servers();
routerlist_free_all();
- ds = trusted_dir_server_new("ds", "10.0.0.1", 9059, 9060,
+ ds = trusted_dir_server_new("ds", "10.0.0.1", 9059, 9060, NULL,
"12345678901234567890", NULL, V3_DIRINFO, 1.0);
tt_assert(ds);
dir_server_add(ds);
@@ -4013,7 +4014,7 @@ test_dir_choose_compression_level(void* data)
}
static void
-test_dir_find_dl_schedule_and_len(void* data)
+test_dir_find_dl_schedule(void* data)
{
download_status_t dls;
smartlist_t server, client, server_cons, client_cons, bridge;
@@ -4030,19 +4031,32 @@ test_dir_find_dl_schedule_and_len(void* data)
mock_options->TestingBridgeDownloadSchedule = &bridge;
dls.schedule = DL_SCHED_GENERIC;
- tt_ptr_op(find_dl_schedule_and_len(&dls, 0), OP_EQ, &client);
- tt_ptr_op(find_dl_schedule_and_len(&dls, 1), OP_EQ, &server);
+ mock_options->ClientOnly = 1;
+ tt_ptr_op(find_dl_schedule(&dls, mock_options), OP_EQ, &client);
+ mock_options->ClientOnly = 0;
+ mock_options->DirPort_set = 1;
+ mock_options->ORPort_set = 1;
+ mock_options->DirCache = 1;
+ tt_ptr_op(find_dl_schedule(&dls, mock_options), OP_EQ, &server);
+#if 0
dls.schedule = DL_SCHED_CONSENSUS;
- tt_ptr_op(find_dl_schedule_and_len(&dls, 0), OP_EQ, &client_cons);
- tt_ptr_op(find_dl_schedule_and_len(&dls, 1), OP_EQ, &server_cons);
+ mock_options->ClientOnly = 1;
+ mock_options->DirCache = 0;
+ tt_ptr_op(find_dl_schedule(&dls, mock_options), OP_EQ, &client_cons);
+ mock_options->ClientOnly = 0;
+ mock_options->DirCache = 1;
+ tt_ptr_op(find_dl_schedule(&dls, mock_options), OP_EQ, &server_cons);
+#endif
dls.schedule = DL_SCHED_BRIDGE;
- tt_ptr_op(find_dl_schedule_and_len(&dls, 0), OP_EQ, &bridge);
- tt_ptr_op(find_dl_schedule_and_len(&dls, 1), OP_EQ, &bridge);
+ mock_options->ClientOnly = 1;
+ tt_ptr_op(find_dl_schedule(&dls, mock_options), OP_EQ, &bridge);
+ mock_options->ClientOnly = 0;
+ tt_ptr_op(find_dl_schedule(&dls, mock_options), OP_EQ, &bridge);
- done:
- UNMOCK(get_options);
+ done:
+ UNMOCK(get_options);
}
#define DIR_LEGACY(name) \
@@ -4085,7 +4099,7 @@ struct testcase_t dir_tests[] = {
DIR(should_not_init_request_to_dir_auths_without_v3_info, 0),
DIR(should_init_request_to_dir_auths, 0),
DIR(choose_compression_level, 0),
- DIR(find_dl_schedule_and_len, 0),
+ DIR(find_dl_schedule, 0),
END_OF_TESTCASES
};
1
0
[tor/master] Merge remote-tracking branch 'twstrike/directory-tests'
by nickm@torproject.org 15 Jan '16
by nickm@torproject.org 15 Jan '16
15 Jan '16
commit 537214d10e79ddd2681bea6b4bb839e8af80315c
Merge: d3e7803 fcd7923
Author: Nick Mathewson <nickm(a)torproject.org>
Date: Fri Jan 15 11:08:22 2016 -0500
Merge remote-tracking branch 'twstrike/directory-tests'
src/or/directory.c | 28 ++--
src/or/directory.h | 25 ++--
src/test/test_dir.c | 373 ++++++++++++++++++++++++++++++++++++++++++++++++++-
3 files changed, 398 insertions(+), 28 deletions(-)
diff --cc src/or/directory.c
index 21abfb1,01ed694..e1bdcb0
--- a/src/or/directory.c
+++ b/src/or/directory.c
@@@ -3666,53 -3456,26 +3666,53 @@@ connection_dir_finished_connecting(dir_
}
/** Decide which download schedule we want to use based on descriptor type
- * in <b>dls</b> and whether we are acting as directory <b>server</b>, and
- * then return a list of int pointers defining download delays in seconds.
- * Helper function for download_status_increment_failure() and
- * download_status_reset(). */
+ * in <b>dls</b> and <b>options</b>.
+ * Then return a list of int pointers defining download delays in seconds.
+ * Helper function for download_status_increment_failure(),
+ * download_status_reset(), and download_status_increment_attempt(). */
- static const smartlist_t *
+ STATIC const smartlist_t *
-find_dl_schedule_and_len(download_status_t *dls, int server)
+find_dl_schedule(download_status_t *dls, const or_options_t *options)
{
+ const int dir_server = dir_server_mode(options);
+ const int multi_d = networkstatus_consensus_can_use_multiple_directories(
+ options);
+ const int we_are_bootstrapping = networkstatus_consensus_is_boostrapping(
+ time(NULL));
+ const int use_fallbacks = networkstatus_consensus_can_use_extra_fallbacks(
+ options);
switch (dls->schedule) {
case DL_SCHED_GENERIC:
- if (server)
- return get_options()->TestingServerDownloadSchedule;
- else
- return get_options()->TestingClientDownloadSchedule;
+ if (dir_server) {
+ return options->TestingServerDownloadSchedule;
+ } else {
+ return options->TestingClientDownloadSchedule;
+ }
case DL_SCHED_CONSENSUS:
- if (server)
- return get_options()->TestingServerConsensusDownloadSchedule;
- else
- return get_options()->TestingClientConsensusDownloadSchedule;
+ if (!multi_d) {
+ return options->TestingServerConsensusDownloadSchedule;
+ } else {
+ if (we_are_bootstrapping) {
+ if (!use_fallbacks) {
+ /* A bootstrapping client without extra fallback directories */
+ return
+ options->TestingClientBootstrapConsensusAuthorityOnlyDownloadSchedule;
+ } else if (dls->want_authority) {
+ /* A bootstrapping client with extra fallback directories, but
+ * connecting to an authority */
+ return
+ options->TestingClientBootstrapConsensusAuthorityDownloadSchedule;
+ } else {
+ /* A bootstrapping client connecting to extra fallback directories
+ */
+ return
+ options->TestingClientBootstrapConsensusFallbackDownloadSchedule;
+ }
+ } else {
+ return options->TestingClientConsensusDownloadSchedule;
+ }
+ }
case DL_SCHED_BRIDGE:
- return get_options()->TestingBridgeDownloadSchedule;
+ return options->TestingBridgeDownloadSchedule;
default:
tor_assert(0);
}
diff --cc src/or/directory.h
index 28442b9,d859df3..c5b5a5a
--- a/src/or/directory.h
+++ b/src/or/directory.h
@@@ -139,14 -129,12 +141,21 @@@ STATIC int purpose_needs_anonymity(uint
uint8_t router_purpose);
STATIC dirinfo_type_t dir_fetch_type(int dir_purpose, int router_purpose,
const char *resource);
+STATIC int directory_handle_command_get(dir_connection_t *conn,
+ const char *headers,
+ const char *req_body,
+ size_t req_body_len);
+STATIC int connection_dir_would_close_consensus_conn_helper(void);
+STATIC int download_status_schedule_get_delay(download_status_t *dls,
+ const smartlist_t *schedule,
+ time_t now);
++
+ STATIC char* authdir_type_to_string(dirinfo_type_t auth);
+ STATIC const char * dir_conn_purpose_to_string(int purpose);
+ STATIC int should_use_directory_guards(const or_options_t *options);
+ STATIC zlib_compression_level_t choose_compression_level(ssize_t n_bytes);
-STATIC const smartlist_t * find_dl_schedule_and_len(download_status_t *dls,
- int server);
++STATIC const smartlist_t *find_dl_schedule(download_status_t *dls,
++ const or_options_t *options);
#endif
#endif
diff --cc src/test/test_dir.c
index cf95df5,c888e00..b0ed307
--- a/src/test/test_dir.c
+++ b/src/test/test_dir.c
@@@ -26,8 -31,10 +31,11 @@@
#include "routerparse.h"
#include "routerset.h"
#include "test.h"
+#include "test_dir_common.h"
#include "torcert.h"
+ #include "relay.h"
+
+ #define NS_MODULE dir
static void
test_dir_nicknames(void *arg)
@@@ -3264,434 -3527,326 +3296,755 @@@ test_dir_packages(void *arg
}
static void
+test_dir_download_status_schedule(void *arg)
+{
+ (void)arg;
+ download_status_t dls_failure = { 0, 0, 0, DL_SCHED_GENERIC,
+ DL_WANT_AUTHORITY,
+ DL_SCHED_INCREMENT_FAILURE };
+ download_status_t dls_attempt = { 0, 0, 0, DL_SCHED_CONSENSUS,
+ DL_WANT_ANY_DIRSERVER,
+ DL_SCHED_INCREMENT_ATTEMPT};
+ download_status_t dls_bridge = { 0, 0, 0, DL_SCHED_BRIDGE,
+ DL_WANT_AUTHORITY,
+ DL_SCHED_INCREMENT_FAILURE};
+ int increment = -1;
+ int expected_increment = -1;
+ time_t current_time = time(NULL);
+ int delay1 = -1;
+ int delay2 = -1;
+ smartlist_t *schedule = smartlist_new();
+
+ /* Make a dummy schedule */
+ smartlist_add(schedule, (void *)&delay1);
+ smartlist_add(schedule, (void *)&delay2);
+
+ /* check a range of values */
+ delay1 = 1000;
+ increment = download_status_schedule_get_delay(&dls_failure,
+ schedule,
+ TIME_MIN);
+ expected_increment = delay1;
+ tt_assert(increment == expected_increment);
+ tt_assert(dls_failure.next_attempt_at == TIME_MIN + expected_increment);
+
+#if TIME_T_IS_SIGNED
+ delay1 = INT_MAX;
+ increment = download_status_schedule_get_delay(&dls_failure,
+ schedule,
+ -1);
+ expected_increment = delay1;
+ tt_assert(increment == expected_increment);
+ tt_assert(dls_failure.next_attempt_at == TIME_MAX);
+#endif
+
+ delay1 = 0;
+ increment = download_status_schedule_get_delay(&dls_attempt,
+ schedule,
+ 0);
+ expected_increment = delay1;
+ tt_assert(increment == expected_increment);
+ tt_assert(dls_attempt.next_attempt_at == 0 + expected_increment);
+
+ delay1 = 1000;
+ increment = download_status_schedule_get_delay(&dls_attempt,
+ schedule,
+ 1);
+ expected_increment = delay1;
+ tt_assert(increment == expected_increment);
+ tt_assert(dls_attempt.next_attempt_at == 1 + expected_increment);
+
+ delay1 = INT_MAX;
+ increment = download_status_schedule_get_delay(&dls_bridge,
+ schedule,
+ current_time);
+ expected_increment = delay1;
+ tt_assert(increment == expected_increment);
+ tt_assert(dls_bridge.next_attempt_at == TIME_MAX);
+
+ delay1 = 1;
+ increment = download_status_schedule_get_delay(&dls_bridge,
+ schedule,
+ TIME_MAX);
+ expected_increment = delay1;
+ tt_assert(increment == expected_increment);
+ tt_assert(dls_bridge.next_attempt_at == TIME_MAX);
+
+ /* see what happens when we reach the end */
+ dls_attempt.n_download_attempts++;
+ dls_bridge.n_download_failures++;
+
+ delay2 = 100;
+ increment = download_status_schedule_get_delay(&dls_attempt,
+ schedule,
+ current_time);
+ expected_increment = delay2;
+ tt_assert(increment == expected_increment);
+ tt_assert(dls_attempt.next_attempt_at == current_time + delay2);
+
+ delay2 = 1;
+ increment = download_status_schedule_get_delay(&dls_bridge,
+ schedule,
+ current_time);
+ expected_increment = delay2;
+ tt_assert(increment == expected_increment);
+ tt_assert(dls_bridge.next_attempt_at == current_time + delay2);
+
+ /* see what happens when we try to go off the end */
+ dls_attempt.n_download_attempts++;
+ dls_bridge.n_download_failures++;
+
+ delay2 = 5;
+ increment = download_status_schedule_get_delay(&dls_attempt,
+ schedule,
+ current_time);
+ expected_increment = delay2;
+ tt_assert(increment == expected_increment);
+ tt_assert(dls_attempt.next_attempt_at == current_time + delay2);
+
+ delay2 = 17;
+ increment = download_status_schedule_get_delay(&dls_bridge,
+ schedule,
+ current_time);
+ expected_increment = delay2;
+ tt_assert(increment == expected_increment);
+ tt_assert(dls_bridge.next_attempt_at == current_time + delay2);
+
+ /* see what happens when we reach IMPOSSIBLE_TO_DOWNLOAD */
+ dls_attempt.n_download_attempts = IMPOSSIBLE_TO_DOWNLOAD;
+ dls_bridge.n_download_failures = IMPOSSIBLE_TO_DOWNLOAD;
+
+ delay2 = 35;
+ increment = download_status_schedule_get_delay(&dls_attempt,
+ schedule,
+ current_time);
+ expected_increment = INT_MAX;
+ tt_assert(increment == expected_increment);
+ tt_assert(dls_attempt.next_attempt_at == TIME_MAX);
+
+ delay2 = 99;
+ increment = download_status_schedule_get_delay(&dls_bridge,
+ schedule,
+ current_time);
+ expected_increment = INT_MAX;
+ tt_assert(increment == expected_increment);
+ tt_assert(dls_bridge.next_attempt_at == TIME_MAX);
+
+ done:
+ /* the pointers in schedule are allocated on the stack */
+ smartlist_free(schedule);
+}
+
+static void
+test_dir_download_status_increment(void *arg)
+{
+ (void)arg;
+ download_status_t dls_failure = { 0, 0, 0, DL_SCHED_GENERIC,
+ DL_WANT_AUTHORITY,
+ DL_SCHED_INCREMENT_FAILURE };
+ download_status_t dls_attempt = { 0, 0, 0, DL_SCHED_BRIDGE,
+ DL_WANT_ANY_DIRSERVER,
+ DL_SCHED_INCREMENT_ATTEMPT};
+ int delay0 = -1;
+ int delay1 = -1;
+ int delay2 = -1;
+ smartlist_t *schedule = smartlist_new();
+ or_options_t test_options;
+ time_t next_at = TIME_MAX;
+ time_t current_time = time(NULL);
+
+ /* Provide some values for the schedule */
+ delay0 = 10;
+ delay1 = 99;
+ delay2 = 20;
+
+ /* Make the schedule */
+ smartlist_add(schedule, (void *)&delay0);
+ smartlist_add(schedule, (void *)&delay1);
+ smartlist_add(schedule, (void *)&delay2);
+
+ /* Put it in the options */
+ mock_options = &test_options;
+ reset_options(mock_options, &mock_get_options_calls);
+ mock_options->TestingClientDownloadSchedule = schedule;
+ mock_options->TestingBridgeDownloadSchedule = schedule;
+
+ MOCK(get_options, mock_get_options);
+
+ /* Check that a failure reset works */
+ mock_get_options_calls = 0;
+ download_status_reset(&dls_failure);
+ /* we really want to test that it's equal to time(NULL) + delay0, but that's
+ * an unrealiable test, because time(NULL) might change. */
+ tt_assert(download_status_get_next_attempt_at(&dls_failure)
+ >= current_time + delay0);
+ tt_assert(download_status_get_next_attempt_at(&dls_failure)
+ != TIME_MAX);
+ tt_assert(download_status_get_n_failures(&dls_failure) == 0);
+ tt_assert(download_status_get_n_attempts(&dls_failure) == 0);
+ tt_assert(mock_get_options_calls >= 1);
+
+ /* avoid timing inconsistencies */
+ dls_failure.next_attempt_at = current_time + delay0;
+
+ /* check that a reset schedule becomes ready at the right time */
+ tt_assert(download_status_is_ready(&dls_failure,
+ current_time + delay0 - 1,
+ 1) == 0);
+ tt_assert(download_status_is_ready(&dls_failure,
+ current_time + delay0,
+ 1) == 1);
+ tt_assert(download_status_is_ready(&dls_failure,
+ current_time + delay0 + 1,
+ 1) == 1);
+
+ /* Check that a failure increment works */
+ mock_get_options_calls = 0;
+ next_at = download_status_increment_failure(&dls_failure, 404, "test", 0,
+ current_time);
+ tt_assert(next_at == current_time + delay1);
+ tt_assert(download_status_get_n_failures(&dls_failure) == 1);
+ tt_assert(download_status_get_n_attempts(&dls_failure) == 1);
+ tt_assert(mock_get_options_calls >= 1);
+
+ /* check that an incremented schedule becomes ready at the right time */
+ tt_assert(download_status_is_ready(&dls_failure,
+ current_time + delay1 - 1,
+ 1) == 0);
+ tt_assert(download_status_is_ready(&dls_failure,
+ current_time + delay1,
+ 1) == 1);
+ tt_assert(download_status_is_ready(&dls_failure,
+ current_time + delay1 + 1,
+ 1) == 1);
+
+ /* check that a schedule isn't ready if it's had too many failures */
+ tt_assert(download_status_is_ready(&dls_failure,
+ current_time + delay1 + 10,
+ 0) == 0);
+
+ /* Check that failure increments don't happen on 503 for clients, but that
+ * attempt increments do. */
+ mock_get_options_calls = 0;
+ next_at = download_status_increment_failure(&dls_failure, 503, "test", 0,
+ current_time);
+ tt_assert(next_at == current_time + delay1);
+ tt_assert(download_status_get_n_failures(&dls_failure) == 1);
+ tt_assert(download_status_get_n_attempts(&dls_failure) == 2);
+ tt_assert(mock_get_options_calls >= 1);
+
+ /* Check that failure increments do happen on 503 for servers */
+ mock_get_options_calls = 0;
+ next_at = download_status_increment_failure(&dls_failure, 503, "test", 1,
+ current_time);
+ tt_assert(next_at == current_time + delay2);
+ tt_assert(download_status_get_n_failures(&dls_failure) == 2);
+ tt_assert(download_status_get_n_attempts(&dls_failure) == 3);
+ tt_assert(mock_get_options_calls >= 1);
+
+ /* Check what happens when we run off the end of the schedule */
+ mock_get_options_calls = 0;
+ next_at = download_status_increment_failure(&dls_failure, 404, "test", 0,
+ current_time);
+ tt_assert(next_at == current_time + delay2);
+ tt_assert(download_status_get_n_failures(&dls_failure) == 3);
+ tt_assert(download_status_get_n_attempts(&dls_failure) == 4);
+ tt_assert(mock_get_options_calls >= 1);
+
+ /* Check what happens when we hit the failure limit */
+ mock_get_options_calls = 0;
+ download_status_mark_impossible(&dls_failure);
+ next_at = download_status_increment_failure(&dls_failure, 404, "test", 0,
+ current_time);
+ tt_assert(next_at == TIME_MAX);
+ tt_assert(download_status_get_n_failures(&dls_failure)
+ == IMPOSSIBLE_TO_DOWNLOAD);
+ tt_assert(download_status_get_n_attempts(&dls_failure)
+ == IMPOSSIBLE_TO_DOWNLOAD);
+ tt_assert(mock_get_options_calls >= 1);
+
+ /* Check that a failure reset doesn't reset at the limit */
+ mock_get_options_calls = 0;
+ download_status_reset(&dls_failure);
+ tt_assert(download_status_get_next_attempt_at(&dls_failure)
+ == TIME_MAX);
+ tt_assert(download_status_get_n_failures(&dls_failure)
+ == IMPOSSIBLE_TO_DOWNLOAD);
+ tt_assert(download_status_get_n_attempts(&dls_failure)
+ == IMPOSSIBLE_TO_DOWNLOAD);
+ tt_assert(mock_get_options_calls == 0);
+
+ /* Check that a failure reset resets just before the limit */
+ mock_get_options_calls = 0;
+ dls_failure.n_download_failures = IMPOSSIBLE_TO_DOWNLOAD - 1;
+ dls_failure.n_download_attempts = IMPOSSIBLE_TO_DOWNLOAD - 1;
+ download_status_reset(&dls_failure);
+ /* we really want to test that it's equal to time(NULL) + delay0, but that's
+ * an unrealiable test, because time(NULL) might change. */
+ tt_assert(download_status_get_next_attempt_at(&dls_failure)
+ >= current_time + delay0);
+ tt_assert(download_status_get_next_attempt_at(&dls_failure)
+ != TIME_MAX);
+ tt_assert(download_status_get_n_failures(&dls_failure) == 0);
+ tt_assert(download_status_get_n_attempts(&dls_failure) == 0);
+ tt_assert(mock_get_options_calls >= 1);
+
+ /* Check that failure increments do happen on attempt-based schedules,
+ * but that the retry is set at the end of time */
+ mock_get_options_calls = 0;
+ next_at = download_status_increment_failure(&dls_attempt, 404, "test", 0,
+ current_time);
+ tt_assert(next_at == TIME_MAX);
+ tt_assert(download_status_get_n_failures(&dls_attempt) == 1);
+ tt_assert(download_status_get_n_attempts(&dls_attempt) == 0);
+ tt_assert(mock_get_options_calls == 0);
+
+ /* Check that an attempt reset works */
+ mock_get_options_calls = 0;
+ download_status_reset(&dls_attempt);
+ /* we really want to test that it's equal to time(NULL) + delay0, but that's
+ * an unrealiable test, because time(NULL) might change. */
+ tt_assert(download_status_get_next_attempt_at(&dls_attempt)
+ >= current_time + delay0);
+ tt_assert(download_status_get_next_attempt_at(&dls_attempt)
+ != TIME_MAX);
+ tt_assert(download_status_get_n_failures(&dls_attempt) == 0);
+ tt_assert(download_status_get_n_attempts(&dls_attempt) == 0);
+ tt_assert(mock_get_options_calls >= 1);
+
+ /* avoid timing inconsistencies */
+ dls_attempt.next_attempt_at = current_time + delay0;
+
+ /* check that a reset schedule becomes ready at the right time */
+ tt_assert(download_status_is_ready(&dls_attempt,
+ current_time + delay0 - 1,
+ 1) == 0);
+ tt_assert(download_status_is_ready(&dls_attempt,
+ current_time + delay0,
+ 1) == 1);
+ tt_assert(download_status_is_ready(&dls_attempt,
+ current_time + delay0 + 1,
+ 1) == 1);
+
+ /* Check that an attempt increment works */
+ mock_get_options_calls = 0;
+ next_at = download_status_increment_attempt(&dls_attempt, "test",
+ current_time);
+ tt_assert(next_at == current_time + delay1);
+ tt_assert(download_status_get_n_failures(&dls_attempt) == 0);
+ tt_assert(download_status_get_n_attempts(&dls_attempt) == 1);
+ tt_assert(mock_get_options_calls >= 1);
+
+ /* check that an incremented schedule becomes ready at the right time */
+ tt_assert(download_status_is_ready(&dls_attempt,
+ current_time + delay1 - 1,
+ 1) == 0);
+ tt_assert(download_status_is_ready(&dls_attempt,
+ current_time + delay1,
+ 1) == 1);
+ tt_assert(download_status_is_ready(&dls_attempt,
+ current_time + delay1 + 1,
+ 1) == 1);
+
+ /* check that a schedule isn't ready if it's had too many attempts */
+ tt_assert(download_status_is_ready(&dls_attempt,
+ current_time + delay1 + 10,
+ 0) == 0);
+
+ /* Check what happens when we reach then run off the end of the schedule */
+ mock_get_options_calls = 0;
+ next_at = download_status_increment_attempt(&dls_attempt, "test",
+ current_time);
+ tt_assert(next_at == current_time + delay2);
+ tt_assert(download_status_get_n_failures(&dls_attempt) == 0);
+ tt_assert(download_status_get_n_attempts(&dls_attempt) == 2);
+ tt_assert(mock_get_options_calls >= 1);
+
+ mock_get_options_calls = 0;
+ next_at = download_status_increment_attempt(&dls_attempt, "test",
+ current_time);
+ tt_assert(next_at == current_time + delay2);
+ tt_assert(download_status_get_n_failures(&dls_attempt) == 0);
+ tt_assert(download_status_get_n_attempts(&dls_attempt) == 3);
+ tt_assert(mock_get_options_calls >= 1);
+
+ /* Check what happens when we hit the attempt limit */
+ mock_get_options_calls = 0;
+ download_status_mark_impossible(&dls_attempt);
+ next_at = download_status_increment_attempt(&dls_attempt, "test",
+ current_time);
+ tt_assert(next_at == TIME_MAX);
+ tt_assert(download_status_get_n_failures(&dls_attempt)
+ == IMPOSSIBLE_TO_DOWNLOAD);
+ tt_assert(download_status_get_n_attempts(&dls_attempt)
+ == IMPOSSIBLE_TO_DOWNLOAD);
+ tt_assert(mock_get_options_calls >= 1);
+
+ /* Check that an attempt reset doesn't reset at the limit */
+ mock_get_options_calls = 0;
+ download_status_reset(&dls_attempt);
+ tt_assert(download_status_get_next_attempt_at(&dls_attempt)
+ == TIME_MAX);
+ tt_assert(download_status_get_n_failures(&dls_attempt)
+ == IMPOSSIBLE_TO_DOWNLOAD);
+ tt_assert(download_status_get_n_attempts(&dls_attempt)
+ == IMPOSSIBLE_TO_DOWNLOAD);
+ tt_assert(mock_get_options_calls == 0);
+
+ /* Check that an attempt reset resets just before the limit */
+ mock_get_options_calls = 0;
+ dls_attempt.n_download_failures = IMPOSSIBLE_TO_DOWNLOAD - 1;
+ dls_attempt.n_download_attempts = IMPOSSIBLE_TO_DOWNLOAD - 1;
+ download_status_reset(&dls_attempt);
+ /* we really want to test that it's equal to time(NULL) + delay0, but that's
+ * an unrealiable test, because time(NULL) might change. */
+ tt_assert(download_status_get_next_attempt_at(&dls_attempt)
+ >= current_time + delay0);
+ tt_assert(download_status_get_next_attempt_at(&dls_attempt)
+ != TIME_MAX);
+ tt_assert(download_status_get_n_failures(&dls_attempt) == 0);
+ tt_assert(download_status_get_n_attempts(&dls_attempt) == 0);
+ tt_assert(mock_get_options_calls >= 1);
+
+ /* Check that attempt increments don't happen on failure-based schedules,
+ * and that the attempt is set at the end of time */
+ mock_get_options_calls = 0;
+ next_at = download_status_increment_attempt(&dls_failure, "test",
+ current_time);
+ tt_assert(next_at == TIME_MAX);
+ tt_assert(download_status_get_n_failures(&dls_failure) == 0);
+ tt_assert(download_status_get_n_attempts(&dls_failure) == 0);
+ tt_assert(mock_get_options_calls == 0);
+
+ done:
+ /* the pointers in schedule are allocated on the stack */
+ smartlist_free(schedule);
+ UNMOCK(get_options);
+ mock_options = NULL;
+ mock_get_options_calls = 0;
+}
+
++static void
+ test_dir_authdir_type_to_string(void *data)
+ {
+ (void)data;
+ char *res;
+
+ tt_str_op(res = authdir_type_to_string(NO_DIRINFO), OP_EQ,
+ "[Not an authority]");
+ tor_free(res);
+
+ tt_str_op(res = authdir_type_to_string(EXTRAINFO_DIRINFO), OP_EQ,
+ "[Not an authority]");
+ tor_free(res);
+
+ tt_str_op(res = authdir_type_to_string(MICRODESC_DIRINFO), OP_EQ,
+ "[Not an authority]");
+ tor_free(res);
+
+ tt_str_op(res = authdir_type_to_string(V3_DIRINFO), OP_EQ, "V3");
+ tor_free(res);
+
+ tt_str_op(res = authdir_type_to_string(BRIDGE_DIRINFO), OP_EQ, "Bridge");
+ tor_free(res);
+
+ tt_str_op(res = authdir_type_to_string(
+ V3_DIRINFO | BRIDGE_DIRINFO | EXTRAINFO_DIRINFO), OP_EQ,
+ "V3, Bridge");
+ done:
+ tor_free(res);
+ }
+
+ static void
+ test_dir_conn_purpose_to_string(void *data)
+ {
+ (void)data;
+
+ #define EXPECT_CONN_PURPOSE(purpose, expected) \
+ tt_str_op(dir_conn_purpose_to_string(purpose), OP_EQ, expected);
+
+ EXPECT_CONN_PURPOSE(DIR_PURPOSE_UPLOAD_DIR, "server descriptor upload");
+ EXPECT_CONN_PURPOSE(DIR_PURPOSE_UPLOAD_VOTE, "server vote upload");
+ EXPECT_CONN_PURPOSE(DIR_PURPOSE_UPLOAD_SIGNATURES,
+ "consensus signature upload");
+ EXPECT_CONN_PURPOSE(DIR_PURPOSE_FETCH_SERVERDESC, "server descriptor fetch");
+ EXPECT_CONN_PURPOSE(DIR_PURPOSE_FETCH_EXTRAINFO, "extra-info fetch");
+ EXPECT_CONN_PURPOSE(DIR_PURPOSE_FETCH_CONSENSUS,
+ "consensus network-status fetch");
+ EXPECT_CONN_PURPOSE(DIR_PURPOSE_FETCH_CERTIFICATE, "authority cert fetch");
+ EXPECT_CONN_PURPOSE(DIR_PURPOSE_FETCH_STATUS_VOTE, "status vote fetch");
+ EXPECT_CONN_PURPOSE(DIR_PURPOSE_FETCH_DETACHED_SIGNATURES,
+ "consensus signature fetch");
+ EXPECT_CONN_PURPOSE(DIR_PURPOSE_FETCH_RENDDESC_V2,
+ "hidden-service v2 descriptor fetch");
+ EXPECT_CONN_PURPOSE(DIR_PURPOSE_UPLOAD_RENDDESC_V2,
+ "hidden-service v2 descriptor upload");
+ EXPECT_CONN_PURPOSE(DIR_PURPOSE_FETCH_MICRODESC, "microdescriptor fetch");
+ EXPECT_CONN_PURPOSE(1024, "(unknown)");
+
+ done: ;
+ }
+
+ NS_DECL(int,
+ public_server_mode, (const or_options_t *options));
+
+ static int
+ NS(public_server_mode)(const or_options_t *options)
+ {
+ (void)options;
+
+ if (CALLED(public_server_mode)++ == 0) {
+ return 1;
+ }
+
+ return 0;
+ }
+
+ static void
+ test_dir_should_use_directory_guards(void *data)
+ {
+ or_options_t *options;
+ char *errmsg = NULL;
+ (void)data;
+
+ NS_MOCK(public_server_mode);
+
+ options = options_new();
+ options_init(options);
+
+ tt_int_op(should_use_directory_guards(options), OP_EQ, 0);
+ tt_int_op(CALLED(public_server_mode), OP_EQ, 1);
+
+ options->UseEntryGuardsAsDirGuards = 1;
+ options->UseEntryGuards = 1;
+ options->DownloadExtraInfo = 0;
+ options->FetchDirInfoEarly = 0;
+ options->FetchDirInfoExtraEarly = 0;
+ options->FetchUselessDescriptors = 0;
+ tt_int_op(should_use_directory_guards(options), OP_EQ, 1);
+ tt_int_op(CALLED(public_server_mode), OP_EQ, 2);
+
+ options->UseEntryGuards = 0;
+ tt_int_op(should_use_directory_guards(options), OP_EQ, 0);
+ tt_int_op(CALLED(public_server_mode), OP_EQ, 3);
+ options->UseEntryGuards = 1;
+
+ options->UseEntryGuardsAsDirGuards = 0;
+ tt_int_op(should_use_directory_guards(options), OP_EQ, 0);
+ tt_int_op(CALLED(public_server_mode), OP_EQ, 4);
+ options->UseEntryGuardsAsDirGuards = 1;
+
+ options->DownloadExtraInfo = 1;
+ tt_int_op(should_use_directory_guards(options), OP_EQ, 0);
+ tt_int_op(CALLED(public_server_mode), OP_EQ, 5);
+ options->DownloadExtraInfo = 0;
+
+ options->FetchDirInfoEarly = 1;
+ tt_int_op(should_use_directory_guards(options), OP_EQ, 0);
+ tt_int_op(CALLED(public_server_mode), OP_EQ, 6);
+ options->FetchDirInfoEarly = 0;
+
+ options->FetchDirInfoExtraEarly = 1;
+ tt_int_op(should_use_directory_guards(options), OP_EQ, 0);
+ tt_int_op(CALLED(public_server_mode), OP_EQ, 7);
+ options->FetchDirInfoExtraEarly = 0;
+
+ options->FetchUselessDescriptors = 1;
+ tt_int_op(should_use_directory_guards(options), OP_EQ, 0);
+ tt_int_op(CALLED(public_server_mode), OP_EQ, 8);
+ options->FetchUselessDescriptors = 0;
+
+ done:
+ NS_UNMOCK(public_server_mode);
+ or_options_free(options);
+ tor_free(errmsg);
+ }
+
+ NS_DECL(void,
+ directory_initiate_command_routerstatus, (const routerstatus_t *status,
+ uint8_t dir_purpose,
+ uint8_t router_purpose,
+ dir_indirection_t indirection,
+ const char *resource,
+ const char *payload,
+ size_t payload_len,
+ time_t if_modified_since));
+
+ static void
+ test_dir_should_not_init_request_to_ourselves(void *data)
+ {
+ char digest[DIGEST_LEN];
+ dir_server_t *ourself = NULL;
+ crypto_pk_t *key = pk_generate(2);
+ (void) data;
+
+ NS_MOCK(directory_initiate_command_routerstatus);
+
+ clear_dir_servers();
+ routerlist_free_all();
+
+ set_server_identity_key(key);
+ crypto_pk_get_digest(key, (char*) &digest);
+ ourself = trusted_dir_server_new("ourself", "127.0.0.1", 9059, 9060, digest,
+ NULL, V3_DIRINFO, 1.0);
+
+ tt_assert(ourself);
+ dir_server_add(ourself);
+
+ directory_get_from_all_authorities(DIR_PURPOSE_FETCH_STATUS_VOTE, 0, NULL);
+ tt_int_op(CALLED(directory_initiate_command_routerstatus), OP_EQ, 0);
+
+ directory_get_from_all_authorities(DIR_PURPOSE_FETCH_DETACHED_SIGNATURES, 0,
+ NULL);
+
+ tt_int_op(CALLED(directory_initiate_command_routerstatus), OP_EQ, 0);
+
+ done:
+ NS_UNMOCK(directory_initiate_command_routerstatus);
+ clear_dir_servers();
+ routerlist_free_all();
+ crypto_pk_free(key);
+ }
+
+ static void
+ test_dir_should_not_init_request_to_dir_auths_without_v3_info(void *data)
+ {
+ dir_server_t *ds = NULL;
+ dirinfo_type_t dirinfo_type = BRIDGE_DIRINFO | EXTRAINFO_DIRINFO \
+ | MICRODESC_DIRINFO;
+ (void) data;
+
+ NS_MOCK(directory_initiate_command_routerstatus);
+
+ clear_dir_servers();
+ routerlist_free_all();
+
+ ds = trusted_dir_server_new("ds", "10.0.0.1", 9059, 9060,
+ "12345678901234567890", NULL, dirinfo_type, 1.0);
+ tt_assert(ds);
+ dir_server_add(ds);
+
+ directory_get_from_all_authorities(DIR_PURPOSE_FETCH_STATUS_VOTE, 0, NULL);
+ tt_int_op(CALLED(directory_initiate_command_routerstatus), OP_EQ, 0);
+
+ directory_get_from_all_authorities(DIR_PURPOSE_FETCH_DETACHED_SIGNATURES, 0,
+ NULL);
+ tt_int_op(CALLED(directory_initiate_command_routerstatus), OP_EQ, 0);
+
+ done:
+ NS_UNMOCK(directory_initiate_command_routerstatus);
+ clear_dir_servers();
+ routerlist_free_all();
+ }
+
+ static void
+ test_dir_should_init_request_to_dir_auths(void *data)
+ {
+ dir_server_t *ds = NULL;
+ (void) data;
+
+ NS_MOCK(directory_initiate_command_routerstatus);
+
+ clear_dir_servers();
+ routerlist_free_all();
+
+ ds = trusted_dir_server_new("ds", "10.0.0.1", 9059, 9060,
+ "12345678901234567890", NULL, V3_DIRINFO, 1.0);
+ tt_assert(ds);
+ dir_server_add(ds);
+
+ directory_get_from_all_authorities(DIR_PURPOSE_FETCH_STATUS_VOTE, 0, NULL);
+ tt_int_op(CALLED(directory_initiate_command_routerstatus), OP_EQ, 1);
+
+ directory_get_from_all_authorities(DIR_PURPOSE_FETCH_DETACHED_SIGNATURES, 0,
+ NULL);
+ tt_int_op(CALLED(directory_initiate_command_routerstatus), OP_EQ, 2);
+
+ done:
+ NS_UNMOCK(directory_initiate_command_routerstatus);
+ clear_dir_servers();
+ routerlist_free_all();
+ }
+
+ void
+ NS(directory_initiate_command_routerstatus)(const routerstatus_t *status,
+ uint8_t dir_purpose,
+ uint8_t router_purpose,
+ dir_indirection_t indirection,
+ const char *resource,
+ const char *payload,
+ size_t payload_len,
+ time_t if_modified_since)
+ {
+ (void)status;
+ (void)dir_purpose;
+ (void)router_purpose;
+ (void)indirection;
+ (void)resource;
+ (void)payload;
+ (void)payload_len;
+ (void)if_modified_since;
+ CALLED(directory_initiate_command_routerstatus)++;
+ }
+
+ static void
+ test_dir_choose_compression_level(void* data)
+ {
+ (void)data;
+
+ /* It starts under_memory_pressure */
+ tt_int_op(have_been_under_memory_pressure(), OP_EQ, 1);
+
+ tt_assert(HIGH_COMPRESSION == choose_compression_level(-1));
+ tt_assert(LOW_COMPRESSION == choose_compression_level(1024-1));
+ tt_assert(MEDIUM_COMPRESSION == choose_compression_level(2048-1));
+ tt_assert(HIGH_COMPRESSION == choose_compression_level(2048));
+
+ /* Reset under_memory_pressure timer */
+ cell_queues_check_size();
+ tt_int_op(have_been_under_memory_pressure(), OP_EQ, 0);
+
+ tt_assert(HIGH_COMPRESSION == choose_compression_level(-1));
+ tt_assert(HIGH_COMPRESSION == choose_compression_level(1024-1));
+ tt_assert(HIGH_COMPRESSION == choose_compression_level(2048-1));
+ tt_assert(HIGH_COMPRESSION == choose_compression_level(2048));
+
+ done: ;
+ }
+
+ static void
+ test_dir_find_dl_schedule_and_len(void* data)
+ {
+ download_status_t dls;
+ smartlist_t server, client, server_cons, client_cons, bridge;
+ (void)data;
+
+ mock_options = malloc(sizeof(or_options_t));
+ reset_options(mock_options, &mock_get_options_calls);
+ MOCK(get_options, mock_get_options);
+
+ mock_options->TestingServerDownloadSchedule = &server;
+ mock_options->TestingClientDownloadSchedule = &client;
+ mock_options->TestingServerConsensusDownloadSchedule = &server_cons;
+ mock_options->TestingClientConsensusDownloadSchedule = &client_cons;
+ mock_options->TestingBridgeDownloadSchedule = &bridge;
+
+ dls.schedule = DL_SCHED_GENERIC;
+ tt_ptr_op(find_dl_schedule_and_len(&dls, 0), OP_EQ, &client);
+ tt_ptr_op(find_dl_schedule_and_len(&dls, 1), OP_EQ, &server);
+
+ dls.schedule = DL_SCHED_CONSENSUS;
+ tt_ptr_op(find_dl_schedule_and_len(&dls, 0), OP_EQ, &client_cons);
+ tt_ptr_op(find_dl_schedule_and_len(&dls, 1), OP_EQ, &server_cons);
+
+ dls.schedule = DL_SCHED_BRIDGE;
+ tt_ptr_op(find_dl_schedule_and_len(&dls, 0), OP_EQ, &bridge);
+ tt_ptr_op(find_dl_schedule_and_len(&dls, 1), OP_EQ, &bridge);
+
+ done:
+ UNMOCK(get_options);
+ }
+
#define DIR_LEGACY(name) \
{ #name, test_dir_ ## name , TT_FORK, NULL, NULL }
@@@ -3723,8 -3878,13 +4076,16 @@@ struct testcase_t dir_tests[] =
DIR(purpose_needs_anonymity, 0),
DIR(fetch_type, 0),
DIR(packages, 0),
+ DIR(download_status_schedule, 0),
+ DIR(download_status_increment, 0),
+ DIR(authdir_type_to_string, 0),
+ DIR(conn_purpose_to_string, 0),
+ DIR(should_use_directory_guards, 0),
+ DIR(should_not_init_request_to_ourselves, TT_FORK),
+ DIR(should_not_init_request_to_dir_auths_without_v3_info, 0),
+ DIR(should_init_request_to_dir_auths, 0),
+ DIR(choose_compression_level, 0),
+ DIR(find_dl_schedule_and_len, 0),
END_OF_TESTCASES
};
+
1
0