Commit graph

14 commits

Author SHA1 Message Date
Firstyear b88b6923eb
20250313 unixd system cache ()
The implementation of the unixd cache relies on inotify to detect changes to files in /etc so that we know when to reload the data for nss/passwd. However, the way that groupadd/del and other tools work is they copy the file, change it, and then move it into place. It turns out that william of the past didn't realise that inotify works on inodes not paths like other tools do (auditctl for example).

As a result, when something modified /etc/group or another related file, the removal was seen, but this breaks notifications on any future change until you reload unixd.

To resolve this we need to recursively watch /etc with inotify - yep, that's correct. We have to watch everything in /etc for changes because it's the only way to pick up on the add/remove of files. But because we have to watch everything, we need permissions to watch everything.

This forces us to move the parsing of the etc passwd/group/shadow files to the unixd tasks daemon - arguably, this is the correct place to read these anyway since that is a high priv (and locked down) daemon. Because of this, we actually end up solving the missing "shadow" group on debian issue, and probably similar on the BSD's in future.

In order to make my life easier while testing I also threw in a makefile that symlinks the files to needed locations for testing. It has plenty of warnings as it should.

Fixes 
Fixes 
Fixes 
2025-03-14 13:46:26 +10:00
Firstyear cf63c6b98b
Complete the implementation of the posix account cache ()
Allow caching and checking of shadow entries (passwords)
    Cache and serve system id's
    improve some security warnings
    prepare for multi-resolver
    Allow the kanidm provider to be not configured
    Allow group extension
2024-10-02 02:12:13 +00:00
Alin Trăistaru 562f352516
fix typos ()
* fix typos and misspellings
* use proper capitalization
* Apply suggestions from code review
---------

Co-authored-by: James Hodgkinson <james@terminaloutcomes.com>
2024-07-18 03:22:20 +00:00
Firstyear faef3d0a4b
Fix issues with suspend reported by himmelblau () 2024-07-17 10:33:04 +10:00
Firstyear 7b490d73dc
Allow /dev/tpmrm0 on older systemd versions ()
Older systemd versions require a specific device allow for the tpm to be accessed.
2024-02-27 02:13:31 +00:00
Firstyear cc28fb2c4b
Re-enable HW tpm support () 2024-02-17 01:30:08 +00:00
Firstyear 7a78cb8a80
Conflict nscd, start before sshd () 2024-02-16 02:24:37 +00:00
Firstyear 060cb729a7
Expose TPM in more interface places () 2023-11-27 14:35:59 +10:00
Firstyear 545c04e74f
Add systemd deps for unixd () 2023-11-16 13:12:55 +10:00
Firstyear 54544075c1
Improve service file for host installs () 2023-07-25 12:23:47 +10:00
Firstyear f3080df628
Implement tpm binding of cached password hashes () 2023-06-21 20:33:01 +10:00
Firstyear 32a7200305
Fix block_on in ssh authorised keys () 2023-06-19 15:02:09 +10:00
Firstyear f252d91e13
20220219 webui updates + source refactor + clippy go clip clip () 2022-02-20 12:43:38 +10:00
cuberoot74088 d2e6186c15
471 add service files () 2021-06-16 07:59:41 +10:00