* set ctx->supported_features.security_descriptors if supported. */
int (*set_security_descriptor)
(const tchar *path, const u8 *desc, size_t desc_size,
- struct apply_ctx *ctx, bool strict);
+ struct apply_ctx *ctx);
/* OPTIONAL: Set wimlib-specific UNIX data. In start_extract(), set
* ctx->supported_features.unix_data if supported. */
desc_size = sd->sizes[inode->i_security_id];
ret = ctx->ops->set_security_descriptor(path, desc,
- desc_size, ctx,
- !!(ctx->extract_flags &
- WIMLIB_EXTRACT_FLAG_STRICT_ACLS));
+ desc_size, ctx);
if (ret) {
if (ctx->extract_flags & WIMLIB_EXTRACT_FLAG_STRICT_ACLS) {
ERROR_WITH_ERRNO("Failed to set security "
static int
ntfs_3g_set_security_descriptor(const char *path, const u8 *desc, size_t desc_size,
- struct apply_ctx *ctx, bool strict)
+ struct apply_ctx *ctx)
{
ntfs_volume *vol;
ntfs_inode *ni;
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;
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;