-#ifdef HAVE_NTFS_INODE_FUNCTIONS
- ret = ntfs_get_inode_security(ni,
- OWNER_SECURITY_INFORMATION |
- GROUP_SECURITY_INFORMATION |
- DACL_SECURITY_INFORMATION |
- SACL_SECURITY_INFORMATION,
- NULL, 0, &sd_size);
- char sd[sd_size];
- ret = ntfs_get_inode_security(ni,
- OWNER_SECURITY_INFORMATION |
- GROUP_SECURITY_INFORMATION |
- DACL_SECURITY_INFORMATION |
- SACL_SECURITY_INFORMATION,
- sd, sd_size, &sd_size);
- if (ret == 0) {
- ERROR_WITH_ERRNO("Failed to get security information from "
- "`%s'", path);
- ret = WIMLIB_ERR_NTFS_3G;
- } else {
- if (ret > 0) {
- /*print_security_descriptor(sd, sd_size);*/
- root->security_id = sd_set_add_sd(sd_set, sd, ret);
- if (root->security_id == -1) {
- ERROR("Out of memory");
- return WIMLIB_ERR_NOMEM;
- }
- DEBUG("Added security ID = %u for `%s'",
- root->security_id, path);
- } else {
- root->security_id = -1;
- DEBUG("No security ID for `%s'", path);
- }
- ret = 0;
- }
-#else