Suppose I need to provide additional information plus the original one
returned by C library function: getpwent(..).

Do I write a user customized module function:

_nss_MYSERV_getpwent(..) (and/or _nss_MYSERV_getpwent_r(..) ?)

in my new shared object: libnss_MYSERV.so.2, that is generated in this
similar way:

gcc -shared -o libnss_MYSERV.so.2 -Wl,-soname,libnss_MYSERV.so.2

And put my new shared object before files in nsswitch.conf like this:

passwd: MYSERV files

Is the above correct?

If it's correct, I also can't get the information returned by the
standard behavior of the original getpwent(). How can I program these

Thank you for your time.