summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2002-01-10 00:28:09 +0000
committerJeremy Allison <jra@samba.org>2002-01-10 00:28:09 +0000
commit3454945146bdef0108f3a55fb32456cccf15f188 (patch)
treea8f95d74555b8f68edc577d2d0308e0af9186b3d /source3/include
parent3375267106fb0af332a516c6403700acbd1133ab (diff)
downloadsamba-3454945146bdef0108f3a55fb32456cccf15f188.tar.gz
samba-3454945146bdef0108f3a55fb32456cccf15f188.tar.bz2
samba-3454945146bdef0108f3a55fb32456cccf15f188.zip
Getting ready to add UNIX extensions in HEAD also.
Jeremy (This used to be commit 6210d4aa196c944e47076e316980f76ac9c6b02d)
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/config.h.in10
-rw-r--r--source3/include/includes.h6
-rw-r--r--source3/include/trans2.h54
-rw-r--r--source3/include/vfs.h53
4 files changed, 96 insertions, 27 deletions
diff --git a/source3/include/config.h.in b/source3/include/config.h.in
index 1d301d561a..164d2fb755 100644
--- a/source3/include/config.h.in
+++ b/source3/include/config.h.in
@@ -147,6 +147,7 @@
#undef WITH_MSDFS
#undef WITH_LIBICONV
#undef HAVE_INO64_T
+#undef HAVE_DEV64_T
#undef HAVE_STRUCT_FLOCK64
#undef SIZEOF_INO_T
#undef SIZEOF_OFF_T
@@ -602,6 +603,9 @@
/* Define if you have the innetgr function. */
#undef HAVE_INNETGR
+/* Define if you have the link function. */
+#undef HAVE_LINK
+
/* Define if you have the llseek function. */
#undef HAVE_LLSEEK
@@ -617,6 +621,12 @@
/* Define if you have the memset function. */
#undef HAVE_MEMSET
+/* Define if you have the mknod function. */
+#undef HAVE_MKNOD
+
+/* Define if you have the mknod64 function. */
+#undef HAVE_MKNOD64
+
/* Define if you have the mktime function. */
#undef HAVE_MKTIME
diff --git a/source3/include/includes.h b/source3/include/includes.h
index fa6fad4605..0ea387c19c 100644
--- a/source3/include/includes.h
+++ b/source3/include/includes.h
@@ -523,7 +523,11 @@ typedef int socklen_t;
*/
#ifndef SMB_DEV_T
-#define SMB_DEV_T dev_t
+# if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_DEV64_T)
+# define SMB_DEV_T dev64_t
+# else
+# define SMB_DEV_T dev_t
+# endif
#endif
/*
diff --git a/source3/include/trans2.h b/source3/include/trans2.h
index 3bf6203710..55b1670aa7 100644
--- a/source3/include/trans2.h
+++ b/source3/include/trans2.h
@@ -235,6 +235,14 @@ Byte offset Type name description
* Thursby MAC extensions....
*/
+/*
+ * MAC CIFS Extensions have the range 0x300 - 0x2FF reserved.
+ * Supposedly Microsoft have agreed to this.
+ */
+
+#define MIN_MAC_INFO_LEVEL 0x300
+#define MAX_MAC_INFO_LEVEL 0x3FF
+
#define SMB_MAC_QUERY_FS_INFO 0x301
#define DIRLEN_GUESS (45+MAX(l1_achName,l2_achName))
@@ -299,8 +307,52 @@ Byte offset Type name description
#define SMB_FILE_TRACKING_INFORMATION 1036
#define SMB_FILE_MAXIMUM_INFORMATION 1037
+/* UNIX CIFS Extensions - created by HP */
+/*
+ * UNIX CIFS Extensions have the range 0x200 - 0x2FF reserved.
+ * Supposedly Microsoft have agreed to this.
+ */
-#endif
+#define MIN_UNIX_INFO_LEVEL 0x200
+#define MAX_UNIX_INFO_LEVEL 0x2FF
+#define SMB_QUERY_FILE_UNIX_BASIC 0x200 /* UNIX File Info*/
+#define SMB_SET_FILE_UNIX_BASIC 0x200
+#define MODE_NO_CHANGE -1 /* file mode value which */
+ /* means "don't change it" */
+/*
+ LARGE_INTEGER EndOfFile File size
+ LARGE_INTEGER Blocks Number of bytes used on disk (st_blocks).
+ LARGE_INTEGER CreationTime Creation time
+ LARGE_INTEGER LastAccessTime Last access time
+ LARGE_INTEGER LastModificationTime Last modification time
+ LARGE_INTEGER Uid Numeric user id for the owner
+ LARGE_INTEGER Gid Numeric group id of owner
+ ULONG Type Enumeration specifying the pathname type:
+ 0 -- File
+ 1 -- Directory
+ 2 -- Symbolic link
+ 3 -- Character device
+ 4 -- Block device
+ 5 -- FIFO (named pipe)
+
+ LARGE_INTEGER devmajor Major device number if type is device
+ LARGE_INTEGER devminor Minor device number if type is device
+ LARGE_INTEGER uniqueid This is a server-assigned unique id for the file. The client
+ will typically map this onto an inode number. The scope of
+ uniqueness is the share.
+ LARGE_INTEGER permissions Standard UNIX file permissions
+ LARGE_INTEGER nlinks The number of directory entries that map to this entry
+ (number of hard links)
+
+*/
+
+#define SMB_QUERY_FILE_UNIX_LINK 0x201
+#define SMB_SET_FILE_UNIX_LINK 0x201
+#define SMB_SET_FILE_UNIX_HLINK 0x203
+
+#define SMB_FIND_FILE_UNIX 0x202
+
+#endif
diff --git a/source3/include/vfs.h b/source3/include/vfs.h
index 5a8451fb14..1856255385 100644
--- a/source3/include/vfs.h
+++ b/source3/include/vfs.h
@@ -39,6 +39,7 @@
* vfs_ops below. JRA.
*/
+/* Changed to version 2 for CIFS UNIX extensions (mknod and link added). JRA. */
#define SMB_VFS_INTERFACE_VERSION 2
/* VFS operations structure */
@@ -49,36 +50,36 @@ struct security_descriptor_info;
struct vfs_ops {
- /* Disk operations */
+ /* Disk operations */
- int (*connect)(struct connection_struct *conn, const char *service, const char *user);
- void (*disconnect)(struct connection_struct *conn);
- SMB_BIG_UINT (*disk_free)(struct connection_struct *conn, const char *path, BOOL small_query, SMB_BIG_UINT *bsize,
- SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize);
+ int (*connect)(struct connection_struct *conn, const char *service, const char *user);
+ void (*disconnect)(struct connection_struct *conn);
+ SMB_BIG_UINT (*disk_free)(struct connection_struct *conn, const char *path, BOOL small_query, SMB_BIG_UINT *bsize,
+ SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize);
- /* Directory operations */
+ /* Directory operations */
- DIR *(*opendir)(struct connection_struct *conn, const char *fname);
- struct dirent *(*readdir)(struct connection_struct *conn, DIR *dirp);
- int (*mkdir)(struct connection_struct *conn, const char *path, mode_t mode);
- int (*rmdir)(struct connection_struct *conn, const char *path);
- int (*closedir)(struct connection_struct *conn, DIR *dir);
+ DIR *(*opendir)(struct connection_struct *conn, const char *fname);
+ struct dirent *(*readdir)(struct connection_struct *conn, DIR *dirp);
+ int (*mkdir)(struct connection_struct *conn, const char *path, mode_t mode);
+ int (*rmdir)(struct connection_struct *conn, const char *path);
+ int (*closedir)(struct connection_struct *conn, DIR *dir);
- /* File operations */
+ /* File operations */
- int (*open)(struct connection_struct *conn, const char *fname, int flags, mode_t mode);
- int (*close)(struct files_struct *fsp, int fd);
- ssize_t (*read)(struct files_struct *fsp, int fd, void *data, size_t n);
- ssize_t (*write)(struct files_struct *fsp, int fd, const void *data, size_t n);
- SMB_OFF_T (*lseek)(struct files_struct *fsp, int filedes, SMB_OFF_T offset, int whence);
- int (*rename)(struct connection_struct *conn, const char *old, const char *new);
- int (*fsync)(struct files_struct *fsp, int fd);
- int (*stat)(struct connection_struct *conn, const char *fname, SMB_STRUCT_STAT *sbuf);
- int (*fstat)(struct files_struct *fsp, int fd, SMB_STRUCT_STAT *sbuf);
- int (*lstat)(struct connection_struct *conn, const char *path, SMB_STRUCT_STAT *sbuf);
- int (*unlink)(struct connection_struct *conn, const char *path);
- int (*chmod)(struct connection_struct *conn, const char *path, mode_t mode);
- int (*fchmod)(struct files_struct *fsp, int fd, mode_t mode);
+ int (*open)(struct connection_struct *conn, const char *fname, int flags, mode_t mode);
+ int (*close)(struct files_struct *fsp, int fd);
+ ssize_t (*read)(struct files_struct *fsp, int fd, void *data, size_t n);
+ ssize_t (*write)(struct files_struct *fsp, int fd, const void *data, size_t n);
+ SMB_OFF_T (*lseek)(struct files_struct *fsp, int filedes, SMB_OFF_T offset, int whence);
+ int (*rename)(struct connection_struct *conn, const char *old, const char *new);
+ int (*fsync)(struct files_struct *fsp, int fd);
+ int (*stat)(struct connection_struct *conn, const char *fname, SMB_STRUCT_STAT *sbuf);
+ int (*fstat)(struct files_struct *fsp, int fd, SMB_STRUCT_STAT *sbuf);
+ int (*lstat)(struct connection_struct *conn, const char *path, SMB_STRUCT_STAT *sbuf);
+ int (*unlink)(struct connection_struct *conn, const char *path);
+ int (*chmod)(struct connection_struct *conn, const char *path, mode_t mode);
+ int (*fchmod)(struct files_struct *fsp, int fd, mode_t mode);
int (*chown)(struct connection_struct *conn, const char *path, uid_t uid, gid_t gid);
int (*fchown)(struct files_struct *fsp, int fd, uid_t uid, gid_t gid);
int (*chdir)(struct connection_struct *conn, const char *path);
@@ -88,6 +89,8 @@ struct vfs_ops {
BOOL (*lock)(struct files_struct *fsp, int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type);
int (*symlink)(struct connection_struct *conn, const char *oldpath, const char *newpath);
int (*readlink)(struct connection_struct *conn, const char *path, char *buf, size_t bufsiz);
+ int (*link)(struct connection_struct *conn, const char *oldpath, const char *newpath);
+ int (*mknod)(struct connection_struct *conn, const char *path, mode_t mode, SMB_DEV_T dev);
/* NT ACL operations. */