mirror of
https://git.code.sf.net/p/ntfs-3g/ntfs-3g.git
synced 2024-12-04 15:34:28 +08:00
Fixed initial security id for created files
This commit is contained in:
parent
66c79fde0c
commit
cc2e201f81
@ -578,6 +578,8 @@ static int ntfs_filldir(ntfs_inode *dir_ni, s64 *pos, u8 ivcn_bits,
|
|||||||
return 0;
|
return 0;
|
||||||
if (ie->key.file_name.file_attributes & FILE_ATTR_I30_INDEX_PRESENT)
|
if (ie->key.file_name.file_attributes & FILE_ATTR_I30_INDEX_PRESENT)
|
||||||
dt_type = NTFS_DT_DIR;
|
dt_type = NTFS_DT_DIR;
|
||||||
|
else if (fn->file_attributes & FILE_ATTR_SYSTEM)
|
||||||
|
dt_type = NTFS_DT_UNKNOWN;
|
||||||
else
|
else
|
||||||
dt_type = NTFS_DT_REG;
|
dt_type = NTFS_DT_REG;
|
||||||
return filldir(dirent, fn->file_name, fn->file_name_length,
|
return filldir(dirent, fn->file_name, fn->file_name_length,
|
||||||
@ -1077,10 +1079,10 @@ static ntfs_inode *__ntfs_create(ntfs_inode *dir_ni, le32 securid,
|
|||||||
si->last_access_time = utc2ntfs(ni->last_access_time);
|
si->last_access_time = utc2ntfs(ni->last_access_time);
|
||||||
if (securid) {
|
if (securid) {
|
||||||
set_nino_flag(ni, v3_Extensions);
|
set_nino_flag(ni, v3_Extensions);
|
||||||
si->owner_id = 0;
|
ni->owner_id = si->owner_id = 0;
|
||||||
si->security_id = securid;
|
ni->security_id = si->security_id = securid;
|
||||||
si->quota_charged = 0;
|
ni->quota_charged = si->quota_charged = 0;
|
||||||
si->usn = 0;
|
ni->usn = si->usn = 0;
|
||||||
} else
|
} else
|
||||||
clear_nino_flag(ni, v3_Extensions);
|
clear_nino_flag(ni, v3_Extensions);
|
||||||
if (!S_ISREG(type) && !S_ISDIR(type)) {
|
if (!S_ISREG(type) && !S_ISDIR(type)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user