Re: /lib/passwd



On Sun, 2012-08-26 at 13:48 +0300, Adrian Perez de Castro wrote:

> The idea would be to have a copy of the libnss_files sources, modify
> the paths to make it read from /lib/{passwd,group,shadow,gshadow}
> (instead of /etc), and call the built llibrary something like
> libnss_altfiles.so.2; and finally make nsswitch.conf have:
> 
>   passwd: files altfiles
>   group:  files altfiles
>   shadow: files altfiles

Ah, I see now.  I see some benefits and drawbacks to that:

On the plus side, we have control now over which files should be found
in /lib; for example, we probably don't need /lib/shadow

The main negative I see is the file lookup code is forked.

I'm fine with trying that if you want to do a patch.

Side note: It took me way, way too long to debug that I needed to change
"compat" to "files" to get my code to run at all.  When in doubt, add
printfs early on to make sure you're running the code you think you're
running...





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]