Folgendes Skript erzeugt ein Backup von den globalen Daten einer Postgres-Installation und ausgewählten Datenbanken. Für die Datenbanken wird das tar-Format von pg_dump verwendet. Das hat den Vorteil, daß beim Wiederherstellen Datenbankobjekte umsortiert und ausgelassen werden können. Das tar-Format hat zusätzlich den Vorteil mit Standard-Tools bearbeitet werden zu können, da die Daten-Dateien im Tab-Delimited-Format gespeichert werden.
Sichere Passwörter in Windows-Netzwerken (ntlmv2)
Kaum zu glauben, aber standardmäßig versenden die Windows-Versionen NT, 2000 und XP immer noch die unsicheren Lanman-Passwörter ins Netzwerk. Zusätzlich ist die einzig sinnvolle Option, nämlich die NTLMv2-Authentifizierung zu verwenden, standardmäßig deaktiviert…
Continue reading “Sichere Passwörter in Windows-Netzwerken (ntlmv2)”
Wie man unter Typo3 URLs mit der uid des eingeloggten Benutzers erzeugt
Das Einfügen eines Links mit der Benutzer-ID ist nicht-trivial, da auf die uid nicht mit TypoScript zugegriffen werden kann. Man muß dazu PHP bemühen und eine user function user_* beispielsweise in der Datei fileadmin/templates/miscfunctions.php anlegen:
function user_getuserid($content,$conf) { return $GLOBALS['TSFE']->fe_user->user[uid]; }
Anschließend wird im Template im Setup-Bereich die PHP-Datei eingebunden:
includeLibs.get_userid = fileadmin/templates/miscfunctions.php
Nun kann man das PHP-Skript mit Typoscript auslesen:
temp.mein_link = COA temp.mein_link.wrap ( <a href="irgendeineurl.php?uid=|"> mein_link </a> ) temp.mein_link.10 = UINT temp.mein_link.10.userFunc = user_getuserid
openssl speed measurements
I recently did some speed measurements for crypto algorithms with different hardware. The background was to compare the SSL negotation/handshake drawback when switching from 1024 to 2048 bit with RSA and DSA, especially for openvpn.
It shows that even with the oldest hardware (166 MHz Pentium) its affordable in terms of speed to use a 2048 bit RSA key. Note that normally a public key handshake is only done at the beginning of the communication process and then perhaps every hour. With hybrid algorithms the speed of the communication path depends from the symetric cipher.
https/ssl support for scuttle
Apply the following patch to have a ssl enabled scuttle installation. See also sourceforge patch tracker:
--- header.inc.php.orig 2006-04-28 20:38:03.000000000 +0200 +++ header.inc.php 2006-04-28 20:45:26.000000000 +0200 @@ -19,7 +19,12 @@ } if (($root != '/') && (substr($root, -1, 1) != '/')) $root .= '/'; - $root = 'http://'. $_SERVER['HTTP_HOST'] . $root; + + if(isset($_SERVER['HTTPS'])) + $root = 'https://' . $_SERVER['HTTP_HOST'] . $root; + else + $root = 'http://' . $_SERVER['HTTP_HOST'] . $root; + } // Handle cookies