Author Archive

2 lata

Posted on the July 2nd, 2008 under Droga do szkoły by Konrad Żak

Dłuższa chwila milczenia.

M: Robiłem coś fajnego. 2 roki temu.
K: 2 roki to 2 lata.
M: No to 1 lato.
K: 1 lato to 1 rok.
M: No to nie, 2 miesiące.
K: 2 miesiące to 60 dni.

I sobie pogadali.

Squid on custom port and SELinux – “Cannot open HTTP Port” problem

Posted on the May 8th, 2008 under IT, Linux by Konrad Żak

If you’d like to run squid on custom port i.e. 8080 with SELinux in enforcing state, be sure to set squid_disable_trans to on – it’s default set to off. Otherwise, squid will not be able to bind to port with “Cannot open HTTP Port” error.

[root@ulisses ~]# getsebool -a | grep squid_disable_trans
squid_disable_trans --> off
[root@ulisses ~]# setsebool -P squid_disable_trans 1
[root@ulisses ~]# getsebool -a | grep squid_disable_trans
squid_disable_trans --> on

Wiosenna wycieczka, czyli deszczowa Siurana

Posted on the April 17th, 2008 under Climbing, Friends, Personal by Konrad Żak

Wykasłuję płuca po powrocie z Hiszpanii, która za nic nie chciała być ciepła, choć nieco się starała i dwa razy widziałem słońce. Wylecieliśmy z Wrocławia w niedzielę, 6-go kwietnia i przez tydzień mroziliśmy tyłki w Siuranie – hiszpańskim końcu świata, z jednodniową przerwą na pod-wycieczkę do Barcelony. Wróciliśmy do Wrocławia w kolejną niedzielę, 13-go kwietnia, błogosławiąc wrocławskie zawrotne 17 stopni Celsjusza. Sie-dem-naś-cie! Ze wspinania niewiele wyszło – tu za zimno, tam za trudno, tego nie chcemy, a jak owe dwa razy słońce wyszło to akurat byliśmy pijani, albo planowaliśmy być – bo hiszpańskie wino dobre jest i tanie. Zresztą piwo również. Doskonałym pomysłem było wynajęcie samochodów – świetnie  jak powszechnie wiadomo, chronią przed deszczem. I jeżdżą. Mam kilka zdjęć żywych ludzi. Ale najpierw góry z góry, czyli chmury. Ludzie w lipcu.

Zapora

Matterhorn

Grań

PHP disable_functions and SquirrelMail

Posted on the March 13th, 2008 under Apache, PHP by Konrad Żak

If you’re concerned about security you might be interested in simple, but time saving fact, that SquirrelMail seems to require at least fsockopen and popen PHP function to not be disallowed in Apache/mod_php with disable_functions configuration directive. Regards.

Simple service watchdog

Posted on the January 15th, 2008 under IT, Linux by Konrad Żak

Recently I got some trouble with saslauthd unexpectly dying. Despite strong will to discover cause of problems I needed badly some kind of watchdog bringing dead service back to life. Yes, there is still inittab respawn at your disposal, but it has some major drawbacks.

Consider this simple shell script:

#!/bin/sh
# give the $4 service $1 seconds to start
sleep $1
# then every $2 seconds check if it's running by looking
# for $3 string in the list of processes...
# and if it's not running restart the $4 service
while true; do if [[ ! `ps -efw |grep -v grep |grep -v $0 |grep $3|awk '{print $2}'` ]]; then service $4 restart > /dev/null 2>&1;fi;sleep $2;done

It’s expected to run from /etc/rc.local like that:

/usr/local/bin/watchdog 60 60 saslauthd saslauthd&