| /dovecot/src/lib/ |
| H A D | safe-mkdir.c | 10 int safe_mkdir(const char *dir, mode_t mode, uid_t uid, gid_t gid) argument 19 if (mkdir(dir, mode) < 0) { 41 can mess up with the file mode. */ 49 if ((st.st_mode & 07777) != mode) { 50 if (fchmod(fd, mode) < 0) 65 if ((st.st_mode & 07777) != mode) { 66 i_fatal("safe_mkdir() failed: %s (%o) is still not mode %o", 67 dir, (int)st.st_mode, (int)mode);
|
| H A D | unix-socket-create.c | 10 int unix_socket_create(const char *path, int mode, argument 16 old_umask = umask(0777 ^ mode);
|
| H A D | file-create-locked.h | 12 int mode; member in struct:file_create_settings 19 /* If parent directory doesn't exist, mkdir() it with this mode.
|
| H A D | safe-mkstemp.c | 16 safe_mkstemp_full(string_t *prefix, mode_t mode, uid_t uid, gid_t gid, argument 40 old_umask = umask(0666 ^ mode); 74 int safe_mkstemp(string_t *prefix, mode_t mode, uid_t uid, gid_t gid) argument 76 return safe_mkstemp_full(prefix, mode, uid, gid, NULL); 79 int safe_mkstemp_group(string_t *prefix, mode_t mode, argument 82 return safe_mkstemp_full(prefix, mode, (uid_t)-1, gid, gid_origin); 85 int safe_mkstemp_hostpid(string_t *prefix, mode_t mode, uid_t uid, gid_t gid) argument 91 if ((fd = safe_mkstemp(prefix, mode, uid, gid)) == -1) 96 int safe_mkstemp_hostpid_group(string_t *prefix, mode_t mode, argument 103 if ((fd = safe_mkstemp_group(prefix, mode, gi [all...] |
| H A D | file-create-locked.c | 82 int mode = set->mode != 0 ? set->mode : 0600; local 89 fd = safe_mkstemp(temp_path, mode, uid, gid); 91 fd = safe_mkstemp_group(temp_path, mode, gid, set->gid_origin);
|
| H A D | mkdir-parents.c | 14 mkdir_chown_full(const char *path, mode_t mode, uid_t uid, argument 24 ret = mkdir(path, mode); 84 if (gid != (gid_t)-1 && (mode & S_ISGID) == 0) { 87 if (fchmod(fd, mode) < 0) { 101 int mkdir_chown(const char *path, mode_t mode, uid_t uid, gid_t gid) argument 103 return mkdir_chown_full(path, mode, uid, gid, NULL); 106 int mkdir_chgrp(const char *path, mode_t mode, argument 109 return mkdir_chown_full(path, mode, (uid_t)-1, gid, gid_origin); 113 mkdir_parents_chown_full(const char *path, mode_t mode, uid_t uid, gid_t gid, argument 119 if (mkdir_chown_full(path, mode, ui 143 mkdir_parents_chown(const char *path, mode_t mode, uid_t uid, gid_t gid) argument 148 mkdir_parents_chgrp(const char *path, mode_t mode, gid_t gid, const char *gid_origin) argument 154 mkdir_parents(const char *path, mode_t mode) argument [all...] |
| H A D | pkcs5.c | 84 int pkcs5_pbkdf(enum pkcs5_pbkdf_mode mode, const struct hash_method *hash, argument 90 if (mode == PKCS5_PBKDF1) 93 else if (mode == PKCS5_PBKDF2)
|
| H A D | eacces-error.c | 29 static void write_eacces_error(string_t *errmsg, const char *path, int mode) argument 33 switch (mode) { 56 int mode; local 65 mode = 04; 68 mode = 02; 71 mode = 01; 82 if ((((st.st_mode & 0070) >> 3) & mode) != 0) 87 if ((st.st_mode & mode) != 0) 256 str_printfa(errmsg, ", dir owned by %s:%s mode=0%o",
|
| H A D | file-dotlock.c | 792 mode_t mode, uid_t uid, gid_t gid, 799 old_mask = umask(0666 ^ mode); 824 mode_t mode, uid_t uid, gid_t gid, 827 return file_dotlock_open_mode_full(set, path, flags, mode, uid, gid, 833 mode_t mode, gid_t gid, const char *gid_origin, 836 return file_dotlock_open_mode_full(set, path, flags, mode, (uid_t)-1, 790 file_dotlock_open_mode_full(const struct dotlock_settings *set, const char *path, enum dotlock_create_flags flags, mode_t mode, uid_t uid, gid_t gid, const char *gid_origin, struct dotlock **dotlock_r) argument 822 file_dotlock_open_mode(const struct dotlock_settings *set, const char *path, enum dotlock_create_flags flags, mode_t mode, uid_t uid, gid_t gid, struct dotlock **dotlock_r) argument 831 file_dotlock_open_group(const struct dotlock_settings *set, const char *path, enum dotlock_create_flags flags, mode_t mode, gid_t gid, const char *gid_origin, struct dotlock **dotlock_r) argument
|
| /dovecot/src/plugins/apparmor/ |
| H A D | apparmor-plugin.c | 35 char *con, *mode; local 39 if (aa_getcon(&con, &mode) < 0) { 42 i_debug("apparmor: Current context=%s, mode=%s", 43 con, mode);
|
| /dovecot/src/lib-fs/ |
| H A D | fs-test.h | 14 enum fs_open_mode mode; member in struct:test_fs_file
|
| H A D | fs-sis-queue.c | 78 enum fs_open_mode mode, enum fs_open_flags flags) 86 if (mode == FS_OPEN_MODE_APPEND) 87 fs_set_error(_file->fs, "APPEND mode not supported"); 89 file->file.parent = fs_file_init_parent(_file, path, mode | flags); 77 fs_sis_queue_file_init(struct fs_file *_file, const char *path, enum fs_open_mode mode, enum fs_open_flags flags) argument
|
| H A D | fs-dict.c | 109 enum fs_open_mode mode, enum fs_open_flags flags ATTR_UNUSED) 115 i_assert(mode != FS_OPEN_MODE_APPEND); /* not supported */ 116 i_assert(mode != FS_OPEN_MODE_CREATE); /* not supported */ 118 if (mode != FS_OPEN_MODE_CREATE_UNIQUE_128) 108 fs_dict_file_init(struct fs_file *_file, const char *path, enum fs_open_mode mode, enum fs_open_flags flags ATTR_UNUSED) argument
|
| H A D | fs-sis.c | 88 enum fs_open_mode mode, enum fs_open_flags flags) 96 file->open_mode = mode; 97 if (mode == FS_OPEN_MODE_APPEND) { 98 fs_set_error(_file->fs, "APPEND mode not supported"); 122 file->file.parent = fs_file_init_parent(_file, path, mode | flags); 87 fs_sis_file_init(struct fs_file *_file, const char *path, enum fs_open_mode mode, enum fs_open_flags flags) argument
|
| H A D | fs-test.c | 49 enum fs_open_mode mode, enum fs_open_flags flags) 55 file->mode = mode; 48 fs_test_file_init(struct fs_file *_file, const char *path, enum fs_open_mode mode, enum fs_open_flags flags) argument
|
| H A D | fs-metawrap.c | 107 enum fs_open_mode mode, enum fs_open_flags flags) 114 file->open_mode = mode; 119 file->file.parent = fs_file_init_parent(_file, path, mode | flags); 120 if (file->fs->wrap_metadata && mode == FS_OPEN_MODE_READONLY && 125 mode | flags | FS_OPEN_FLAG_ASYNC); 106 fs_metawrap_file_init(struct fs_file *_file, const char *path, enum fs_open_mode mode, enum fs_open_flags flags) argument
|
| H A D | fs-posix.c | 36 mode_t mode; member in struct:posix_fs 90 fs->mode = FS_DEFAULT_MODE; 103 } else if (strcmp(arg, "mode=auto") == 0) { 109 } else if (strncmp(arg, "mode=", 5) == 0) { 110 unsigned int mode; local 111 if (str_to_uint_oct(arg+5, &mode) < 0) { 112 fs_set_error(_fs, "Invalid mode value: %s", arg+5); 115 fs->mode = mode & 0666; 116 if (fs->mode 186 mode_t mode, dir_mode; local 246 mode_t mode; local 316 fs_posix_file_init(struct fs_file *_file, const char *path, enum fs_open_mode mode, enum fs_open_flags flags) argument [all...] |
| /dovecot/src/lib-index/ |
| H A D | mailbox-log.c | 28 mode_t mode; member in struct:mailbox_log 54 log->mode = 0644; 78 void mailbox_log_set_permissions(struct mailbox_log *log, mode_t mode, argument 81 log->mode = mode; 99 old_mode = umask(0666 ^ log->mode);
|
| /dovecot/src/lib-master/ |
| H A D | service-settings.h | 25 unsigned int mode; member in struct:file_listener_settings
|
| /dovecot/src/plugins/fs-compress/ |
| H A D | fs-compress.c | 117 enum fs_open_mode mode, enum fs_open_flags flags) 124 file->open_mode = mode; 129 file->file.parent = fs_file_init_parent(_file, path, mode | flags); 130 if (mode == FS_OPEN_MODE_READONLY && 135 mode | flags | FS_OPEN_FLAG_ASYNC); 116 fs_compress_file_init(struct fs_file *_file, const char *path, enum fs_open_mode mode, enum fs_open_flags flags) argument
|
| /dovecot/src/plugins/mail-crypt/ |
| H A D | fs-crypt-common.c | 143 enum fs_open_mode mode, enum fs_open_flags flags) 150 file->open_mode = mode; 155 file->file.parent = fs_file_init_parent(_file, path, mode | flags); 156 if (mode == FS_OPEN_MODE_READONLY && 161 mode | flags | FS_OPEN_FLAG_ASYNC); 142 fs_crypt_file_init(struct fs_file *_file, const char *path, enum fs_open_mode mode, enum fs_open_flags flags) argument
|
| /dovecot/src/master/ |
| H A D | master-settings.c | 33 DEF(SET_UINT_OCT, mode), 42 .mode = 0600, 309 if (set->mode != 0) 744 mode_t mode; local 753 mode = login_want_core_dumps(set, &gid) ? 0770 : 0750; 754 if (safe_mkdir(login_dir, mode, master_uid, gid) == 0) {
|
| /dovecot/src/config/ |
| H A D | old-set-parser.c | 17 const char *path, *mode, *user, *group; member in struct:socket_set 605 else if (strcmp(key, "mode") == 0) 606 p = &ctx->old->socket_set.mode; 696 if (set->mode != NULL) { 697 config_apply_line(ctx, "mode", 698 t_strdup_printf("%s/mode=%s", prefix, set->mode), NULL);
|
| /dovecot/src/lib-dcrypt/ |
| H A D | dcrypt-gnutls.c | 28 enum dcrypt_sym_mode mode; member in struct:dcrypt_context_symmetric 61 int dcrypt_gnutls_ctx_sym_create(const char *algorithm, enum dcrypt_sym_mode mode, struct dcrypt_context_symmetric **ctx_r, const char **error_r) argument 69 ctx->mode = mode;
|
| /dovecot/src/lib-dict/ |
| H A D | dict-file.c | 436 mode_t mode = 0700; local 452 mode = st.st_mode; 455 if (mkdir_parents(path, mode) < 0 && errno != EEXIST) {
|