Commit graph

18 commits

Author SHA1 Message Date
Firstyear 94b6287e27
Unify unix config parser ()
* Unify unix config parser
* Document the various structs
* Compiler Update
2025-04-08 14:21:26 +10:00
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 b15ff89b39
20250206 freebsd ports ()
* Remove unneeded files
* Ensure we config client config for freebsd
* Improve shell handling
* Use freebsd compat nss
2025-02-09 08:57:15 +00:00
Firstyear 41b2eac1f4
Fix the password reset form and possible resolver issue ()
While testing for everything open I noticed two possible
issues. This PR fixes both.

The first is a possible recursion in the resolver. I think
I need to fix up it's transactions a bit in another PR.

The second was that the submit button on the reset form
doesn't work. This fixes that as well as post reset redirecting
to the correct location.
2025-02-05 14:18:09 +10:00
James Hodgkinson 516874460b
Canonicalize path for user shell check () 2024-12-04 11:55:30 +10:00
Firstyear 8bbdf6bd6a
Clear invalid tokens from unix resolver () 2024-11-30 06:32:10 +00:00
Firstyear 52987ab8b2
Display account_id during success/deny paths in unixd () 2024-11-30 13:57:01 +10:00
Firstyear ce0ad8f854
Harden transport in pam unixd ()
In some cases if the transport drops out from underneath unixd,
it can be difficult to diagnose and leads to inconsistent errors
and output such as prompting for a password multiple times when
it can't succeed.

This makes it clearer that the transport had an error, and it
denies the inflight authsession to prevent spurious password
prompts.
2024-11-21 07:43:14 +00:00
Firstyear c96e9772c7
Resolve pam services not always having a tty () 2024-11-05 00:49:33 +00:00
Firstyear ea1fcf59e5
Resolve incorrect handling of rhost in pam () 2024-11-03 00:13:26 +00:00
George Wu d2c329f330
Change to text input and use numeric mode for TOTP prompts. ()
* Change to text input and use inputmode numeric for TOTP prompts.

* Fix some typos.
2024-10-27 23:57:28 +00:00
Firstyear 4c2eeeb135
Update docs, improve locking () 2024-10-25 09:42:52 +10:00
Firstyear 20b2d40215
Add support for group extension () 2024-10-03 06:33:56 +00: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
Firstyear b1099dfa3b
Foundations of pam/nss multi resolver
This starts the support for multi-resolver operation as well as a system level nss resolver.

In future we'll add the remaining support to auth system users with pam too.
2024-08-15 23:54:35 +00:00
Firstyear 7bbb193cdf
20240725 allow connection to older servers ()
Co-authored-by: James Hodgkinson <james@terminaloutcomes.com>
2024-07-25 16:11:14 +10:00
Firstyear 0836118443
20240716 check mkdir () 2024-07-17 01:11:11 +00:00
Firstyear 0ce333ff5a
Allow providers to be box dyn ()
* Allow providers to be box dyn in kanidm_unixd
* Massive refactor
2024-06-16 22:21:25 +00:00
Renamed from unix_integration/src/resolver.rs (Browse further)