diff options
author | Jeremy Allison <jra@samba.org> | 2019-08-30 12:01:13 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2019-09-03 21:15:42 +0000 |
commit | 42414b5bfc8f9e36d684b45997a5e9170b633220 (patch) | |
tree | 8238266078732661ec0de0ff404638a0b6fbce4f /source3/include | |
parent | 3355601fe8541994cc41f5ed800aab9b6a2294f4 (diff) | |
download | samba-42414b5bfc8f9e36d684b45997a5e9170b633220.tar.gz |
s3: VFS: Add SMB_VFS_SYMLINKAT().
Currently identical to SMB_VFS_SYMLINK().
Next, add to all VFS modules that implement
symlink and eventually remove symlink.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
Diffstat (limited to 'source3/include')
-rw-r--r-- | source3/include/smbprofile.h | 1 | ||||
-rw-r--r-- | source3/include/vfs.h | 13 | ||||
-rw-r--r-- | source3/include/vfs_macros.h | 5 |
3 files changed, 19 insertions, 0 deletions
diff --git a/source3/include/smbprofile.h b/source3/include/smbprofile.h index b6c9002973e..51761e11040 100644 --- a/source3/include/smbprofile.h +++ b/source3/include/smbprofile.h @@ -84,6 +84,7 @@ struct tevent_context; SMBPROFILE_STATS_BASIC(syscall_fcntl_getlock) \ SMBPROFILE_STATS_BASIC(syscall_readlinkat) \ SMBPROFILE_STATS_BASIC(syscall_symlink) \ + SMBPROFILE_STATS_BASIC(syscall_symlinkat) \ SMBPROFILE_STATS_BASIC(syscall_linkat) \ SMBPROFILE_STATS_BASIC(syscall_mknodat) \ SMBPROFILE_STATS_BASIC(syscall_realpath) \ diff --git a/source3/include/vfs.h b/source3/include/vfs.h index 126ba32aa36..6970be1fb5e 100644 --- a/source3/include/vfs.h +++ b/source3/include/vfs.h @@ -276,6 +276,7 @@ /* Version 42 - Move SMB_VFS_LINK -> SMB_VFS_LINKAT. */ /* Version 42 - Move SMB_VFS_MKNOD -> SMB_VFS_MKDNODAT. */ /* Version 42 - Move SMB_VFS_READLINK -> SMB_VFS_READLINKAT. */ +/* Version 42 - Add SMB_VFS_SYMLINKAT. */ #define SMB_VFS_INTERFACE_VERSION 42 @@ -798,6 +799,10 @@ struct vfs_fn_pointers { int (*symlink_fn)(struct vfs_handle_struct *handle, const char *link_contents, const struct smb_filename *new_smb_fname); + int (*symlinkat_fn)(struct vfs_handle_struct *handle, + const char *link_contents, + struct files_struct *dirfsp, + const struct smb_filename *new_smb_fname); int (*readlinkat_fn)(struct vfs_handle_struct *handle, struct files_struct *dirfsp, const struct smb_filename *smb_fname, @@ -1332,6 +1337,10 @@ bool smb_vfs_call_getlock(struct vfs_handle_struct *handle, int smb_vfs_call_symlink(struct vfs_handle_struct *handle, const char *link_contents, const struct smb_filename *new_smb_fname); +int smb_vfs_call_symlinkat(struct vfs_handle_struct *handle, + const char *link_contents, + struct files_struct *dirfsp, + const struct smb_filename *new_smb_fname); int smb_vfs_call_readlinkat(struct vfs_handle_struct *handle, struct files_struct *dirfsp, const struct smb_filename *smb_fname, @@ -1763,6 +1772,10 @@ bool vfs_not_implemented_getlock(vfs_handle_struct *handle, files_struct *fsp, int vfs_not_implemented_symlink(vfs_handle_struct *handle, const char *link_contents, const struct smb_filename *new_smb_fname); +int vfs_not_implemented_symlinkat(vfs_handle_struct *handle, + const char *link_contents, + struct files_struct *dirfsp, + const struct smb_filename *new_smb_fname); int vfs_not_implemented_vfs_readlinkat(vfs_handle_struct *handle, struct files_struct *dirfsp, const struct smb_filename *smb_fname, diff --git a/source3/include/vfs_macros.h b/source3/include/vfs_macros.h index 247e9c286c7..f34becaadfa 100644 --- a/source3/include/vfs_macros.h +++ b/source3/include/vfs_macros.h @@ -301,6 +301,11 @@ #define SMB_VFS_NEXT_SYMLINK(handle, oldpath, newpath) \ smb_vfs_call_symlink((handle)->next, (oldpath), (newpath)) +#define SMB_VFS_SYMLINKAT(conn, oldpath, dirfsp, newpath) \ + smb_vfs_call_symlinkat((conn)->vfs_handles, (oldpath), (dirfsp), (newpath)) +#define SMB_VFS_NEXT_SYMLINKAT(handle, oldpath, dirfsp, newpath) \ + smb_vfs_call_symlinkat((handle)->next, (oldpath), (dirfsp), (newpath)) + #define SMB_VFS_READLINKAT(conn, dirfsp, smb_fname, buf, bufsiz) \ smb_vfs_call_readlinkat((conn)->vfs_handles, (dirfsp), (smb_fname), (buf), (bufsiz)) #define SMB_VFS_NEXT_READLINKAT(handle, dirfsp, smb_fname, buf, bufsiz) \ |