Merge pull request 'fix: no fixed uid for netOrk's own account on OMV yet (NetOrk/netork#1817)' (#14) from feature/system-user-uid-1817 into main
driver / standard (push) Successful in 15s
driver / lint (push) Successful in 21s
driver / types (push) Successful in 1m15s
driver / test (3.12) (push) Successful in 1m24s
driver / test (3.13) (push) Successful in 1m15s
driver / lowest (push) Successful in 34s
driver / build (push) Successful in 26s
driver / security (push) Successful in 1m7s
CI / driver (push) Successful in 3m7s
driver / publish (push) Skipped

This commit was merged in pull request #14.
This commit is contained in:
christianmanivong committed 2026-11-01 12:44:21 +00:00
commit 27ccfb3786
3 files changed
+16

No files matched your search

+3
View File
@@ -7,6 +7,9 @@ All notable changes to this driver. The format follows
## [Unreleased]
### Added
- netOrk's own account with a fixed uid is not made on OMV yet (NetOrk/netork#1817):
`_account_create_with_uid` raises `NotImplementedError`, as the keys go through
`UserMgmt`, which knows only the users it made.
- Personal accounts the way OMV's web UI makes them (NetOrk/netork#1793), on top of
napalm-linux's `get_local_accounts()`, `add_local_account()` and `lock_local_account()`.
OMV's sshd lets in only `root` and `_ssh`, and OMV keeps a user's keys in its own
+5
View File
@@ -105,6 +105,11 @@ class OmvLocalAccountsMixin(LocalAccountsMixin):
)
return [["usermod", "-p", password_hash, name]] if password_hash else []
def _account_create_with_uid(self, name: str, uid: int) -> list[list[str]]:
"""Not on OMV yet (NetOrk/netork#1817): its keys go through ``UserMgmt``, which
knows only the users it made, and whether ``setUser`` takes a uid is untested."""
raise NotImplementedError
def _account_open(
self, name: str, password_hash: str | None, *, locked: bool
) -> list[list[str]]:
+8
View File
@@ -245,3 +245,11 @@ def test_an_account_omv_holds_no_key_for_is_not_written() -> None:
)
def test_the_key_omv_stores_is_read_back_as_its_base64(text: str, blob: str | None) -> None:
assert rfc4716_blob(text) == blob
def test_netorks_own_account_with_a_fixed_uid_is_not_made_on_omv_yet() -> None:
"""Its keys go through UserMgmt, which knows only the users it made (NetOrk/netork#1817)."""
import pytest
with pytest.raises(NotImplementedError):
_Driver(Omv())._account_create_with_uid("netork", 900)