/* The following definitions come from smbd/reply.c */
-bool check_fsp(connection_struct *conn, struct smb_request *req,
- files_struct *fsp);
bool check_fsp_ntquota_handle(connection_struct *conn, struct smb_request *req,
files_struct *fsp);
void reply_special(struct smbXsrv_connection *xconn, char *inbuf, size_t inbuf_size);
char **dest, const uint8_t *src, int flags);
bool check_fsp_open(connection_struct *conn, struct smb_request *req,
files_struct *fsp);
+bool check_fsp(connection_struct *conn, struct smb_request *req,
+ files_struct *fsp);
/* The following definitions come from smbd/seal.c */
#include "source3/printing/rap_jobid.h"
#include "source3/lib/substitute.h"
-/****************************************************************************
- Check if we have a correct fsp pointing to a file.
-****************************************************************************/
-
-bool check_fsp(connection_struct *conn, struct smb_request *req,
- files_struct *fsp)
-{
- if (!check_fsp_open(conn, req, fsp)) {
- return False;
- }
- if (fsp->fsp_flags.is_directory) {
- reply_nterror(req, NT_STATUS_INVALID_DEVICE_REQUEST);
- return False;
- }
- if (fsp_get_pathref_fd(fsp) == -1) {
- reply_nterror(req, NT_STATUS_ACCESS_DENIED);
- return False;
- }
- fsp->num_smb_operations++;
- return True;
-}
-
/****************************************************************************
Check if we have a correct fsp pointing to a quota fake file. Replacement for
the CHECK_NTQUOTA_HANDLE_OK macro.
}
return True;
}
+
+/****************************************************************************
+ Check if we have a correct fsp pointing to a file.
+****************************************************************************/
+
+bool check_fsp(connection_struct *conn, struct smb_request *req,
+ files_struct *fsp)
+{
+ if (!check_fsp_open(conn, req, fsp)) {
+ return False;
+ }
+ if (fsp->fsp_flags.is_directory) {
+ reply_nterror(req, NT_STATUS_INVALID_DEVICE_REQUEST);
+ return False;
+ }
+ if (fsp_get_pathref_fd(fsp) == -1) {
+ reply_nterror(req, NT_STATUS_ACCESS_DENIED);
+ return False;
+ }
+ fsp->num_smb_operations++;
+ return True;
+}