1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-26 21:57:41 +03:00

smbd: Enhance debugging for setting hard links

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Volker Lendecke 2019-03-18 12:24:25 +01:00 committed by Jeremy Allison
parent b2c2c4c3e6
commit 74ca95f804

View File

@ -6128,6 +6128,7 @@ NTSTATUS hardlink_internals(TALLOC_CTX *ctx,
struct smb_filename *smb_fname_new)
{
NTSTATUS status = NT_STATUS_OK;
bool ok;
/* source must already exist. */
if (!VALID_STAT(smb_fname_old->st)) {
@ -6159,8 +6160,14 @@ NTSTATUS hardlink_internals(TALLOC_CTX *ctx,
}
/* Setting a hardlink to/from a stream isn't currently supported. */
if (is_ntfs_stream_smb_fname(smb_fname_old) ||
is_ntfs_stream_smb_fname(smb_fname_new)) {
ok = is_ntfs_stream_smb_fname(smb_fname_old);
if (ok) {
DBG_DEBUG("Old name has streams\n");
return NT_STATUS_INVALID_PARAMETER;
}
ok = is_ntfs_stream_smb_fname(smb_fname_new);
if (ok) {
DBG_DEBUG("New name has streams\n");
return NT_STATUS_INVALID_PARAMETER;
}