summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/config.h.in1
-rw-r--r--source3/include/includes.h18
-rw-r--r--source3/include/proto.h4
-rw-r--r--source3/include/smb.h18
4 files changed, 33 insertions, 8 deletions
diff --git a/source3/include/config.h.in b/source3/include/config.h.in
index 2934d438dc..4e4127e448 100644
--- a/source3/include/config.h.in
+++ b/source3/include/config.h.in
@@ -95,6 +95,7 @@
#undef STAT_STATFS3_OSF1
#undef STAT_STATFS4
#undef STAT_STATVFS
+#undef STAT_STATVFS64
#undef HAVE_NETMASK_IFREQ
#undef HAVE_NETMASK_AIX
#undef HAVE_CRYPT
diff --git a/source3/include/includes.h b/source3/include/includes.h
index d8da84bd4e..788e4485ab 100644
--- a/source3/include/includes.h
+++ b/source3/include/includes.h
@@ -375,6 +375,18 @@
#endif
/*
+ * Type for statvfs structure.
+ */
+
+#ifndef SMB_STRUCT_STATVFS
+# if defined(STAT_STATVFS64)
+# define SMB_STRUCT_STATVFS struct statvfs64
+# else
+# define SMB_STRUCT_STATVFS struct statvfs
+# endif
+#endif
+
+/*
* Defines for 64 bit fcntl locks.
*/
@@ -411,9 +423,11 @@
#endif
#if defined(HAVE_LONGLONG)
-#define SMB_BIG_INTEGER unsigned long long
+#define SMB_BIG_UINT unsigned long long
+#define SMB_BIG_INT long long
#else
-#define SMB_BIG_INTEGER unsigned long
+#define SMB_BIG_UINT unsigned long
+#define SMB_BIG_INT long
#endif
#ifndef MIN
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 6ddc92824d..8b063bcfd9 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -158,6 +158,7 @@ int sys_select(int maxfd, fd_set *fds,struct timeval *tval);
int sys_stat(char *fname,SMB_STRUCT_STAT *sbuf);
int sys_fstat(int fd,SMB_STRUCT_STAT *sbuf);
int sys_lstat(char *fname,SMB_STRUCT_STAT *sbuf);
+int sys_statvfs( const char *path, SMB_STRUCT_STATVFS *fsd);
int sys_ftruncate(int fd, SMB_OFF_T offset);
SMB_OFF_T sys_lseek(int fd, SMB_OFF_T offset, int whence);
int sys_fseek(FILE *fp, SMB_OFF_T offset, int whence);
@@ -1669,7 +1670,6 @@ BOOL claim_connection(connection_struct *conn,char *name,int max_connections,BOO
/*The following definitions come from smbd/dfree.c */
-int sys_disk_free(char *path,int *bsize,int *dfree,int *dsize);
/*The following definitions come from smbd/dir.c */
@@ -1796,7 +1796,7 @@ uint16 fd_attempt_close(file_fd_struct *fd_ptr);
void open_file_shared(files_struct *fsp,connection_struct *conn,char *fname,int share_mode,int ofun,
mode_t mode,int oplock_request, int *Access,int *action);
int open_directory(files_struct *fsp,connection_struct *conn,
- char *fname, int smb_ofun, int unixmode, int *action);
+ char *fname, int smb_ofun, mode_t unixmode, int *action);
BOOL check_file_sharing(connection_struct *conn,char *fname, BOOL rename_op);
/*The following definitions come from smbd/oplock.c */
diff --git a/source3/include/smb.h b/source3/include/smb.h
index aa963f9163..de482de6d6 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -708,8 +708,8 @@ struct passdb_ops {
*/
void *(*startsmbpwent)(BOOL);
void (*endsmbpwent)(void *);
- SMB_BIG_INTEGER (*getsmbpwpos)(void *);
- BOOL (*setsmbpwpos)(void *, SMB_BIG_INTEGER);
+ SMB_BIG_UINT (*getsmbpwpos)(void *);
+ BOOL (*setsmbpwpos)(void *, SMB_BIG_UINT);
/*
* smb password database query functions.
@@ -925,6 +925,15 @@ struct bitmap {
#define smb_vwv16 69
#define smb_vwv17 71
+/* flag defines. CIFS spec 3.1.1 */
+#define FLAG_SUPPORT_LOCKREAD 0x01
+#define FLAG_CLIENT_BUF_AVAIL 0x02
+#define FLAG_RESERVED 0x04
+#define FLAG_CASELESS_PATHNAMES 0x08
+#define FLAG_CANONICAL_PATHNAMES 0x10
+#define FLAG_REQUEST_OPLOCK 0x20
+#define FLAG_REQUEST_BATCH_OPLOCK 0x40
+#define FLAG_REPLY 0x80
/* the complete */
#define SMBmkdir 0x00 /* create directory */
@@ -1115,7 +1124,7 @@ struct bitmap {
/* these are for the NT create_and_X */
#define smb_ntcreate_NameLength (smb_vwv0 + 5)
#define smb_ntcreate_Flags (smb_vwv0 + 7)
-#define smb_ntcreate_RootDirectoryFid (smb_wvw0 + 11)
+#define smb_ntcreate_RootDirectoryFid (smb_vwv0 + 11)
#define smb_ntcreate_DesiredAccess (smb_vwv0 + 15)
#define smb_ntcreate_AllocationSize (smb_vwv0 + 19)
#define smb_ntcreate_FileAttributes (smb_vwv0 + 27)
@@ -1494,7 +1503,8 @@ extern int unix_ERR_code;
/*
* Core protocol.
*/
-#define CORE_OPLOCK_REQUEST(inbuf) ((CVAL(inbuf,smb_flg)&((1<<5)|(1<<6)))>>5)
+#define CORE_OPLOCK_REQUEST(inbuf) \
+ ((CVAL(inbuf,smb_flg)&(FLAG_REQUEST_OPLOCK|FLAG_REQUEST_BATCH_OPLOCK))>>5)
/*
* Extended protocol.