Hello!
I found a strange behaviour of Freeradius with Oracle database.
It crashes with next table:
TABLE RADCHECK
"ID" NUMBER NOT NULL,
"USERNAME" VARCHAR2 NOT NULL,
"ATTRIBUTE" VARCHAR2(30),
"VALUE" VARCHAR2(40),
"MONEY" VARCHAR2(10),
"TRUST" NUMBER,
"LIMIT" VARCHAR2(10),
"OP" CHAR(2)
but when I change type of field "OP" to VARCHAR2(2) it works fine.
I wonder where is a problem?
There is an output of radiusd:
------------------------------
rad_recv: Access-Request packet from host 127.0.0.1:32819, id=39, length=68
User-Name = "admin"
User-Password = "e\203\220\3155W\026F\305+\027\365M\025\222#"
NAS-IP-Address = 255.255.255.255
NAS-Port-Id = "localhost"
Framed-Protocol = PPP
modcall: entering group authorize
modcall[authorize]: module "preprocess" returns ok
modcall[authorize]: module "suffix" returns ok
radius_xlat: 'admin'
sql_escape in: 'admin'
sql_escape out: 'admin'
sql_set_user: escaped user --> 'admin'
radius_xlat: 'SELECT id,UserName,Attribute,Value,op FROM radcheck WHERE
Username = 'admin' ORDER BY id'
rlm_sql: Reserving sql socket id: 0
SELECT id,UserName,Attribute,Value,op FROM radcheck WHERE Username = 'admin'
ORDER BY id
------------------------------
------------------------------
[root@ardom sbin]# gdb radiusd core
GNU gdb 19991004
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux"...(no debugging symbols
found)...
Core was generated by `/opt/radius/sbin/radiusd -X'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /lib/libnsl.so.1...done.
Reading symbols from /lib/libresolv.so.2...done.
Reading symbols from /lib/libpthread.so.0...done.
Reading symbols from /lib/libcrypt.so.1...done.
Reading symbols from /usr/lib/libltdl.so.0...done.
Reading symbols from /lib/libc.so.6...done.
Reading symbols from /lib/libdl.so.2...done.
Reading symbols from /lib/ld-linux.so.2...done.
Reading symbols from /lib/libnss_files.so.2...done.
Reading symbols from /opt/radius/lib/rlm_preprocess.so.0...done.
Reading symbols from /opt/radius/lib/rlm_realm.so.0...done.
Reading symbols from /opt/radius/lib/rlm_sql.so.0...done.
Reading symbols from /opt/radius/lib/rlm_sql_oracle.so.0...done.
Reading symbols from
/sql/app/oracle/product/8.1.6/lib/libclntsh.so.8.0...done.
Reading symbols from /lib/libm.so.6...done.
Reading symbols from /sql/app/oracle/product/8.1.7/lib/libwtc8.so...done.
Reading symbols from /opt/radius/lib/rlm_files.so.0...done.
Reading symbols from /opt/radius/lib/rlm_detail.so.0...done.
Reading symbols from /opt/radius/lib/rlm_radutmp.so.0...done.
#0 0x40490f48 in kpcxk2u () from
/sql/app/oracle/product/8.1.6/lib/libclntsh.so.8.0
------------------------------
What can I do to avoid crash whatever of type (CHAR or VARCHAR2)?
Thank you in advance.
----=====----
Yuri Bazhukov
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html