Страница 1 из 1

я в шоке от работы Rejik под Ubuntu-Server 6.06.1 [Решено]

Добавлено: Ср окт 17, 2007 23:18
Trek
сабж.
никогда не подумал бы что у Режика такое может быть....
чем лечить ???
сабж компилируется с ошибками уже и pcre-7.4 поставил и все никака

Код: Выделить всё

root@serv:~/rejik/redirector-3.2.1/redirector-3.2.1# make
rm -f pass.o raw_change.o load_cache.o pcre.o parse_input.o init_vars.o check_urls.o run_make_cache.o new_url.o redirect.o err_mes.o now.o get_opt.o parse_urls.o cache2url.o ip.o id.o comparing.o  load_urls.o prune_urls.o write_cache.o need_cache_update.o err_mes.o now.o get_opt.o parse_urls.o cache2url.o ip.o id.o comparing.o  redirector make-cache OUT
gcc -Wall -I/usr/include -I/usr/local/include -I/usr/include/pcre -c pass.c
gcc -Wall -I/usr/include -I/usr/local/include -I/usr/include/pcre -c raw_change.c
raw_change.c: In function ‘raw_change’:
raw_change.c:25: warning: pointer targets in passing argument 1 of ‘strstr’ differ in signedness
raw_change.c:25: warning: pointer targets in passing argument 2 of ‘strstr’ differ in signedness
raw_change.c:25: warning: pointer targets in assignment differ in signedness
raw_change.c:33: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness
raw_change.c:34: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness
raw_change.c:35: warning: pointer targets in passing argument 1 of ‘strchr’ differ in signedness
raw_change.c:35: warning: pointer targets in assignment differ in signedness
raw_change.c:44: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness
gcc -Wall -I/usr/include -I/usr/local/include -I/usr/include/pcre -c load_cache.c
load_cache.c: In function ‘load_cache’:
load_cache.c:20: warning: pointer targets in passing argument 1 of ‘access’ differ in signedness
load_cache.c:27: warning: pointer targets in passing argument 1 of ‘fopen’ differ in signedness
load_cache.c:90: warning: pointer targets in assignment differ in signedness
gcc -Wall -I/usr/include -I/usr/local/include -I/usr/include/pcre -c pcre.c
pcre.c: In function ‘load_pcre_file’:
pcre.c:72: warning: pointer targets in passing argument 4 of ‘pcre_compile’ differ in signedness
pcre.c: In function ‘check_pcre’:
pcre.c:107: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness
pcre.c:107: warning: pointer targets in passing argument 3 of ‘pcre_exec’ differ in signedness
pcre.c:107: warning: pointer targets in passing argument 7 of ‘pcre_exec’ differ in signedness
pcre.c:110: warning: pointer targets in passing argument 1 of ‘sprintf’ differ in signedness
gcc -Wall -I/usr/include -I/usr/local/include -I/usr/include/pcre -c parse_input.c
parse_input.c: In function ‘parse_input’:
parse_input.c:58: warning: pointer targets in passing argument 1 of ‘sscanf’ differ in signedness
parse_input.c:105: warning: pointer targets in passing argument 1 of ‘atoi’ differ in signedness
parse_input.c:121: warning: pointer targets in passing argument 1 of ‘atoi’ differ in signedness
parse_input.c:137: warning: pointer targets in passing argument 1 of ‘atoi’ differ in signedness
parse_input.c:153: warning: pointer targets in passing argument 1 of ‘atoi’ differ in signedness
parse_input.c:215: warning: pointer targets in passing argument 1 of ‘sscanf’ differ in signedness
gcc -Wall -I/usr/include -I/usr/local/include -I/usr/include/pcre -c init_vars.c
gcc -Wall -I/usr/include -I/usr/local/include -I/usr/include/pcre -c check_urls.c
check_urls.c: In function ‘check_url’:
check_urls.c:30: warning: pointer targets in passing argument 1 of ‘sprintf’ differ in signedness
check_urls.c:107: warning: pointer targets in passing argument 1 of ‘strcat’ differ in signedness
check_urls.c:134: warning: pointer targets in passing argument 1 of ‘sprintf’ differ in signedness
gcc -Wall -I/usr/include -I/usr/local/include -I/usr/include/pcre -c run_make_cache.c
run_make_cache.c: In function ‘run_make_cache’:
run_make_cache.c:78: warning: pointer targets in passing argument 1 of ‘execl’ differ in signedness
run_make_cache.c:78: warning: pointer targets in passing argument 2 of ‘execl’ differ in signedness
gcc -Wall -I/usr/include -I/usr/local/include -I/usr/include/pcre -c new_url.c
gcc -Wall -I/usr/include -I/usr/local/include -I/usr/include/pcre -c redirect.c
gcc -Wall -I/usr/include -I/usr/local/include -I/usr/include/pcre -c err_mes.c
err_mes.c: In function ‘err_mes’:
err_mes.c:11: warning: pointer targets in passing argument 1 of ‘fopen’ differ in signedness
gcc -Wall -I/usr/include -I/usr/local/include -I/usr/include/pcre -c now.c
gcc -Wall -I/usr/include -I/usr/local/include -I/usr/include/pcre -c get_opt.c
get_opt.c: In function ‘get_opt’:
get_opt.c:112: warning: pointer targets in assignment differ in signedness
get_opt.c:149: warning: pointer targets in assignment differ in signedness
get_opt.c:166: warning: pointer targets in assignment differ in signedness
get_opt.c:183: warning: pointer targets in assignment differ in signedness
get_opt.c:201: warning: pointer targets in assignment differ in signedness
get_opt.c:227: warning: pointer targets in assignment differ in signedness
get_opt.c:251: warning: pointer targets in assignment differ in signedness
get_opt.c:296: warning: pointer targets in assignment differ in signedness
get_opt.c:328: warning: pointer targets in assignment differ in signedness
gcc -Wall -I/usr/include -I/usr/local/include -I/usr/include/pcre -c parse_urls.c
gcc -Wall -I/usr/include -I/usr/local/include -I/usr/include/pcre -c cache2url.c
gcc -Wall -I/usr/include -I/usr/local/include -I/usr/include/pcre -c ip.c
gcc -Wall -I/usr/include -I/usr/local/include -I/usr/include/pcre -c id.c
gcc -Wall -I/usr/include -I/usr/local/include -I/usr/include/pcre -c comparing.c
gcc -Wall -I/usr/include -I/usr/local/include -I/usr/include/pcre -c load_urls.c
load_urls.c: In function ‘load_urls’:
load_urls.c:81: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness
load_urls.c:89: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness
load_urls.c:96: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness
load_urls.c:97: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness
load_urls.c:104: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness
load_urls.c:105: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness
load_urls.c:112: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness
load_urls.c:113: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness
gcc -Wall -I/usr/include -I/usr/local/include -I/usr/include/pcre -c prune_urls.c
prune_urls.c: In function ‘prune_urls’:
prune_urls.c:58: warning: pointer targets in passing argument 1 of ‘strchr’ differ in signedness
prune_urls.c:61: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness
prune_urls.c:84: warning: pointer targets in passing argument 2 of ‘cache2url’ differ in signedness
prune_urls.c:121: warning: pointer targets in passing argument 1 of ‘strcmp’ differ in signedness
prune_urls.c:121: warning: pointer targets in passing argument 2 of ‘strcmp’ differ in signedness
prune_urls.c:123: warning: pointer targets in passing argument 1 of ‘strchr’ differ in signedness
prune_urls.c:127: warning: pointer targets in passing argument 2 of ‘cache2url’ differ in signedness
prune_urls.c:160: warning: pointer targets in passing argument 1 of ‘strchr’ differ in signedness
prune_urls.c:162: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness
prune_urls.c:163: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness
prune_urls.c:167: warning: pointer targets in passing argument 2 of ‘cache2url’ differ in signedness
prune_urls.c:168: warning: pointer targets in passing argument 1 of ‘strcmp’ differ in signedness
prune_urls.c:205: warning: pointer targets in passing argument 1 of ‘strchr’ differ in signedness
prune_urls.c:205: warning: pointer targets in passing argument 2 of ‘cache2url’ differ in signedness
prune_urls.c:208: warning: pointer targets in passing argument 1 of ‘strcmp’ differ in signedness
prune_urls.c:216: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness
prune_urls.c:217: warning: pointer targets in passing argument 1 of ‘strchr’ differ in signedness
prune_urls.c:218: warning: pointer targets in passing argument 1 of ‘strchr’ differ in signedness
prune_urls.c:231: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness
prune_urls.c:232: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness
gcc -Wall -I/usr/include -I/usr/local/include -I/usr/include/pcre -c write_cache.c
write_cache.c: In function ‘write_cache’:
write_cache.c:37: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness
write_cache.c:93: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness
gcc -Wall -I/usr/include -I/usr/local/include -I/usr/include/pcre -c need_cache_update.c
gcc -Wall -I/usr/include -I/usr/local/include -I/usr/include/pcre -o redirector redirector.c -L/lib `pcre-config --libs` pass.o raw_change.o load_cache.o pcre.o parse_input.o init_vars.o check_urls.o run_make_cache.o new_url.o redirect.o err_mes.o now.o get_opt.o parse_urls.o cache2url.o ip.o id.o comparing.o 
redirector.c: In function ‘main’:
redirector.c:29: warning: pointer targets in passing argument 1 of ‘sprintf’ differ in signedness
redirector.c:38: warning: pointer targets in passing argument 1 of ‘sprintf’ differ in signedness
redirector.c:51: warning: pointer targets in passing argument 1 of ‘fopen’ differ in signedness
redirector.c:53: warning: pointer targets in passing argument 1 of ‘sprintf’ differ in signedness
redirector.c:54: warning: pointer targets in passing argument 1 of ‘printf’ differ in signedness
redirector.c:69: warning: pointer targets in passing argument 1 of ‘fgets’ differ in signedness
redirector.c:78: warning: pointer targets in passing argument 1 of ‘sprintf’ differ in signedness
redirector.c:79: warning: pointer targets in passing argument 1 of ‘err_mes’ differ in signedness
redirector.c:133: warning: pointer targets in passing argument 2 of ‘parse_urls’ differ in signedness
redirector.c:136: warning: pointer targets in passing argument 1 of ‘sprintf’ differ in signedness
redirector.c:137: warning: pointer targets in passing argument 1 of ‘err_mes’ differ in signedness
gcc -Wall -I/usr/include -I/usr/local/include -I/usr/include/pcre -o make-cache make-cache.c -L/lib `pcre-config --libs` load_urls.o prune_urls.o write_cache.o need_cache_update.o err_mes.o now.o get_opt.o parse_urls.o cache2url.o ip.o id.o comparing.o

