bool large_file_format);
uint64_t get_lock_count(const uint8_t *data, int data_offset,
bool large_file_format);
-uint64_t get_lock_offset(const uint8_t *data, int data_offset,
- bool large_file_format);
void reply_lockingX(struct smb_request *req);
void reply_readbmpx(struct smb_request *req);
void reply_readbs(struct smb_request *req);
int ofun,
int count,
bool target_is_directory);
+uint64_t get_lock_offset(const uint8_t *data, int data_offset,
+ bool large_file_format);
/* The following definitions come from smbd/seal.c */
return count;
}
-/****************************************************************************
- Get a lock offset, dealing with large offset requests.
-****************************************************************************/
-
-uint64_t get_lock_offset(const uint8_t *data, int data_offset,
- bool large_file_format)
-{
- uint64_t offset = 0;
-
- if(!large_file_format) {
- offset = (uint64_t)IVAL(data,SMB_LKOFF_OFFSET(data_offset));
- } else {
- /*
- * No BVAL, this is reversed!
- */
- offset = (((uint64_t) IVAL(data,SMB_LARGE_LKOFF_OFFSET_HIGH(data_offset))) << 32) |
- ((uint64_t) IVAL(data,SMB_LARGE_LKOFF_OFFSET_LOW(data_offset)));
- }
-
- return offset;
-}
-
struct smbd_do_unlocking_state {
struct files_struct *fsp;
uint16_t num_ulocks;
TALLOC_FREE(smb_fname_dst_tmp);
return status;
}
+
+/****************************************************************************
+ Get a lock offset, dealing with large offset requests.
+****************************************************************************/
+
+uint64_t get_lock_offset(const uint8_t *data, int data_offset,
+ bool large_file_format)
+{
+ uint64_t offset = 0;
+
+ if(!large_file_format) {
+ offset = (uint64_t)IVAL(data,SMB_LKOFF_OFFSET(data_offset));
+ } else {
+ /*
+ * No BVAL, this is reversed!
+ */
+ offset = (((uint64_t) IVAL(data,SMB_LARGE_LKOFF_OFFSET_HIGH(data_offset))) << 32) |
+ ((uint64_t) IVAL(data,SMB_LARGE_LKOFF_OFFSET_LOW(data_offset)));
+ }
+
+ return offset;
+}