]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: VFS: vfs_glusterfs. Implement symlinkat().
authorJeremy Allison <jra@samba.org>
Fri, 30 Aug 2019 20:49:57 +0000 (13:49 -0700)
committerJeremy Allison <jra@samba.org>
Tue, 3 Sep 2019 21:15:42 +0000 (21:15 +0000)
Currently identical to symlink().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
source3/modules/vfs_glusterfs.c

index 38517b7af5a625718c8e8155c75110fa6f2bc106..3c0648ba28b5506db147ce58d04db713eb839200 100644 (file)
@@ -1673,6 +1673,23 @@ static int vfs_gluster_symlink(struct vfs_handle_struct *handle,
        return ret;
 }
 
+static int vfs_gluster_symlinkat(struct vfs_handle_struct *handle,
+                               const char *link_target,
+                               struct files_struct *dirfsp,
+                               const struct smb_filename *new_smb_fname)
+{
+       int ret;
+
+       START_PROFILE(syscall_symlinkat);
+       SMB_ASSERT(dirfsp == dirfsp->conn->cwd_fsp);
+       ret = glfs_symlink(handle->data,
+                       link_target,
+                       new_smb_fname->base_name);
+       END_PROFILE(syscall_symlinkat);
+
+       return ret;
+}
+
 static int vfs_gluster_readlinkat(struct vfs_handle_struct *handle,
                                files_struct *dirfsp,
                                const struct smb_filename *smb_fname,
@@ -1933,6 +1950,7 @@ static struct vfs_fn_pointers glusterfs_fns = {
        .linux_setlease_fn = vfs_gluster_linux_setlease,
        .getlock_fn = vfs_gluster_getlock,
        .symlink_fn = vfs_gluster_symlink,
+       .symlinkat_fn = vfs_gluster_symlinkat,
        .readlinkat_fn = vfs_gluster_readlinkat,
        .linkat_fn = vfs_gluster_linkat,
        .mknodat_fn = vfs_gluster_mknodat,