From 42414b5bfc8f9e36d684b45997a5e9170b633220 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 30 Aug 2019 12:01:13 -0700 Subject: s3: VFS: Add SMB_VFS_SYMLINKAT(). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently identical to SMB_VFS_SYMLINK(). Next, add to all VFS modules that implement symlink and eventually remove symlink. Signed-off-by: Jeremy Allison Reviewed-by: Ralph Böhme --- examples/VFS/skel_opaque.c | 10 ++++++++++ examples/VFS/skel_transparent.c | 12 ++++++++++++ 2 files changed, 22 insertions(+) (limited to 'examples') diff --git a/examples/VFS/skel_opaque.c b/examples/VFS/skel_opaque.c index ecc1c920c92..96661857b4c 100644 --- a/examples/VFS/skel_opaque.c +++ b/examples/VFS/skel_opaque.c @@ -464,6 +464,15 @@ static int skel_symlink(vfs_handle_struct *handle, return -1; } +static int skel_symlinkat(vfs_handle_struct *handle, + const char *link_contents, + struct files_struct *dirfsp, + const struct smb_filename *new_smb_fname) +{ + errno = ENOSYS; + return -1; +} + static int skel_vfs_readlinkat(vfs_handle_struct *handle, files_struct *dirfsp, const struct smb_filename *smb_fname, @@ -1090,6 +1099,7 @@ static struct vfs_fn_pointers skel_opaque_fns = { .linux_setlease_fn = skel_linux_setlease, .getlock_fn = skel_getlock, .symlink_fn = skel_symlink, + .symlinkat_fn = skel_symlinkat, .readlinkat_fn = skel_vfs_readlinkat, .linkat_fn = skel_linkat, .mknodat_fn = skel_mknodat, diff --git a/examples/VFS/skel_transparent.c b/examples/VFS/skel_transparent.c index 63cf4a4369a..493c18a5417 100644 --- a/examples/VFS/skel_transparent.c +++ b/examples/VFS/skel_transparent.c @@ -563,6 +563,17 @@ static int skel_symlink(vfs_handle_struct *handle, return SMB_VFS_NEXT_SYMLINK(handle, link_contents, new_smb_fname); } +static int skel_symlinkat(vfs_handle_struct *handle, + const char *link_contents, + struct files_struct *dirfsp, + const struct smb_filename *new_smb_fname) +{ + return SMB_VFS_NEXT_SYMLINKAT(handle, + link_contents, + dirfsp, + new_smb_fname); +} + static int skel_vfs_readlinkat(vfs_handle_struct *handle, files_struct *dirfsp, const struct smb_filename *smb_fname, @@ -1369,6 +1380,7 @@ static struct vfs_fn_pointers skel_transparent_fns = { .linux_setlease_fn = skel_linux_setlease, .getlock_fn = skel_getlock, .symlink_fn = skel_symlink, + .symlinkat_fn = skel_symlinkat, .readlinkat_fn = skel_vfs_readlinkat, .linkat_fn = skel_linkat, .mknodat_fn = skel_mknodat, -- cgit v1.2.1