nss_files: Allocate nscd file registration data on the heap
authorFlorian Weimer <fweimer@redhat.com>
Wed, 7 Jul 2021 16:33:52 +0000 (18:33 +0200)
committerFlorian Weimer <fweimer@redhat.com>
Wed, 7 Jul 2021 16:33:52 +0000 (18:33 +0200)
commitf0c28504a9877be5da3ed1215f2da2d5914bbb0b
tree3bcdc72da69024f65427486065fd26b071d487a3
parent7fcdb532534e46f70624fd7e3681eb6831a69303
nss_files: Allocate nscd file registration data on the heap

This is only needed if nss_files is loaded by nscd.

Before:

   text    data     bss     dec     hex filename
    767       0   24952   25719    6477 nss/files-init.os

After:

   text    data     bss     dec     hex filename
    666       0       0     666     29a nss/files-init.os

Using PATH_MAX bytes unconditionally for the directory name
is wasteful, but fixing that would constitute another break
of this semi-public ABI.  (The other issue is that with
symbolic links, an arbitrary set of parent directories may need
watching, not just a single one.)

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
nss/nss_files/files-init.c