I've written an NSS module for Solaris that uses a postgress backend. I haven't released it because the performance is very poor when many getpw*() and getsp*() requests are being performed.
If nscd was able to cache data from my postgres database, things may be a bit faster. Unfortunately, nscd core dumps when a query that requires the postgres database is made.
I am curious to know how you guys got the nss_mysql module to work with cache daemon (nscd). Please feel free to email me at ``ayan (at symbol) ayan (dot) net''.
Thanks in advanced,
Ayan George
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Solaris has a couple of extra goodies in the "struct passwd" structure, namely pw_age and pw_comment. If left NULL, they'll crash NSCD (and possibly a few select applications) as they're expecting *something* in there.. I just set comment to the same pointer that points at gecos, and .. I think I set age to an empty string but I don't recall (you could check my source). That's probably the source of your crashes.
Good luck!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You can use my code (which is in CVS here) under the terms of GPL of course.. unless you meant put the projects together somehow..
I'm actually thinking, once I finish up 1.0 of libnss-mysql, of starting a more generic version that can either use ODBC (I think someone's already doing this) or can be linked against various database types ... instead of having one program for each type of DB ... Considering that all this is doing is making SELECT calls it should be relatively easy to do.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I've written an NSS module for Solaris that uses a postgress backend. I haven't released it because the performance is very poor when many getpw*() and getsp*() requests are being performed.
If nscd was able to cache data from my postgres database, things may be a bit faster. Unfortunately, nscd core dumps when a query that requires the postgres database is made.
I am curious to know how you guys got the nss_mysql module to work with cache daemon (nscd). Please feel free to email me at ``ayan (at symbol) ayan (dot) net''.
Thanks in advanced,
Ayan George
Solaris has a couple of extra goodies in the "struct passwd" structure, namely pw_age and pw_comment. If left NULL, they'll crash NSCD (and possibly a few select applications) as they're expecting *something* in there.. I just set comment to the same pointer that points at gecos, and .. I think I set age to an empty string but I don't recall (you could check my source). That's probably the source of your crashes.
Good luck!
Thank you very much! That fixed the problem.
If you like, maybe we can share code.
-ayan
Glad to hear it!
You can use my code (which is in CVS here) under the terms of GPL of course.. unless you meant put the projects together somehow..
I'm actually thinking, once I finish up 1.0 of libnss-mysql, of starting a more generic version that can either use ODBC (I think someone's already doing this) or can be linked against various database types ... instead of having one program for each type of DB ... Considering that all this is doing is making SELECT calls it should be relatively easy to do.