]> wimlib.net Git - wimlib/blobdiff - src/win32_apply.c
apply_operations: Remove 'strict' argument from set_security_descriptor()
[wimlib] / src / win32_apply.c
index b59f7a8a0b6d795b273150e2cfe0ad3fc70f4da4..bce897a46344860ed42ce0b82b6ef086140b81c9 100644 (file)
@@ -422,7 +422,7 @@ error:
 
 static int
 win32_set_security_descriptor(const wchar_t *path, const u8 *desc, size_t desc_size,
-                             struct apply_ctx *ctx, bool strict)
+                             struct apply_ctx *ctx)
 {
        SECURITY_INFORMATION info;
 
@@ -432,7 +432,8 @@ win32_set_security_descriptor(const wchar_t *path, const u8 *desc, size_t desc_s
                SACL_SECURITY_INFORMATION;
 retry:
        if (!SetFileSecurity(path, info, (PSECURITY_DESCRIPTOR)desc)) {
-               if (!strict && GetLastError() == ERROR_PRIVILEGE_NOT_HELD &&
+               if (!(ctx->extract_flags & WIMLIB_EXTRACT_FLAG_STRICT_ACLS) &&
+                   GetLastError() == ERROR_PRIVILEGE_NOT_HELD &&
                    (info & SACL_SECURITY_INFORMATION))
                {
                        info &= ~SACL_SECURITY_INFORMATION;