From: Jeremy Allison Date: Thu, 21 May 2020 18:56:14 +0000 (-0700) Subject: s3: VFS: fruit. Now we've gotten rid of SMB_VFS_OPEN(), add const to the functions... X-Git-Tag: ldb-2.2.0~373 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a912c1d87d64badd0e7e3aa44e90b6ff6bda46bd;p=thirdparty%2Fsamba.git s3: VFS: fruit. Now we've gotten rid of SMB_VFS_OPEN(), add const to the functions called by fruit_openat(). Remove the hack that allowed openat() to call non-const functions. Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- diff --git a/source3/modules/vfs_fruit.c b/source3/modules/vfs_fruit.c index a0f41ec65b4..099bf02d771 100644 --- a/source3/modules/vfs_fruit.c +++ b/source3/modules/vfs_fruit.c @@ -1335,7 +1335,7 @@ static int fruit_fake_fd(void) static int fruit_open_meta_stream(vfs_handle_struct *handle, const struct files_struct *dirfsp, - struct smb_filename *smb_fname, + const struct smb_filename *smb_fname, files_struct *fsp, int flags, mode_t mode) @@ -1384,7 +1384,7 @@ static int fruit_open_meta_stream(vfs_handle_struct *handle, static int fruit_open_meta_netatalk(vfs_handle_struct *handle, const struct files_struct *dirfsp, - struct smb_filename *smb_fname, + const struct smb_filename *smb_fname, files_struct *fsp, int flags, mode_t mode) @@ -1429,7 +1429,7 @@ static int fruit_open_meta_netatalk(vfs_handle_struct *handle, static int fruit_open_meta(vfs_handle_struct *handle, const struct files_struct *dirfsp, - struct smb_filename *smb_fname, + const struct smb_filename *smb_fname, files_struct *fsp, int flags, mode_t mode) { int fd; @@ -1463,7 +1463,7 @@ static int fruit_open_meta(vfs_handle_struct *handle, static int fruit_open_rsrc_adouble(vfs_handle_struct *handle, const struct files_struct *dirfsp, - struct smb_filename *smb_fname, + const struct smb_filename *smb_fname, files_struct *fsp, int flags, mode_t mode) @@ -1547,7 +1547,7 @@ exit: static int fruit_open_rsrc_xattr(vfs_handle_struct *handle, const struct files_struct *dirfsp, - struct smb_filename *smb_fname, + const struct smb_filename *smb_fname, files_struct *fsp, int flags, mode_t mode) @@ -1578,7 +1578,7 @@ static int fruit_open_rsrc_xattr(vfs_handle_struct *handle, static int fruit_open_rsrc(vfs_handle_struct *handle, const struct files_struct *dirfsp, - struct smb_filename *smb_fname, + const struct smb_filename *smb_fname, files_struct *fsp, int flags, mode_t mode) { int fd; @@ -1683,20 +1683,12 @@ static int fruit_open(vfs_handle_struct *handle, static int fruit_openat(vfs_handle_struct *handle, const struct files_struct *dirfsp, - const struct smb_filename *smb_fname_in, + const struct smb_filename *smb_fname, files_struct *fsp, int flags, mode_t mode) { int fd; - /* FIXME - leaks on talloc_tos(). Fix when SMB_VFS_OPEN() is gone. */ - struct smb_filename *smb_fname = cp_smb_filename(talloc_tos(), - smb_fname_in); - - if (smb_fname == NULL) { - return -1; - } - /* END FIXME. */ DBG_DEBUG("Path [%s]\n", smb_fname_str_dbg(smb_fname));