diff options
author | Jeremy Allison <jra@samba.org> | 2017-06-07 15:03:37 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2017-06-18 02:49:25 +0200 |
commit | 6ae2d86b9ccc0ebe73dc911a1d5f06bd53613acf (patch) | |
tree | 5b46b8fc5f2c144c0d65b3278ffd9da0c2acdb67 /source3/include | |
parent | 4ad426a7c6c9fffa41df5bcafd9f420c257b6805 (diff) | |
download | samba-6ae2d86b9ccc0ebe73dc911a1d5f06bd53613acf.tar.gz |
s3: VFS: Change SMB_VFS_READLINK to use const struct smb_filename * instead of const char *.
We need to migrate all pathname based VFS calls to use a struct
to finish modernising the VFS with extra timestamp and flags parameters.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com>
Diffstat (limited to 'source3/include')
-rw-r--r-- | source3/include/vfs.h | 11 | ||||
-rw-r--r-- | source3/include/vfs_macros.h | 8 |
2 files changed, 13 insertions, 6 deletions
diff --git a/source3/include/vfs.h b/source3/include/vfs.h index 2f434ba20dc..115a9dc01c6 100644 --- a/source3/include/vfs.h +++ b/source3/include/vfs.h @@ -224,6 +224,8 @@ to const struct smb_filename * */ /* Version 37 - Change statvfs from const char * to const struct smb_filename * */ +/* Version 37 - Change readlink from const char * + to const struct smb_filename * */ #define SMB_VFS_INTERFACE_VERSION 37 @@ -744,7 +746,10 @@ struct vfs_fn_pointers { int (*linux_setlease_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp, int leasetype); bool (*getlock_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp, off_t *poffset, off_t *pcount, int *ptype, pid_t *ppid); int (*symlink_fn)(struct vfs_handle_struct *handle, const char *oldpath, const char *newpath); - int (*readlink_fn)(struct vfs_handle_struct *handle, const char *path, char *buf, size_t bufsiz); + int (*readlink_fn)(struct vfs_handle_struct *handle, + const struct smb_filename *smb_fname, + char *buf, + size_t bufsiz); int (*link_fn)(struct vfs_handle_struct *handle, const struct smb_filename *old_smb_fname, const struct smb_filename *new_smb_fname); @@ -1249,7 +1254,9 @@ bool smb_vfs_call_getlock(struct vfs_handle_struct *handle, int smb_vfs_call_symlink(struct vfs_handle_struct *handle, const char *oldpath, const char *newpath); int smb_vfs_call_readlink(struct vfs_handle_struct *handle, - const char *path, char *buf, size_t bufsiz); + const struct smb_filename *smb_fname, + char *buf, + size_t bufsiz); int smb_vfs_call_link(struct vfs_handle_struct *handle, const struct smb_filename *old_smb_fname, const struct smb_filename *new_smb_fname); diff --git a/source3/include/vfs_macros.h b/source3/include/vfs_macros.h index 3404c8ca751..77646b45f06 100644 --- a/source3/include/vfs_macros.h +++ b/source3/include/vfs_macros.h @@ -316,10 +316,10 @@ #define SMB_VFS_NEXT_SYMLINK(handle, oldpath, newpath) \ smb_vfs_call_symlink((handle)->next, (oldpath), (newpath)) -#define SMB_VFS_READLINK(conn, path, buf, bufsiz) \ - smb_vfs_call_readlink((conn)->vfs_handles, (path), (buf), (bufsiz)) -#define SMB_VFS_NEXT_READLINK(handle, path, buf, bufsiz) \ - smb_vfs_call_readlink((handle)->next, (path), (buf), (bufsiz)) +#define SMB_VFS_READLINK(conn, smb_fname, buf, bufsiz) \ + smb_vfs_call_readlink((conn)->vfs_handles, (smb_fname), (buf), (bufsiz)) +#define SMB_VFS_NEXT_READLINK(handle, smb_fname, buf, bufsiz) \ + smb_vfs_call_readlink((handle)->next, (smb_fname), (buf), (bufsiz)) #define SMB_VFS_LINK(conn, oldpath, newpath) \ smb_vfs_call_link((conn)->vfs_handles, (oldpath), (newpath)) |