]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: Don't set security_descriptor_hash_v4->time
authorVolker Lendecke <vl@samba.org>
Tue, 20 Jun 2023 07:56:22 +0000 (09:56 +0200)
committerVolker Lendecke <vl@samba.org>
Wed, 21 Jun 2023 07:11:56 +0000 (07:11 +0000)
This prevents de-duplication of xattrs in the backend file system
where otherwise ACLs are often very similar.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Wed Jun 21 07:11:56 UTC 2023 on atb-devel-224

librpc/idl/xattr.idl
source3/modules/vfs_acl_common.c

index 82d4ec5a4736ab486c8446f2cd4ac287567083eb..d1cf913e9d888fe29494d4208179c309502ea53c 100644 (file)
@@ -204,6 +204,11 @@ interface xattr
                                         * this hash (to allow
                                         * forensics later, if we have
                                         * a bug in one codepath */
+               /*
+                * "time" is always set to 0. Left here to avoid
+                * bumping the union versions. Remove in case a v5 is
+                * necessary.
+                */
                NTTIME time;
                uint8 sys_acl_hash[64]; /* 64 bytes hash. */
        } security_descriptor_hash_v4;
index fd54d7b2dd68f89410d3f7cd57adac2a75013332..7a35a946f519d848f4c7d3674888932882ae6a52 100644 (file)
@@ -259,9 +259,6 @@ static NTSTATUS create_sys_acl_blob(const struct security_descriptor *psd,
        struct security_descriptor_hash_v4 sd_hs4;
        enum ndr_err_code ndr_err;
        TALLOC_CTX *ctx = talloc_tos();
-       NTTIME nttime_now;
-       struct timeval now = timeval_current();
-       nttime_now = timeval_to_nttime(&now);
 
        ZERO_STRUCT(xacl);
        ZERO_STRUCT(sd_hs4);
@@ -272,7 +269,6 @@ static NTSTATUS create_sys_acl_blob(const struct security_descriptor *psd,
        xacl.info.sd_hs4->hash_type = hash_type;
        memcpy(&xacl.info.sd_hs4->hash[0], hash, XATTR_SD_HASH_SIZE);
        xacl.info.sd_hs4->description = description;
-       xacl.info.sd_hs4->time = nttime_now;
        memcpy(&xacl.info.sd_hs4->sys_acl_hash[0], sys_acl_hash, XATTR_SD_HASH_SIZE);
 
        ndr_err = ndr_push_struct_blob(