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 /examples | |
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 'examples')
-rw-r--r-- | examples/VFS/skel_opaque.c | 10 | ||||
-rw-r--r-- | examples/VFS/skel_transparent.c | 12 |
2 files changed, 22 insertions, 0 deletions
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, |