компилиться то компилиться.... только не фига не работает.....

P.S. "как настраивается режик я знаю ибо на RHEL стоит и работает.... просясните ситуацию с Ubuntu/Debian

Добавлено: Ср окт 17, 2007 23:20
Trek
Может у кого есть deb пакет с режиком ???

Добавлено: Чт окт 18, 2007 9:50
Slava
Вряд ли дело в warning'ах компилятора.
После того как поставили, check-redirector делали?
Что он сказал, написал в логи?

Добавлено: Чт окт 18, 2007 12:10
Trek
Slava писал(а):Вряд ли дело в warning'ах компилятора.
После того как поставили, check-redirector делали?
Что он сказал, написал в логи?
вот собственно чего и пишет:

Код: Выделить всё

root@serv:/opt/rejik3/tools# ./check-redirector
http://sex.ru 127.0.0.1/- - GET
прокся работает отлично.. едиственная фигня в том что режик ведет себя как не при делах...

Добавлено: Чт окт 18, 2007 12:14
Slava
что в конфиге и err логе?

Добавлено: Чт окт 18, 2007 12:27
Trek
Slava писал(а):что в конфиге и err логе?
так по порядку...
1. по ps ax выдает:

Код: Выделить всё

22451 ?        S      0:00 (squid) -D -sYC
22461 ?        Ss     0:00 (unlinkd)
24923 ?        Ss     0:00 (redirector) /opt/rejik3/redirector.conf
24924 ?        Ss     0:00 (redirector) /opt/rejik3/redirector.conf
24926 ?        Ss     0:00 (redirector) /opt/rejik3/redirector.conf
24928 ?        Ss     0:00 (redirector) /opt/rejik3/redirector.conf
24930 ?        Ss     0:00 (redirector) /opt/rejik3/redirector.conf
2. конфиг сквида:

