summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2019-08-22 13:42:26 -0700
committerJeremy Allison <jra@samba.org>2019-08-23 18:49:35 +0000
commit515c062b9e67a9f7016bcce3a02b75ab6d61385d (patch)
tree3aefb79f5867e648a528e8b4f57d3939c41494de /examples
parentd8863dd8cb74bb0534457ca930a71e77c367d994 (diff)
downloadsamba-515c062b9e67a9f7016bcce3a02b75ab6d61385d.tar.gz
s3: VFS: Add SMB_VFS_READLINKAT().
Currently identical to SMB_VFS_READLINK(). Next, add to all VFS modules that implement readlink and eventually remove readlink. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org>
Diffstat (limited to 'examples')
-rw-r--r--examples/VFS/skel_opaque.c11
-rw-r--r--examples/VFS/skel_transparent.c14
2 files changed, 25 insertions, 0 deletions
diff --git a/examples/VFS/skel_opaque.c b/examples/VFS/skel_opaque.c
index 48d8e3df7f6..603ddd46446 100644
--- a/examples/VFS/skel_opaque.c
+++ b/examples/VFS/skel_opaque.c
@@ -473,6 +473,16 @@ static int skel_vfs_readlink(vfs_handle_struct *handle,
return -1;
}
+static int skel_vfs_readlinkat(vfs_handle_struct *handle,
+ files_struct *dirfsp,
+ const struct smb_filename *smb_fname,
+ char *buf,
+ size_t bufsiz)
+{
+ errno = ENOSYS;
+ return -1;
+}
+
static int skel_linkat(vfs_handle_struct *handle,
files_struct *srcfsp,
const struct smb_filename *old_smb_fname,
@@ -1090,6 +1100,7 @@ static struct vfs_fn_pointers skel_opaque_fns = {
.getlock_fn = skel_getlock,
.symlink_fn = skel_symlink,
.readlink_fn = skel_vfs_readlink,
+ .readlinkat_fn = skel_vfs_readlinkat,
.linkat_fn = skel_linkat,
.mknodat_fn = skel_mknodat,
.realpath_fn = skel_realpath,
diff --git a/examples/VFS/skel_transparent.c b/examples/VFS/skel_transparent.c
index ab43118ce37..cb240791b66 100644
--- a/examples/VFS/skel_transparent.c
+++ b/examples/VFS/skel_transparent.c
@@ -571,6 +571,19 @@ static int skel_vfs_readlink(vfs_handle_struct *handle,
return SMB_VFS_NEXT_READLINK(handle, smb_fname, buf, bufsiz);
}
+static int skel_vfs_readlinkat(vfs_handle_struct *handle,
+ files_struct *dirfsp,
+ const struct smb_filename *smb_fname,
+ char *buf,
+ size_t bufsiz)
+{
+ return SMB_VFS_NEXT_READLINKAT(handle,
+ dirfsp,
+ smb_fname,
+ buf,
+ bufsiz);
+}
+
static int skel_linkat(vfs_handle_struct *handle,
files_struct *srcfsp,
const struct smb_filename *old_smb_fname,
@@ -1365,6 +1378,7 @@ static struct vfs_fn_pointers skel_transparent_fns = {
.getlock_fn = skel_getlock,
.symlink_fn = skel_symlink,
.readlink_fn = skel_vfs_readlink,
+ .readlinkat_fn = skel_vfs_readlinkat,
.linkat_fn = skel_linkat,
.mknodat_fn = skel_mknodat,
.realpath_fn = skel_realpath,