NAS-140915 / 26.0.0-RC.1 / Add recursion for filesystem.set_zfs_attributes (by anodos325) (#18915)
This commit expands the API for filesystem.set_zfs_attributes to include
options for recursion. Specifically, we can do non-recursive, recursive
on files only and recursive on directories only, or recursively on both
files and directories.
Original PR: https://github.com/truenas/middleware/pull/18906
---------
Co-authored-by: Andrew Walker <andrew.walker at truenas.com>
NAS-140984 / 25.10.4 / Active Directory: fix rejoin, harden reset/recover, improve diagnostics (by anodos325) (#18981)
KDC Server affinity (SAF) cache stores {host, ip} dict (host captured
via a fresh CLDAP ping to the chosen kdc_server IP, so the pair
authoritatively identifies one DC). _saf_kdc_name uses the cached host
directly, avoiding RDNS in samba's --server flag and the krb5.conf kdc=
override. activate_standby accepts both the legacy single-string IP and
the new dict form for HA mixed-version upgrades.
_health_check_ad runs _test_machine_account_password only as a
refinement of a failing WBClient.ping_dc(). No krb5.conf churn on
healthy systems; AD_SECRET_INVALID fires only when ping_dc has already
failed AND the password test confirms a credential mismatch
(PREAUTH_FAILED). The temp krb5.conf the test writes now mirrors the
system config (rdns=false, dns_canonicalize_hostname=false, NAS-138687)
and is restored via a finally block so KRB5Error doesn't leave the
system config polluted.
_recover_secrets typo fix: KRB5_PREAUTH_FAILED ->
[26 lines not shown]
NAS-140984 / 27.0.0-BETA.1 / Active Directory: fix rejoin, harden reset/recover, improve diagnostics (#18938)
KDC Server affinity (SAF) cache stores {host, ip} dict (host captured
via a fresh CLDAP ping to the chosen kdc_server IP, so the pair
authoritatively identifies one DC). _saf_kdc_name uses the cached host
directly, avoiding RDNS in samba's --server flag and the krb5.conf kdc=
override. activate_standby accepts both the legacy single-string IP and
the new dict form for HA mixed-version upgrades.
_health_check_ad runs _test_machine_account_password only as a
refinement of a failing WBClient.ping_dc(). No krb5.conf churn on
healthy systems; AD_SECRET_INVALID fires only when ping_dc has already
failed AND the password test confirms a credential mismatch
(PREAUTH_FAILED). The temp krb5.conf the test writes now mirrors the
system config (rdns=false, dns_canonicalize_hostname=false, NAS-138687)
and is restored via a finally block so KRB5Error doesn't leave the
system config polluted.
_recover_secrets typo fix: KRB5_PREAUTH_FAILED ->
[23 lines not shown]
mark auth.login and auth.login_with_api_key removed_in v27
Both methods are thin wrappers around auth.login_ex. Add removed_in='v27'
to their @api_method decorators so they're invisible on v27 sessions while
remaining reachable for v25/v26 callers via LegacyAPIMethod. Docstrings
updated to point at auth.login_ex with the appropriate mechanism.
The primary motivation for this is to encourage users to switch to more
secure authentication mechanisms for API key authentication. The
deprecated endpoint is incapable of a challenge-response flow.
NAS-140539 / 26.0.0-RC.1 / Add tiering API (by anodos325) (#18979)
This commit modifies the truenas API to wrap around tiering design in
the following ways:
A new namespace zfs.tier. will be added. This contains global
configuration for systemwide tiering settings as well as APIs related to
transitioning existing files from one tier to another. Parameters
include
- enabled: whether to enable tiering.
- max_concurrent_jobs: the maximum number of concurrent rewrite jobs
(tier migrations for existing data).
- min_available_space: point in available space for a dataset where tier
migrations will error out.
The namespace will also support APIs for managing and querying tier
[15 lines not shown]
[lldb][test] Fix thread safety analysis warning in LockedTest (#199218)
Guard `mutex.unlock()` with `if (mutex.try_lock())` to satisfy thread
safety analysis. Statically, the compiler cannot verify that
`mutex.try_lock()` succeeded when it is only asserted by `EXPECT_TRUE`,
leading to a "releasing mutex 'mutex' that was not held" compilation
error.
This fixes a regression introduced in #198941.
Tighten up read-only checks on attach-session, detach-client and
switch-client so that a user should be able to only detach their own
client. Reported by John Walker.
18118 SCTP frees wrong-size, and needs to keep private options private
Reviewed by: Andy Fiddaman <illumos at fiddaman.net>
Reviewed by: Dale Ghent <daleg at elemental.org>
Approved by: Robert Mustacchi <rm+illumos at fingolfin.org>
[PowerPC] Change arguments of PPCEmitTimePseudo
Like #198861 but for PPCEmitTimePseudo.
This is not NFC. The asm name of LDtocBA was set to #LDtocCPT,
which is the name of the instruction before. This looks like a
cut`n`paste error, and I changed the asm name.
NAS-141020 / 26.0.0-BETA.2 / Restrict on-disk perms of internal container/apps dataset roots (by anodos325) (#18985)
The internal dataset trees that back containers
(/mnt/.truenas_containers/), Docker apps (/mnt/.ix-apps/), and the
per-container idmapped bind-mount parent (/run/truenas_containers/root/)
are implementation-detail paths that aren't intended to be inspected
directly by host users. They currently mount with the default of
drwxr-xr-x root:root (or 0755 from os.makedirs for the /run parent),
which is looser than necessary.
This PR pins those three directories to 0700 root:root and re-applies
the mode at the relevant entry points so the property is idempotent
across reboots and manual chmod drift.
Original PR: https://github.com/truenas/middleware/pull/18954
Co-authored-by: Andrew Walker <andrew.walker at truenas.com>
NAS-141127 / 26.0.0-RC.1 / smb: disable automatic conversion of adouble files (by anodos325) (#18992)
This commit disables a relatively new on-by-default feature of vfs_fruit
that attempts to detect and auto-migrate file-backed AFP-style metadata.
This exists primarily to facilitate data mobility between different
vfs_fruit / server configurations. Since we've only had a single
supported fruit configuration regarding metadata and resource forks
since TrueNAS 9.10 we can safely disable this feature, which requires
attempted per-file opens for every directory listing. This significantly
harms dir listing performance for macos clients.
Original PR: https://github.com/truenas/middleware/pull/18988
Co-authored-by: Andrew Walker <andrew.walker at truenas.com>
NAS-141127 / 26.0.0-BETA.2 / smb: disable automatic conversion of adouble files (by anodos325) (#18991)
This commit disables a relatively new on-by-default feature of vfs_fruit
that attempts to detect and auto-migrate file-backed AFP-style metadata.
This exists primarily to facilitate data mobility between different
vfs_fruit / server configurations. Since we've only had a single
supported fruit configuration regarding metadata and resource forks
since TrueNAS 9.10 we can safely disable this feature, which requires
attempted per-file opens for every directory listing. This significantly
harms dir listing performance for macos clients.
Original PR: https://github.com/truenas/middleware/pull/18988
Co-authored-by: Andrew Walker <andrew.walker at truenas.com>