summaryrefslogtreecommitdiff
path: root/source3/include/vfs.h
diff options
context:
space:
mode:
Diffstat (limited to 'source3/include/vfs.h')
-rw-r--r--source3/include/vfs.h38
1 files changed, 19 insertions, 19 deletions
diff --git a/source3/include/vfs.h b/source3/include/vfs.h
index 93823a5f23..5b1d804e4d 100644
--- a/source3/include/vfs.h
+++ b/source3/include/vfs.h
@@ -39,7 +39,7 @@
* vfs_ops below. JRA.
*/
-#define SMB_VFS_INTERFACE_VERSION 1
+#define SMB_VFS_INTERFACE_VERSION 2
/* VFS operations structure */
@@ -51,39 +51,39 @@ struct vfs_ops {
/* Disk operations */
- int (*connect)(struct connection_struct *conn, char *service, char *user);
+ 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, char *path, BOOL small_query, SMB_BIG_UINT *bsize,
+ 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 */
- DIR *(*opendir)(struct connection_struct *conn, char *fname);
+ DIR *(*opendir)(struct connection_struct *conn, const char *fname);
struct dirent *(*readdir)(struct connection_struct *conn, DIR *dirp);
- int (*mkdir)(struct connection_struct *conn, char *path, mode_t mode);
- int (*rmdir)(struct connection_struct *conn, char *path);
+ 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 */
- int (*open)(struct connection_struct *conn, char *fname, int flags, 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, char *data, size_t n);
- ssize_t (*write)(struct files_struct *fsp, int fd, char *data, size_t n);
+ ssize_t (*write)(struct files_struct *fsp, int fd, const char *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, char *old, char *new);
+ 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, char *fname, SMB_STRUCT_STAT *sbuf);
+ 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, char *path, SMB_STRUCT_STAT *sbuf);
- int (*unlink)(struct connection_struct *conn, char *path);
- int (*chmod)(struct connection_struct *conn, char *path, mode_t mode);
+ 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, char *path, uid_t uid, gid_t gid);
+ 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, char *path);
+ int (*chdir)(struct connection_struct *conn, const char *path);
char *(*getwd)(struct connection_struct *conn, char *buf);
- int (*utime)(struct connection_struct *conn, char *path, struct utimbuf *times);
+ int (*utime)(struct connection_struct *conn, const char *path, struct utimbuf *times);
int (*ftruncate)(struct files_struct *fsp, int fd, SMB_OFF_T offset);
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);
@@ -92,13 +92,13 @@ struct vfs_ops {
/* NT ACL operations. */
size_t (*fget_nt_acl)(struct files_struct *fsp, int fd, struct security_descriptor_info **ppdesc);
- size_t (*get_nt_acl)(struct files_struct *fsp, char *name, struct security_descriptor_info **ppdesc);
+ size_t (*get_nt_acl)(struct files_struct *fsp, const char *name, struct security_descriptor_info **ppdesc);
BOOL (*fset_nt_acl)(struct files_struct *fsp, int fd, uint32 security_info_sent, struct security_descriptor_info *psd);
- BOOL (*set_nt_acl)(struct files_struct *fsp, char *name, uint32 security_info_sent, struct security_descriptor_info *psd);
+ BOOL (*set_nt_acl)(struct files_struct *fsp, const char *name, uint32 security_info_sent, struct security_descriptor_info *psd);
/* POSIX ACL operations. */
- int (*chmod_acl)(struct connection_struct *conn, char *name, mode_t mode);
+ int (*chmod_acl)(struct connection_struct *conn, const char *name, mode_t mode);
int (*fchmod_acl)(struct files_struct *fsp, int fd, mode_t mode);
};