]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: VFS: vfs_syncops. Implement unlinkat().
authorJeremy Allison <jra@samba.org>
Thu, 12 Sep 2019 21:09:27 +0000 (14:09 -0700)
committerRalph Boehme <slow@samba.org>
Thu, 26 Sep 2019 17:20:47 +0000 (17:20 +0000)
This is identical to unlink(), as there
are no special cases needed for rmdir().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/modules/vfs_syncops.c

index 557f99bafe13e10a9913d86b46c0c77888703146..1382fdd05405d3efdaa8183364266defbd5089a0 100644 (file)
@@ -236,6 +236,19 @@ static int syncops_unlink(vfs_handle_struct *handle,
         SYNCOPS_NEXT_SMB_FNAME(UNLINK, smb_fname, (handle, smb_fname));
 }
 
+static int syncops_unlinkat(vfs_handle_struct *handle,
+                       files_struct *dirfsp,
+                       const struct smb_filename *smb_fname,
+                       int flags)
+{
+        SYNCOPS_NEXT_SMB_FNAME(UNLINKAT,
+                       smb_fname,
+                               (handle,
+                               dirfsp,
+                               smb_fname,
+                               flags));
+}
+
 static int syncops_mknodat(vfs_handle_struct *handle,
                        files_struct *dirfsp,
                        const struct smb_filename *smb_fname,
@@ -328,6 +341,7 @@ static struct vfs_fn_pointers vfs_syncops_fns = {
        .open_fn = syncops_open,
        .renameat_fn = syncops_renameat,
        .unlink_fn = syncops_unlink,
+       .unlinkat_fn = syncops_unlinkat,
        .symlinkat_fn = syncops_symlinkat,
        .linkat_fn = syncops_linkat,
        .mknodat_fn = syncops_mknodat,