mirror of
https://github.com/samba-team/samba.git
synced 2025-02-26 21:57:41 +03:00
printing: call vfs_stat() in driver_unlink_internals()
Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
f84bc4b021
commit
21c76654ed
@ -2026,6 +2026,7 @@ static NTSTATUS driver_unlink_internals(connection_struct *conn,
|
||||
struct smb_filename *smb_fname = NULL;
|
||||
char *print_dlr_path;
|
||||
NTSTATUS status = NT_STATUS_NO_MEMORY;
|
||||
int ret;
|
||||
|
||||
print_dlr_path = talloc_asprintf(tmp_ctx, "%s/%d/%s",
|
||||
short_arch, vers, fname);
|
||||
@ -2043,6 +2044,12 @@ static NTSTATUS driver_unlink_internals(connection_struct *conn,
|
||||
goto err_out;
|
||||
}
|
||||
|
||||
ret = vfs_stat(conn, smb_fname);
|
||||
if (ret == -1) {
|
||||
status = map_nt_error_from_unix(errno);
|
||||
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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user