apply_file_attributes_and_security_data(ntfs_inode *ni,
ntfs_inode *dir_ni,
const struct wim_dentry *dentry,
- const WIMStruct *w)
+ const WIMStruct *w,
+ int extract_flags)
{
int ret;
struct SECURITY_CONTEXT ctx;
dentry->full_path);
return WIMLIB_ERR_NTFS_3G;
}
- if (inode->i_security_id != -1) {
+ if (inode->i_security_id != -1 &&
+ !(extract_flags & WIMLIB_EXTRACT_FLAG_NOACLS))
+ {
const char *desc;
const struct wim_security_data *sd;
}
ret = apply_file_attributes_and_security_data(ni, dir_ni, dentry,
- args->w);
+ args->w,
+ args->extract_flags);
if (ret != 0)
goto out_close_dir_ni;
static int
apply_root_dentry_ntfs(const struct wim_dentry *dentry,
- ntfs_volume *vol, const WIMStruct *w)
+ ntfs_volume *vol, const WIMStruct *w,
+ int extract_flags)
{
ntfs_inode *ni;
int ret = 0;
ERROR_WITH_ERRNO("Could not find root NTFS inode");
return WIMLIB_ERR_NTFS_3G;
}
- ret = apply_file_attributes_and_security_data(ni, ni, dentry, w);
+ ret = apply_file_attributes_and_security_data(ni, ni, dentry, w,
+ extract_flags);
if (ntfs_inode_close(ni) != 0) {
ERROR_WITH_ERRNO("Failed to close NTFS inode for root "
"directory");
/* Treat the root dentry specially. */
if (dentry_is_root(dentry))
- return apply_root_dentry_ntfs(dentry, vol, w);
+ return apply_root_dentry_ntfs(dentry, vol, w,
+ args->extract_flags);
/* NTFS filename namespaces need careful consideration. A name for a
* NTFS file may be in either the POSIX, Win32, DOS, or Win32+DOS