Menu

nss_postgres

2003-07-01
2003-07-02
  • delete this account

    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

     
    • Ben Goodwin

      Ben Goodwin - 2003-07-02

      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!

       
    • delete this account

      Thank you very much!  That fixed the problem.

      If you like, maybe we can share code.

      -ayan

       
    • Ben Goodwin

      Ben Goodwin - 2003-07-02

      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.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.