From: Volker Lendecke Date: Wed, 4 Dec 2024 15:30:03 +0000 (+0100) Subject: printing: Remove a few obsolete openat_pathref_fsp() calls X-Git-Tag: tdb-1.4.13~306 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=de8babd6af50764cdb5e9ddf369b639d3918b3e1;p=thirdparty%2Fsamba.git printing: Remove a few obsolete openat_pathref_fsp() calls driver_convert_unix calls filename_convert_dirfsp, which these days fills smb_fname->fsp. So openat_pathref_fsp() will immediately return success as it finds smb_fname->fsp != NULL. Signed-off-by: Volker Lendecke Reviewed-by: Pavel Filipenský --- diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c index 7907fb4b229..14a1e496c04 100644 --- a/source3/printing/nt_printing.c +++ b/source3/printing/nt_printing.c @@ -829,12 +829,6 @@ 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)) { - ret = 1; - goto done; - } - status = SMB_VFS_CREATE_FILE( conn, /* conn */ NULL, /* req */ @@ -891,13 +885,6 @@ 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)) { - DBG_NOTICE("Can't open new file [%s], errno = %d\n", - smb_fname_str_dbg(smb_fname), errno); - goto error_exit; - } - status = SMB_VFS_CREATE_FILE( conn, /* conn */ NULL, /* req */ @@ -1110,15 +1097,6 @@ static uint32_t get_correct_cversion(const struct auth_session_info *session_inf goto error_exit; } - nt_status = openat_pathref_fsp(conn->cwd_fsp, smb_fname); - if (!NT_STATUS_IS_OK(nt_status)) { - DBG_NOTICE("Can't open file [%s]: %s\n", - smb_fname_str_dbg(smb_fname), - nt_errstr(nt_status)); - *perr = WERR_ACCESS_DENIED; - goto error_exit; - } - nt_status = SMB_VFS_CREATE_FILE( conn, /* conn */ NULL, /* req */