]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: VFS: fake_acls: In fake_acls_stat() - Now we always have a valid fsp, remove...
authorJeremy Allison <jra@samba.org>
Wed, 23 Jun 2021 17:48:49 +0000 (10:48 -0700)
committerRalph Boehme <slow@samba.org>
Fri, 25 Jun 2021 15:53:31 +0000 (15:53 +0000)
Comment out fake_acls_uid()/fake_acls_gid(), they are no longer used.

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

index 5dd3cddccb795b311ef58eccf078b6ec21c937d7..ffbb5f7dc1d654b6eafff2375d3ec8171a6d34fb 100644 (file)
@@ -35,6 +35,7 @@
 #define FAKE_ACL_ACCESS_XATTR "system.fake_access_acl"
 #define FAKE_ACL_DEFAULT_XATTR "system.fake_default_acl"
 
+#if 0
 static int fake_acls_uid(vfs_handle_struct *handle,
                         struct smb_filename *smb_fname,
                         uid_t *uid)
@@ -71,6 +72,7 @@ static int fake_acls_gid(vfs_handle_struct *handle,
        *gid = IVAL(gid_buf, 0);
        return 0;
 }
+#endif
 
 static int fake_acls_fuid(vfs_handle_struct *handle,
                           files_struct *fsp,
@@ -185,26 +187,16 @@ static int fake_acls_stat(vfs_handle_struct *handle,
                        fsp = smb_fname_cp->fsp;
                }
 
-               if (fsp != NULL) {
-                       ret = fake_acls_fuid(handle,
-                                            fsp,
-                                            &smb_fname->st.st_ex_uid);
-               } else {
-                       ret = fake_acls_uid(handle, smb_fname_cp,
-                                       &smb_fname->st.st_ex_uid);
-               }
+               ret = fake_acls_fuid(handle,
+                                    fsp,
+                                    &smb_fname->st.st_ex_uid);
                if (ret != 0) {
                        TALLOC_FREE(smb_fname_cp);
                        return ret;
                }
-               if (fsp != NULL) {
-                       ret = fake_acls_fgid(handle,
-                                            fsp,
-                                            &smb_fname->st.st_ex_gid);
-               } else {
-                       ret = fake_acls_gid(handle, smb_fname_cp,
-                                       &smb_fname->st.st_ex_gid);
-               }
+               ret = fake_acls_fgid(handle,
+                                    fsp,
+                                    &smb_fname->st.st_ex_gid);
                if (ret != 0) {
                        TALLOC_FREE(smb_fname_cp);
                        return ret;