s3: VFS: Complete the removal of SMB_VFS_CHOWN()
authorJeremy Allison <jra@samba.org>
Thu, 10 Oct 2019 21:35:37 +0000 (14:35 -0700)
committerJeremy Allison <jra@samba.org>
Tue, 15 Oct 2019 20:07:51 +0000 (20:07 +0000)
No longer used anywhere.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Oct 15 20:07:51 UTC 2019 on sn-devel-184

examples/VFS/skel_opaque.c
examples/VFS/skel_transparent.c
source3/include/smbprofile.h
source3/include/vfs.h
source3/include/vfs_macros.h
source3/modules/vfs_default.c
source3/modules/vfs_not_implemented.c
source3/smbd/vfs.c

index 497ec90760e7437fee7402871bfa8482038f9fa4..4f0622bccc645f1509fcbc87659820b2aa9ce4d8 100644 (file)
@@ -361,15 +361,6 @@ static int skel_fchmod(vfs_handle_struct *handle, files_struct *fsp,
        return -1;
 }
 
-static int skel_chown(vfs_handle_struct *handle,
-                       const struct smb_filename *smb_fname,
-                       uid_t uid,
-                       gid_t gid)
-{
-       errno = ENOSYS;
-       return -1;
-}
-
 static int skel_fchown(vfs_handle_struct *handle, files_struct *fsp,
                       uid_t uid, gid_t gid)
 {
@@ -1080,7 +1071,6 @@ static struct vfs_fn_pointers skel_opaque_fns = {
        .unlinkat_fn = skel_unlinkat,
        .chmod_fn = skel_chmod,
        .fchmod_fn = skel_fchmod,
-       .chown_fn = skel_chown,
        .fchown_fn = skel_fchown,
        .lchown_fn = skel_lchown,
        .chdir_fn = skel_chdir,
index c827701756523c87f3d039e7de1a7b9e90002781..fd19e433ba3752d7efb412ef6601cbb1f974f1f2 100644 (file)
@@ -480,14 +480,6 @@ static int skel_fchmod(vfs_handle_struct *handle, files_struct *fsp,
        return SMB_VFS_NEXT_FCHMOD(handle, fsp, mode);
 }
 
-static int skel_chown(vfs_handle_struct *handle,
-                       const struct smb_filename *smb_fname,
-                       uid_t uid,
-                       gid_t gid)
-{
-       return SMB_VFS_NEXT_CHOWN(handle, smb_fname, uid, gid);
-}
-
 static int skel_fchown(vfs_handle_struct *handle, files_struct *fsp,
                       uid_t uid, gid_t gid)
 {
@@ -1377,7 +1369,6 @@ static struct vfs_fn_pointers skel_transparent_fns = {
        .unlinkat_fn = skel_unlinkat,
        .chmod_fn = skel_chmod,
        .fchmod_fn = skel_fchmod,
-       .chown_fn = skel_chown,
        .fchown_fn = skel_fchown,
        .lchown_fn = skel_lchown,
        .chdir_fn = skel_chdir,
index 41621c4e862ef98e80eaf9b19c4c9f07f870c3c6..a003a1d9df090f12762eef190e2534d4da73c480 100644 (file)
@@ -69,7 +69,6 @@ struct tevent_context;
        SMBPROFILE_STATS_BASIC(syscall_unlinkat) \
        SMBPROFILE_STATS_BASIC(syscall_chmod) \
        SMBPROFILE_STATS_BASIC(syscall_fchmod) \
-       SMBPROFILE_STATS_BASIC(syscall_chown) \
        SMBPROFILE_STATS_BASIC(syscall_fchown) \
        SMBPROFILE_STATS_BASIC(syscall_lchown) \
        SMBPROFILE_STATS_BASIC(syscall_chdir) \
index 5ea4f8058174500bf7860b96d4d1a30bb192f3b8..802eb8d02923af7099b8aeb78478ff849accbed6 100644 (file)
 /* Version 42 - Add SMB_VFS_FCNTL */
 /* Version 42 - Remove SMB_VFS_RMDIR.
                Use SMB_VFS_UNLINKAT(.., AT_REMOVEDIR) instead. */
+/* Version 42 - Remove SMB_VFS_CHOWN */
 
 #define SMB_VFS_INTERFACE_VERSION 42
 
@@ -786,10 +787,6 @@ struct vfs_fn_pointers {
                        const struct smb_filename *smb_fname,
                        mode_t mode);
        int (*fchmod_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp, mode_t mode);
-       int (*chown_fn)(struct vfs_handle_struct *handle,
-                       const struct smb_filename *smb_fname,
-                       uid_t uid,
-                       gid_t gid);
        int (*fchown_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp, uid_t uid, gid_t gid);
        int (*lchown_fn)(struct vfs_handle_struct *handle,
                        const struct smb_filename *smb_fname,
@@ -1316,10 +1313,6 @@ int smb_vfs_call_chmod(struct vfs_handle_struct *handle,
                        mode_t mode);
 int smb_vfs_call_fchmod(struct vfs_handle_struct *handle,
                        struct files_struct *fsp, mode_t mode);
-int smb_vfs_call_chown(struct vfs_handle_struct *handle,
-                       const struct smb_filename *smb_fname,
-                       uid_t uid,
-                       gid_t gid);
 int smb_vfs_call_fchown(struct vfs_handle_struct *handle,
                        struct files_struct *fsp, uid_t uid, gid_t gid);
 int smb_vfs_call_lchown(struct vfs_handle_struct *handle,
@@ -1755,10 +1748,6 @@ int vfs_not_implemented_chmod(vfs_handle_struct *handle,
                              mode_t mode);
 int vfs_not_implemented_fchmod(vfs_handle_struct *handle, files_struct *fsp,
                               mode_t mode);
-int vfs_not_implemented_chown(vfs_handle_struct *handle,
-                             const struct smb_filename *smb_fname,
-                             uid_t uid,
-                             gid_t gid);
 int vfs_not_implemented_fchown(vfs_handle_struct *handle, files_struct *fsp,
                               uid_t uid, gid_t gid);
 int vfs_not_implemented_lchown(vfs_handle_struct *handle,
index 95cf4cf3088f14619f05ccaabfac63850a132713..6a7cbf2275d7827a4b3043b9527d7f20873ed0cd 100644 (file)
 #define SMB_VFS_NEXT_FCHMOD(handle, fsp, mode) \
        smb_vfs_call_fchmod((handle)->next, (fsp), (mode))
 
-#define SMB_VFS_CHOWN(conn, smb_fname, uid, gid) \
-       smb_vfs_call_chown((conn)->vfs_handles, (smb_fname), (uid), (gid))
-#define SMB_VFS_NEXT_CHOWN(handle, smb_fname, uid, gid) \
-       smb_vfs_call_chown((handle)->next, (smb_fname), (uid), (gid))
-
 #define SMB_VFS_FCHOWN(fsp, uid, gid) \
        smb_vfs_call_fchown((fsp)->conn->vfs_handles, (fsp), (uid), (gid))
 #define SMB_VFS_NEXT_FCHOWN(handle, fsp, uid, gid) \
index 13d849c5084d7dd68b052def9ce887f07f36ec40..421772da3774b9edcec7682020d0a8f8f9b88d63 100644 (file)
@@ -2245,19 +2245,6 @@ static int vfswrap_fchmod(vfs_handle_struct *handle, files_struct *fsp, mode_t m
        return result;
 }
 
-static int vfswrap_chown(vfs_handle_struct *handle,
-                       const struct smb_filename *smb_fname,
-                       uid_t uid,
-                       gid_t gid)
-{
-       int result;
-
-       START_PROFILE(syscall_chown);
-       result = chown(smb_fname->base_name, uid, gid);
-       END_PROFILE(syscall_chown);
-       return result;
-}
-
 static int vfswrap_fchown(vfs_handle_struct *handle, files_struct *fsp, uid_t uid, gid_t gid)
 {
 #ifdef HAVE_FCHOWN
@@ -3529,7 +3516,6 @@ static struct vfs_fn_pointers vfs_default_fns = {
        .unlinkat_fn = vfswrap_unlinkat,
        .chmod_fn = vfswrap_chmod,
        .fchmod_fn = vfswrap_fchmod,
-       .chown_fn = vfswrap_chown,
        .fchown_fn = vfswrap_fchown,
        .lchown_fn = vfswrap_lchown,
        .chdir_fn = vfswrap_chdir,
index 083ebc9e1f183901dd07a412852945cd8d6a6799..b68b9e2e8b912d8677e590b1964d3410f6804b96 100644 (file)
@@ -359,15 +359,6 @@ int vfs_not_implemented_fchmod(vfs_handle_struct *handle, files_struct *fsp,
        return -1;
 }
 
-int vfs_not_implemented_chown(vfs_handle_struct *handle,
-                             const struct smb_filename *smb_fname,
-                             uid_t uid,
-                             gid_t gid)
-{
-       errno = ENOSYS;
-       return -1;
-}
-
 int vfs_not_implemented_fchown(vfs_handle_struct *handle, files_struct *fsp,
                               uid_t uid, gid_t gid)
 {
@@ -1085,7 +1076,6 @@ static struct vfs_fn_pointers vfs_not_implemented_fns = {
        .unlinkat_fn = vfs_not_implemented_unlinkat,
        .chmod_fn = vfs_not_implemented_chmod,
        .fchmod_fn = vfs_not_implemented_fchmod,
-       .chown_fn = vfs_not_implemented_chown,
        .fchown_fn = vfs_not_implemented_fchown,
        .lchown_fn = vfs_not_implemented_lchown,
        .chdir_fn = vfs_not_implemented_chdir,
index 588580314e82ff860bca498e4d59909eabaeb127..a104921784f1685cb76d82dad00c574149e8db27 100644 (file)
@@ -2025,15 +2025,6 @@ int smb_vfs_call_fchmod(struct vfs_handle_struct *handle,
        return handle->fns->fchmod_fn(handle, fsp, mode);
 }
 
-int smb_vfs_call_chown(struct vfs_handle_struct *handle,
-                       const struct smb_filename *smb_fname,
-                       uid_t uid,
-                       gid_t gid)
-{
-       VFS_FIND(chown);
-       return handle->fns->chown_fn(handle, smb_fname, uid, gid);
-}
-
 int smb_vfs_call_fchown(struct vfs_handle_struct *handle,
                        struct files_struct *fsp, uid_t uid, gid_t gid)
 {