From: Ralph Boehme Date: Wed, 20 May 2020 20:22:26 +0000 (+0200) Subject: vfs_syncops: implement SMB_VFS_OPENAT() X-Git-Tag: ldb-2.2.0~378 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6939beacb0617448a8798a3516dcb899dfcff256;p=thirdparty%2Fsamba.git vfs_syncops: implement SMB_VFS_OPENAT() Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison --- diff --git a/source3/modules/vfs_syncops.c b/source3/modules/vfs_syncops.c index 2c4c386e23f..92ebd14a945 100644 --- a/source3/modules/vfs_syncops.c +++ b/source3/modules/vfs_syncops.c @@ -230,6 +230,17 @@ static int syncops_open(vfs_handle_struct *handle, (handle, smb_fname, fsp, flags, mode)); } +static int syncops_openat(struct vfs_handle_struct *handle, + const struct files_struct *dirfsp, + const struct smb_filename *smb_fname, + struct files_struct *fsp, + int flags, + mode_t mode) +{ + SYNCOPS_NEXT_SMB_FNAME(OPENAT, (flags & O_CREAT ? smb_fname : NULL), + (handle, dirfsp, smb_fname, fsp, flags, mode)); +} + static int syncops_unlinkat(vfs_handle_struct *handle, files_struct *dirfsp, const struct smb_filename *smb_fname, @@ -326,6 +337,7 @@ static struct vfs_fn_pointers vfs_syncops_fns = { .connect_fn = syncops_connect, .mkdirat_fn = syncops_mkdirat, .open_fn = syncops_open, + .openat_fn = syncops_openat, .renameat_fn = syncops_renameat, .unlinkat_fn = syncops_unlinkat, .symlinkat_fn = syncops_symlinkat,