summaryrefslogtreecommitdiff
path: root/source3/printing
diff options
context:
space:
mode:
authorRalph Boehme <slow@samba.org>2020-11-12 12:38:43 +0100
committerRalph Boehme <slow@samba.org>2020-12-16 09:08:31 +0000
commitcbe25e1777d0c43c21e8acc2cea79fd03fdaf2ea (patch)
treeeb5921f8accc35c642ad44ec3a18e0c6fce2612b /source3/printing
parente8a49d0ec9e4fc31e1b2a8f93a3d36b2a3caed50 (diff)
downloadsamba-cbe25e1777d0c43c21e8acc2cea79fd03fdaf2ea.tar.gz
printing: use openat_pathref_fsp() in file_version_is_newer()
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>
Diffstat (limited to 'source3/printing')
-rw-r--r--source3/printing/nt_printing.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c
index 0e33c6a6876..b8a596ee34d 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/printing/nt_printing.c
@@ -830,6 +830,11 @@ static int file_version_is_newer(connection_struct *conn, fstring new_file, fstr
goto error_exit;
}
+ status = openat_pathref_fsp(conn->cwd_fsp, smb_fname);
+ if (!NT_STATUS_IS_OK(status)) {
+ return false;
+ }
+
status = SMB_VFS_CREATE_FILE(
conn, /* conn */
NULL, /* req */