Код: Выделить всё

#  TAG: redirect_program
#       Specify the location of the executable for the URL redirector.
#       Since they can perform almost any function there isn't one included.
#       See the FAQ (section 15) for information on how to write one.
#       By default, a redirector is not used.
redirect_program /opt/rejik3/redirector /opt/rejik3/redirector.conf
3. конфиг режика:

Код: Выделить всё


root@serv:/opt/rejik3# less redirector.conf
# allow_id login        # login or file with logins
# allow_id f:/path/file # for who don't change any contest
#
# allow_urls /path/file # file with urls of don't redirect
#
# raw_change <from> <to># Change <from> to <to> in url
# raw_log aff           # Not write to log changes from raw_change option
#
##############################################################
#
# Sections options:  all parametrs work only for ONE section
# =================
# <NAME>                # Header for section
#
# ban_dir dirname       # Rules for change in this section
# url http://host/file  # url to replace
#                       # May use: url http://host/file?var=#URL#&var2=#IP#&i=#IDENT#&m=#METHOD#&sec=#SECTION#
#                       # #URL# #IP# #IDENT# #METHOD# #SECTION# will be change by redirector
#
work_ip 192.168.1.0/255.255.255.0               # Ip adress(network)
# work_ip IP/MASK       # or file with ip for
# work_ip f:/path/file  # who section work
#
# allow_ip IP           # Ip adress(network)
# allow_ip IP/MASK      # or file with ip for
# allow_ip f:/path/file # who section not work
#
#
# work_id login         # login or file with logins
# work_id f:/path/file  # for who section work
#
# allow_id login        # login or file with logins
# allow_id f:/path/file # for who secion not work
#
# log off               # Not write to log changes from this section
# reverse               # Reverse result of search in ban dir
#
#############################################################

