Bug 1215487 - add support for nsswitch.conf dropins
Summary: add support for nsswitch.conf dropins
Status: NEW
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Basesystem (show other bugs)
Version: Current
Hardware: Other Other
: P5 - None : Enhancement (vote)
Target Milestone: ---
Assignee: Andreas Schwab
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 1216724
  Show dependency treegraph
 
Reported: 2023-09-19 14:33 UTC by Ludwig Nussel
Modified: 2023-10-31 08:00 UTC (History)
2 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ludwig Nussel 2023-09-19 14:33:13 UTC
nsswitch.conf is a rather monolithic file at the moment. It's not possible to extend specific entries. To modify it, one has to copy the whole file to /etc and edit it there. That doesn't fly for OS vendors that need to ship any OS files in /usr.

We'd need a more flexible solution that allows to have snippets in both /etc and /usr to extend settings.

Off the bat I could think of something like this:

    usr
    └── etc
        └── nsswitch.conf.d
            ├── hosts
            │   ├── 10-mymachines
            │   ├── 20-resolved
            │   ├── 50-files
            │   └── 60-dns
            └── passwd
                ├── 10-compat
                └── 20-systemd

# head usr/etc/nsswitch.conf.d/*/*
==> usr/etc/nsswitch.conf.d/hosts/10-mymachines <==
mymachines

==> usr/etc/nsswitch.conf.d/hosts/20-resolved <==
resolve [!UNAVAIL=return]

==> usr/etc/nsswitch.conf.d/hosts/50-files <==
files

==> usr/etc/nsswitch.conf.d/hosts/60-dns <==
dns

==> usr/etc/nsswitch.conf.d/passwd/10-compat <==
compat

==> usr/etc/nsswitch.conf.d/passwd/20-systemd <==
systemd