Skip to content

Commit

Permalink
Add windows_load_security tunable
Browse files Browse the repository at this point in the history
Default is to load SecurityDescriptors from
storage, but setting this to 0 will skip.
In the hopes that older pools of OpenZFSonWindows
that wrote bad SDs to disk may import again.

Signed-off-by: Jorgen Lundman <[email protected]>
  • Loading branch information
lundman committed Oct 8, 2024
1 parent 3020854 commit ad7978e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions module/os/windows/zfs/zfs_vnops_windows_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@

#undef _NTDDK_

uint64_t windows_load_security = 1;
ZFS_MODULE_PARAM(, windows_, load_security, U64, ZMOD_RW,
"Windows: load Security Descriptors from storage");

typedef struct {
UCHAR revision;
UCHAR elements;
Expand Down Expand Up @@ -2738,6 +2742,9 @@ zfs_load_ntsecurity(struct vnode *vp)
struct iovec iov;
ssize_t retsize;

if (!windows_load_security)
return;

error = zpl_xattr_get(vp, EA_NTACL, NULL,
&retsize, NULL);

Expand Down

0 comments on commit ad7978e

Please sign in to comment.