From: xyon <xy...@in...> - 2007-04-07 12:31:58
|
On Sat, 2007-04-07 at 16:29 +0900, Moriyoshi Koizumi wrote: > xyon wrote: > > Figured I'd chime in and let everyone know of my progress. > >=20 > > I used Moriyoshi's patch for custom queries in pam_mysql (linked below)= . > > Even though I still cannot match against the Scalix %u (username) value= , > > I can match on the %p (password) value, so things are at least moving i= n > > the proper direction. >=20 > For the proper record, that's not mine. I'm just a project member who > handled the patch entry. >=20 > > I've tried everything with the "%u" value (TRIM, LOWER, etc), and yet i= t > > still refuses to match when coming from Scalix. So this problem all > > along wasn't a pam_mysql thing, but a Scalix thing. Although this has > > been a great learning experience for me, I apologize if I've caused any > > undue frustration. >=20 > No problem. Did you try strace and see anything suspicious among the > calls? The query should've appeared as following: >=20 > send(3, "<83>Apr 7 16:28:00 pamtester: pam_mysql - SELECT pwd FROM > users WHERE scalix =3D \'Test User\'", 91, MSG_NOSIGNAL) =3D 91 > poll([{fd=3D4, events=3DPOLLIN|POLLPRI}], 1, 0) =3D 0 > write(4, "1\0\0\0\3SELECT pwd FROM users WHERE scalix =3D \'Test User\'", > 53) =3D 53 > read(4, > "\1\0\0\1\1*\0\0\2\3def\4test\5users\5users\3pwd\3pwd\f\10\0\377\0\0\0\37= 5\1\20\0\0\0\5\0\0\3\376\0\0\2\0\5\0\0\4\4test\5\0\0\5\376\0\0\2\0", > 16384) =3D 78 >=20 strace with pamtester works great, nothing suspicious, authentication works. It's just when Scalix is passing the params that things break, and only with one of the params (the username, %u). The %u variable is presented very oddly by Scalix (LastnameFirstnamehostnameFirstname Lastname), so I have to do some fancy SQL to clean it up. When I copy and paste the exact query that Scalix is using into a MySQL CLI, it works just fine, so I'm just at a total loss at how Scalix is messing this up. Thanks again for all your help! --=20 xyon ------------------------------------------------------------------------- "They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." --Benjamin Franklin ------------------------------------------------------------------------- |