mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +03:00
printing: use openat_pathref_fsp() in driver_unlink_internals()
Ensures we have a pathref handle in the smb_fname we pass to SMB_VFS_CREATE_FILE(). As the create_disposition is FILE_OPEN we just return the error if openat_pathref_fsp() fails Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
14b0cc6b9a
commit
36b03af0ea
@ -2042,6 +2042,14 @@ static NTSTATUS driver_unlink_internals(connection_struct *conn,
|
||||
goto err_out;
|
||||
}
|
||||
|
||||
status = openat_pathref_fsp(conn->cwd_fsp, smb_fname);
|
||||
if (NT_STATUS_EQUAL(status, NT_STATUS_STOPPED_ON_SYMLINK)) {
|
||||
status = NT_STATUS_OBJECT_NAME_NOT_FOUND;
|
||||
}
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
goto err_out;
|
||||
}
|
||||
|
||||
status = unlink_internals(conn, NULL, 0, smb_fname, false);
|
||||
err_out:
|
||||
talloc_free(tmp_ctx);
|
||||
|
Loading…
Reference in New Issue
Block a user