List Info

Thread: nsswitch dynamic module locations




nsswitch dynamic module locations
country flaguser name
Australia
2008-03-22 07:35:37
Hi Folks,

just soliciting some opinions on where nsswitch dynamic
module source  
should live in
the source tree and where configuration should live in the
destdir.

If an nsswitch module source were to be added to tree where
should it  
live?
/usr/lib/libc/nsswitch/nss_xxx has been suggested is there a
better /  
more
appropriate place?


Second, some modules require configuration.  Where should it
live in  
destdir?

/etc/nss_xxx.conf
/etc/nssiwtch.d/nss_xxx.conf
other?


I can't speak to where other vendors keep their source but
various  
paths used for
configuration include.

/etc/nss_xxx.plist (we can guess who this is)
/etc/nss_xxx.conf
/etc/xxx.conf


suggestions? I don't promise to listen but I wouldn't be
asking if I  
wasn't interested.

Thanks

Re: nsswitch dynamic module locations
user name
2008-03-22 10:15:16
On Sat, Mar 22, 2008 at 11:35:37PM +1100, Tyler Retzlaff
wrote:
> If an nsswitch module source were to be added to tree
where should it live?
> /usr/lib/libc/nsswitch/nss_xxx has been suggested is
there a better / more
> appropriate place?

/lib/nsswitch and /usr/lib/nsswitch as default location?

> /etc/nss_xxx.conf
> /etc/nssiwtch.d/nss_xxx.conf

/etc/nsswitch.d/ seems preferable to me. I wouldn't do the
dance with a
single config file if no reason for compatibility exists.
libc should
provide modules with a function to determine the path name
of the config
file though.

Joerg

Re: nsswitch dynamic module locations
country flaguser name
Australia
2008-03-23 00:38:33
On Sat, Mar 22, 2008 at 04:15:16PM +0100, Joerg Sonnenberger
wrote:
  | On Sat, Mar 22, 2008 at 11:35:37PM +1100, Tyler Retzlaff
wrote:
  | > If an nsswitch module source were to be added to
tree where should it live?
  | > /usr/lib/libc/nsswitch/nss_xxx has been suggested
is there a better / more
  | > appropriate place?
  | 
  | /lib/nsswitch and /usr/lib/nsswitch as default
location?

I think Tyler was asking about the source location, not the
run-time destination, although his original question wasn't

frame correctly. (Just based on a prior conversation we'd
had)

We have prior art for src/lib/i18n_module, so I suggest
src/lib/nss_module.

FYI: the run-time modules are presently searched for in the
`standard dlopen() search path', which is generally
/usr/lib (default) or /lib:/usr/lib (for /bin and /sbin).


  | > /etc/nss_xxx.conf
  | > /etc/nssiwtch.d/nss_xxx.conf
  | 
  | /etc/nsswitch.d/ seems preferable to me. I wouldn't do
the dance with a
  | single config file if no reason for compatibility
exists. libc should
  | provide modules with a function to determine the path
name of the config
  | file though.

/etc/nsswitch.d/<modulename>.conf, without the leading
"nss_" ?

Thus, /etc/nsswitch.d/ldap.conf for /lib/nss_ldap.so.0

For example, /etc/nsswitch.d/dns.conf could contain a
superset merge of /etc/resolv.conf and /etc/hesiod.conf,
if we chose to do that.


Luke.
Re: nsswitch dynamic module locations
user name
2008-03-23 05:38:31
On Sun, 23 Mar 2008, Luke Mewburn wrote:

> We have prior art for src/lib/i18n_module, so I
suggest
> src/lib/nss_module.
>
> FYI: the run-time modules are presently searched for in
the
> `standard dlopen() search path', which is generally
> /usr/lib (default) or /lib:/usr/lib (for /bin and
/sbin).

just as an info point, that prior art shows the i18n modules
ending up in
/usr/lib/i18n/ so I guess following that

> Thus, /etc/nsswitch.d/ldap.conf for /lib/nss_ldap.so.0

would give /lib/nss/ldap.so.0 and keep the modules
contained?

iain

Re: nsswitch dynamic module locations
country flaguser name
France
2008-03-23 05:44:16
On Sun, Mar 23, 2008 at 04:38:33PM +1100, Luke Mewburn
wrote:
> On Sat, Mar 22, 2008 at 04:15:16PM +0100, Joerg
Sonnenberger wrote:
>   | > /etc/nss_xxx.conf
>   | > /etc/nssiwtch.d/nss_xxx.conf
>   | 
>   | /etc/nsswitch.d/ seems preferable to me. I wouldn't
do the dance with a
>   | single config file if no reason for compatibility
exists. libc should
>   | provide modules with a function to determine the
path name of the config
>   | file though.
> 
> /etc/nsswitch.d/<modulename>.conf, without the
leading "nss_" ?
> 
> Thus, /etc/nsswitch.d/ldap.conf for /lib/nss_ldap.so.0
> 
> For example, /etc/nsswitch.d/dns.conf could contain a
> superset merge of /etc/resolv.conf and
/etc/hesiod.conf,
> if we chose to do that.

Do we have to have the ".d" suffix on the
directory? I know
we've done it before, but I still think it's ... useless.

Or shall we just rename it "/etc.d"?

Regards,
Al

Re: nsswitch dynamic module locations
country flaguser name
Germany
2008-03-23 08:24:42
On Sun, 23 Mar 2008, Luke Mewburn wrote:
> Thus, /etc/nsswitch.d/ldap.conf for /lib/nss_ldap.so.0

If I find a file I don't know what it is about, I'd use
man(1) - and for 
/lib/nss_ldap.so.0, I'd rather expect that "man
nss_ldap" gives some 
results (i.e. the config file manpage). I'd prefer
/etc/nss_ldap.conf.

This would also go with /etc/{daily,weekly,monthly}.conf,
which aren't in 
/etc/cronjobs/{daily,weekly,monthly} either.

Also, the .d for directory suffix seems, um... redundant.


  - Hubert

[1-6]

about | contact  Other archives ( Real Estate discussion Medical topics )