fix: read every share from OMV's own database, with its service, 0.4.0 (NetOrk/netork#3104) #25

Merged
christianmanivong merged 2 commits from feature/share-endpoints into main 2026-12-03 17:59:54 +00:00
2 Commits
Author SHA1 Message Date
Christian Manivong 6e94ce8ffd refactor: OMV's report and its NFS shares read in smaller parts (NetOrk/netork#3104)
driver / lint (pull_request) Successful in 12s
driver / standard (pull_request) Successful in 15s
driver / lowest (pull_request) Successful in 26s
driver / types (pull_request) Successful in 1m2s
driver / test (3.12) (pull_request) Successful in 1m2s
driver / test (3.13) (pull_request) Successful in 52s
driver / build (pull_request) Successful in 24s
driver / security (pull_request) Successful in 1m0s
CI / driver (pull_request) Successful in 1m41s
driver / publish (pull_request) Skipped
The standard's ratchet: a new function stays within complexity 10.
2026-12-03 18:46:13 +01:00
Christian Manivong 3a406b76e8 fix: read every share from OMV's own database, with its service, 0.4.0 (NetOrk/netork#3104)
get_shares() found no share at all: it asked for data models OMV does not have
(conf.service.nfs.shares and its siblings), without root although config.xml is
root's, without the full path although /usr/sbin is not on a login user's PATH,
and stored every failure as a NAS without shares. Samba shares were dropped for
want of a name of their own, and several NFS clients of one folder overwrote
each other.

Now every model is read through sudo in one round trip; a share takes its shared
folder's name; NFS is one share per folder with one access rule per client; each
share names its service (smbd, nfs-server, proftpd, rsync, tftpd-hpa) and what a
client names (/export/<folder> over NFS); rsync modules, the TFTP root and Samba's
homes are shares too; a read that fails raises.
2026-12-03 18:43:50 +01:00