diff options
author | Ralph Boehme <slow@samba.org> | 2020-11-12 12:38:43 +0100 |
---|---|---|
committer | Ralph Boehme <slow@samba.org> | 2020-12-16 09:08:31 +0000 |
commit | cbe25e1777d0c43c21e8acc2cea79fd03fdaf2ea (patch) | |
tree | eb5921f8accc35c642ad44ec3a18e0c6fce2612b /source3/printing | |
parent | e8a49d0ec9e4fc31e1b2a8f93a3d36b2a3caed50 (diff) | |
download | samba-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.c | 5 |
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 */ |