]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:gencache: make gencache.tdb none readable for others
authorRalph Wuerthner <ralph.wuerthner@de.ibm.com>
Wed, 26 Feb 2020 10:29:50 +0000 (11:29 +0100)
committerAnoop C S <anoopcs@samba.org>
Tue, 7 Apr 2026 15:09:38 +0000 (15:09 +0000)
Signed-off-by: Ralph Wuerthner <ralph.wuerthner@de.ibm.com>
Reviewed-by: Xavi Hernandez <xhernandez@redhat.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Anoop C S <anoopcs@samba.org>
source3/lib/gencache.c

index 07a08fa826815cec486d8a3e9fd5cf42bccfa373..dc92aa3908c0551c5e83a89708f49782af3f876d 100644 (file)
@@ -90,7 +90,7 @@ static bool gencache_init(void)
 
        cache = tdb_wrap_open(NULL, cache_fname, hash_size,
                              tdb_flags,
-                             open_flags, 0644);
+                             open_flags, 0640);
        /*
         * Allow client tools to create a gencache in the home directory
         * as a normal user.
@@ -139,7 +139,7 @@ static bool gencache_init(void)
                                      hash_size,
                                      tdb_flags,
                                      open_flags,
-                                     0644);
+                                     0640);
                if (cache != NULL) {
                        DBG_INFO("Opening user cache file %s.\n",
                                 cache_fname);