From: Florian V. <flo...@un...> - 2003-06-14 12:42:38
|
Hi James, hi all others, As you (James) pointed out on the TODO list=20 ( http://sourceforge.net/mailarchive/forum.php?thread_id=3D1082316&forum_id= =3D4670 ), some "housekeeping and reorganization" has to be done... I'll do it right now... What I see to do: - replace=20 ---- #if DEBUG syslog(LOG_ERR, "blabla."); #endif ---- by ---- D(("blabla.")); ---- Which logs the messages including file/function/line information to a specified (default /tmp/pam-debug.log) file. (cf: /usr/include/_pam_macros.h - ex: used in pam_unix) This will enhance code readability. (shorter, always indented,..) - split the one file (pam_mysql.c) into multiple smaller ones. Analog to other modules. Eventually one file per service-type function (auth, acct_mgmt, sessio,..) plus one used by all (parseArgs,...) - Ev. code formatting: As it's my first "real-world" C hacking, I don't know, what you're used that nice C code is looking like... I think I'll not touch this. - Ev. rewriting string manipulation parts (instead of using strlen/snprintf/strncat/...) What are "clean" string manipulations ?? (There are a lot of possibilities :-/ ) - reorganization also respecting future work like: Writing a new option handler - in conjunction of merging PAM- and NSS-mysql config files (or even code) - Adding some return value handling/error checking which has not yet been written (ex: from mysql_query(...) ) - security: (having in mind escaping of database user) What has to be escaped - what not ?? What am I missing ? What should also be done in this step (housekeeping) ? Am I wrong with something ? Tell me ! thanX ! ________________________________________ \|"James O'Kane" <jo...@mi...> ha scrit als Mon, 2 Jun 2003 14:33:30 -0400 (EDT): |[...] |> @James: |> Could you please add me as pam_mysql developer @ SF ? |> My login is 'fvgoto' | |I hope you don't mind if I waited a bit before doing this? No problem at all ! my pam_mysql things: http://fvg.zapto.org/informatica/tbsc/welcome.php sincerly, blers sal=FCds, _________=20 Florian Verdet GnuPG: fvg.zapto.org/informatica/gpg.php . |