]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
dbox: Don't set +x bit for created files.
authorTimo Sirainen <tss@iki.fi>
Sun, 6 Sep 2009 23:01:13 +0000 (19:01 -0400)
committerTimo Sirainen <tss@iki.fi>
Sun, 6 Sep 2009 23:01:13 +0000 (19:01 -0400)
--HG--
branch : HEAD

src/lib-storage/index/dbox/dbox-file.c
src/lib-storage/index/dbox/dbox-map.c
src/lib-storage/index/dbox/dbox-storage.c
src/lib-storage/index/dbox/dbox-storage.h

index 5d83df990012b75c59da3df73df4494d6a7ed7af..cffae95b802b8c86b50ff4089839d297068590b4 100644 (file)
@@ -440,8 +440,8 @@ int dbox_create_fd(struct dbox_storage *storage, const char *path)
        mode_t old_mask;
        int fd;
 
-       old_mask = umask(0666 & ~storage->create_mode);
-       fd = open(path, O_RDWR | O_CREAT | O_TRUNC, 0777);
+       old_mask = umask(0666 & ~storage->dir_create_mode);
+       fd = open(path, O_RDWR | O_CREAT | O_TRUNC, 0666);
        umask(old_mask);
        if (fd == -1) {
                mail_storage_set_critical(&storage->storage,
index 57edb5f1141540aafdeb41596ddcb12381dded8f..67cf541a52953ee7f393af316c28e31d3ba975b3 100644 (file)
@@ -69,7 +69,7 @@ void dbox_map_deinit(struct dbox_map **_map)
 
 static int dbox_map_mkdir_storage(struct dbox_storage *storage)
 {
-       if (mkdir_parents_chgrp(storage->storage_dir, storage->create_mode,
+       if (mkdir_parents_chgrp(storage->storage_dir, storage->dir_create_mode,
                                storage->create_gid,
                                storage->create_gid_origin) < 0 &&
            errno != EEXIST) {
index 3733917d5e3de1f5599221911694f4f56246a9c7..55b9b483e4706a45b8edaf9b04c8bcad0cff71bb 100644 (file)
@@ -80,7 +80,8 @@ dbox_storage_create(struct mail_storage *_storage, struct mail_namespace *ns,
                     I_MIN(storage->set->dbox_max_open_files, 128));
 
        storage->map = dbox_map_init(storage);
-       mailbox_list_get_dir_permissions(ns->list, NULL, &storage->create_mode,
+       mailbox_list_get_dir_permissions(ns->list, NULL,
+                                        &storage->dir_create_mode,
                                         &storage->create_gid, &origin);
        storage->create_gid_origin = p_strdup(_storage->pool, origin);
        return 0;
index 33665c1d83e6472d2473dc9be04820e3e00bc0ed..fc2e2a87b2118bcef73aa629fc58bb7a795ec9ee 100644 (file)
@@ -49,7 +49,7 @@ struct dbox_storage {
        struct dbox_map *map;
 
        /* mode/gid to use for new dbox storage files */
-       mode_t create_mode;
+       mode_t dir_create_mode;
        gid_t create_gid;
        const char *create_gid_origin;