error_log /opt/rejik3/redirector.err
change_log /opt/rejik3/redirector.log
make-cache //opt/rejik3/make-cache
#allow_urls /usr/local/rejik3/banlists/allow_urls

<BANNER>
ban_dir /opt/rejik3/banlists/banners
url http://127.0.0.1/ban/1x1.gif

<PORNO>
ban_dir  /opt/rejik3/banlists/porno
url http://127.0.0.1/ban/porno.html

<MP3>
ban_dir /opt/rejik3/banlists/mp3
url http://127.0.0.1/ban//audio-video.html

<JS>
ban_dir /opt/rejik3/banlists/js
url http://127.0.0.1/ban/js.js
вот что имеем......
а лог режика пустой (((

Добавлено: Чт окт 18, 2007 12:31
Slava
похоже на проблему с правами.

сделайте ls -l /opt/rejik3/banlists/*

и

cat squid.conf | grep cache_effective_user

Добавлено: Чт окт 18, 2007 12:33
Slava
а может из за этого:
make-cache //opt/rejik3/make-cache

уберите один слеш

Добавлено: Чт окт 18, 2007 12:39
Trek
Slava писал(а):похоже на проблему с правами.

сделайте ls -l /opt/rejik3/banlists/*

и

cat squid.conf | grep cache_effective_user

так:

Код: Выделить всё

cache_effective_user proxy
а это по ls -l /opt/rejik3/banlists/*:

Код: Выделить всё

root@serv:/etc/squid# cd /opt/rejik3
root@serv:/opt/rejik3# ls -l /opt/rejik3/banlists/*
-rw-r--r-- 1 proxy proxy     255 2007-09-28 11:31 /opt/rejik3/banlists/audio-video.pcre
-rw-r--r-- 1 proxy proxy    3685 2007-09-28 11:31 /opt/rejik3/banlists/audio-video.urls
-rw-r--r-- 1 proxy proxy    1846 2007-09-28 11:31 /opt/rejik3/banlists/banner.pcre
-rw-r--r-- 1 proxy proxy   81980 2007-09-28 11:31 /opt/rejik3/banlists/banner.urls
-rw-r--r-- 1 proxy proxy    2064 2007-09-28 11:31 /opt/rejik3/banlists/chats.urls
-rw-r--r-- 1 proxy proxy   17613 2007-09-28 11:31 /opt/rejik3/banlists/dating.urls
-rw-r--r-- 1 proxy proxy     156 2007-09-28 11:31 /opt/rejik3/banlists/icq.pcre
-rw-r--r-- 1 proxy proxy     788 2007-09-28 11:31 /opt/rejik3/banlists/icq.urls
-rw-r--r-- 1 proxy proxy   17285 2007-09-28 11:31 /opt/rejik3/banlists/online-games.urls
-rw-r--r-- 1 proxy proxy      68 2007-09-28 11:31 /opt/rejik3/banlists/phishing.urls
-rw-r--r-- 1 proxy proxy 1128241 2007-09-28 11:31 /opt/rejik3/banlists/porno.urls
-rw-r--r-- 1 proxy proxy    7090 2007-09-28 11:31 /opt/rejik3/banlists/spyware.urls
-rw-r--r-- 1 proxy proxy    8169 2007-09-28 11:31 /opt/rejik3/banlists/virus-detect.urls
-rw-r--r-- 1 proxy proxy    2312 2007-09-28 11:31 /opt/rejik3/banlists/warez.urls
-rw-r--r-- 1 proxy proxy   16152 2007-09-28 11:36 /opt/rejik3/banlists/web-mail.urls
-rw-r--r-- 1 proxy proxy    9449 2007-09-28 11:31 /opt/rejik3/banlists/web-proxy.urls

/opt/rejik3/banlists/banners:
total 92
-rw-r--r-- 1 proxy proxy  1846 2007-09-28 11:31 banner.pcre
-rw-r--r-- 1 proxy proxy 81980 2007-09-28 11:31 banner.urls
-rw------- 1 proxy proxy     0 2007-10-17 22:15 lock.file

/opt/rejik3/banlists/mp3:
total 8
-rw-r--r-- 1 proxy proxy  255 2007-09-28 11:31 audio-video.pcre
-rw-r--r-- 1 proxy proxy 3685 2007-09-28 11:31 audio-video.urls

/opt/rejik3/banlists/porno:
total 1108
-rw-r--r-- 1 proxy proxy 1128241 2007-09-28 11:31 porno.urls

Добавлено: Чт окт 18, 2007 12:45
Slava
ага, все просто, переименуйте файлы вида audio-video.urls и audio-video.pcre в папках банлистов в urls и pcre соотвествено.
Я обычно делаю симлинки, с dbl фалов, что бы все сразу обновлялось.

Добавлено: Чт окт 18, 2007 12:47
Trek
Slava писал(а):ага, все просто, переименуйте файлы вида audio-video.urls и audio-video.pcre в папках банлистов в urls и pcre соотвествено.
Я обычно делаю симлинки, с dbl фалов, что бы все сразу обновлялось.
хм... щас попробую....

Добавлено: Чт окт 18, 2007 12:59
Trek
Slava писал(а):ага, все просто, переименуйте файлы вида audio-video.urls и audio-video.pcre в папках банлистов в urls и pcre соотвествено.
Я обычно делаю симлинки, с dbl фалов, что бы все сразу обновлялось.
сделал.... появились файлы кеша урлов... думаю теперь нормально будет....
вечером проверю уж на 100%

Добавлено: Чт окт 18, 2007 18:18
Trek
проблема решена.
Огромное спасибо разработчки )))

P.S. "почему при сборке такая куча варнингов сыпиться ?"

Добавлено: Чт июл 03, 2008 6:08
Slayeruga
для тех, кто хочет пользоваться режиком в debian подобных системах, в том числе и ubuntu, нужно поставить pcre c исходников. Тогда редиректор компилируется, правда с ошибками как и у Trek, описавшим это в первом посте. А остальные настройки, в принципе, не отличаются от других *nix систем.