Made sure directories are not hard linked
On OpenIndiana the fuse kernel module does not prevent link(2) from hard linking directories, so this has to be done in the lowntfs-3g driver.edge.strict_endians
parent
e82240f499
commit
319958545e
|
@ -2091,6 +2091,12 @@ static int ntfs_fuse_newlink(fuse_req_t req __attribute__((unused)),
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Do not accept linking to a directory (except for renaming) */
|
||||||
|
if (e && (ni->mrec->flags & MFT_RECORD_IS_DIRECTORY)) {
|
||||||
|
errno = EPERM;
|
||||||
|
res = -errno;
|
||||||
|
goto exit;
|
||||||
|
}
|
||||||
/* Generate unicode filename. */
|
/* Generate unicode filename. */
|
||||||
uname_len = ntfs_mbstoucs(newname, &uname);
|
uname_len = ntfs_mbstoucs(newname, &uname);
|
||||||
if ((uname_len < 0)
|
if ((uname_len < 0)
|
||||||
|
|
Loading…
Reference in New Issue