/dovecot/src/auth/ |
H A D | auth-token.c | 102 const char *temp_path; local 106 temp_path = t_strconcat(path, ".tmp", NULL); 109 fd = open(temp_path, O_WRONLY | O_CREAT | O_TRUNC, 0600); 113 i_error("open(%s) failed: %m", temp_path); 119 i_error("write(%s) failed: %m", temp_path); 121 i_error("close(%s) failed: %m", temp_path); 126 i_unlink(temp_path); 130 if (rename(temp_path, path) < 0) { 131 i_error("rename(%s, %s) failed: %m", temp_path, path); 132 i_unlink(temp_path); [all...] |
/dovecot/src/lib/ |
H A D | file-create-locked.c | 80 string_t *temp_path = t_str_new(128); local 86 str_append(temp_path, path); 89 fd = safe_mkstemp(temp_path, mode, uid, gid); 91 fd = safe_mkstemp_group(temp_path, mode, gid, set->gid_origin); 107 if (file_try_lock_error(fd, str_c(temp_path), F_WRLCK, 109 } else if (link(str_c(temp_path), path) < 0) { 118 str_c(temp_path)); 121 str_c(temp_path), path); 126 i_unlink_if_exists(str_c(temp_path)); 132 i_unlink_if_exists(str_c(temp_path)); [all...] |
H A D | istream-seekable.c | 21 char *temp_path; member in struct:seekable_istream 63 i_free(sstream->temp_path); 101 sstream->temp_path = i_strdup(path); 241 i_error("istream-seekable: read(%s) failed: %m", sstream->temp_path); 248 i_free_and_null(sstream->temp_path); 293 sstream->temp_path);
|
H A D | file-dotlock.c | 63 const char *path, *lock_path, *temp_path; member in struct:lock_info 326 if (lock_info->temp_path == NULL) { 368 lock_info->temp_path = str_c(tmp_path); 370 i_error("fstat(%s) failed: %m", lock_info->temp_path); 375 if (utime(lock_info->temp_path, NULL) < 0) 376 i_error("utime(%s) failed: %m", lock_info->temp_path); 379 if (nfs_safe_link(lock_info->temp_path, 386 lock_info->temp_path, lock_info->lock_path); 391 if (i_unlink(lock_info->temp_path) < 0) { 394 lock_info->temp_path [all...] |
/dovecot/src/lib-storage/index/dbox-common/ |
H A D | dbox-file-fix.c | 316 const char *temp_path, struct ostream *output) 330 if (stream_copy(file, output, temp_path, start_offset) < 0) 369 if (stream_copy(file, output, temp_path, 400 if (stream_copy(file, output, temp_path, msg_size) < 0) 441 "write(%s) failed: %s", temp_path, o_stream_get_error(output)); 450 const char *dir, *p, *temp_path, *broken_path; local 460 temp_path = t_strdup_printf("%s/%s", dir, dbox_generate_tmp_filename()); 461 fd = file->storage->v.file_create_fd(file, temp_path, FALSE); 467 ret = dbox_file_fix_write_stream(file, start_offset, temp_path, output); 474 "close(%s) failed: %m", temp_path); 315 dbox_file_fix_write_stream(struct dbox_file *file, uoff_t start_offset, const char *temp_path, struct ostream *output) argument [all...] |
/dovecot/src/lib-storage/index/dbox-single/ |
H A D | sdbox-file.c | 294 const char *dest_dir, *temp_path, *dest_path, *p; local 319 temp_path = t_strdup_printf("%s/%s", dest_dir, 324 out_fd = file->storage->v.file_create_fd(file, temp_path, TRUE); 333 temp_path, o_stream_get_error(output)); 341 "fsync(%s) failed: %m", temp_path); 347 "close(%s) failed: %m", temp_path); 351 i_unlink(temp_path); 358 if (utime(temp_path, &ut) < 0) { 360 "utime(%s) failed: %m", temp_path); 366 if (rename(temp_path, dest_pat [all...] |
/dovecot/src/lib-storage/index/imapc/ |
H A D | imapc-save.c | 24 char *temp_path; member in struct:imapc_save_context 85 ctx->temp_path = i_strdup(path); 279 "write(%s) failed: %s", ctx->temp_path, 293 i_close_fd_path(&ctx->fd, ctx->temp_path); 294 i_free(ctx->temp_path);
|
/dovecot/src/lib-fs/ |
H A D | fs-sis.c | 188 string_t *temp_path; local 207 temp_path = t_str_new(256); 212 str_append_n(temp_path, file->hash_path, 216 str_printfa(temp_path, "%s%s.tmp", 220 temp_file = fs_file_init_parent(&file->file, str_c(temp_path),
|
H A D | fs-posix.c | 44 char *temp_path, *full_path; member in struct:posix_fs_file 249 i_assert(file->temp_path == NULL); 274 file->temp_path = i_strdup(str_c(str)); 363 if (file->temp_path == NULL) 366 if (unlink(file->temp_path) < 0) { 368 file->temp_path); 373 i_free(file->temp_path); 382 i_assert(file->temp_path == NULL); 488 if ((ret = link(file->temp_path, file->full_path)) < 0) { 490 file->temp_path, fil [all...] |
/dovecot/src/lib-storage/index/ |
H A D | index-attachment.c | 65 string_t *temp_path; local 68 temp_path = t_str_new(256); 69 mail_user_set_get_temp_prefix(temp_path, storage->user->set); 70 fd = safe_mkstemp_hostpid(temp_path, 0600, (uid_t)-1, (gid_t)-1); 73 "safe_mkstemp(%s) failed: %m", str_c(temp_path)); 76 if (unlink(str_c(temp_path)) < 0) { 78 "unlink(%s) failed: %m", str_c(temp_path));
|
/dovecot/src/lib-index/ |
H A D | mail-cache-compress.c | 331 int fd, const char *temp_path, bool *unlock) 349 if (rename(temp_path, cache->filepath) < 0) { 439 const char *temp_path; local 476 fd = mail_index_create_tmp_file(cache->index, cache->filepath, &temp_path); 479 if (mail_cache_compress_write(cache, trans, fd, temp_path, unlock) < 0) { 481 i_unlink(temp_path); 329 mail_cache_compress_write(struct mail_cache *cache, struct mail_index_transaction *trans, int fd, const char *temp_path, bool *unlock) argument
|
H A D | mail-index-strmap.c | 992 const char *temp_path; local 1007 temp_path = str_c(str); 1012 temp_path); 1020 temp_path, o_stream_get_error(output)); 1026 "close(%s) failed: %m", temp_path); 1028 } else if (ret == 0 && rename(temp_path, strmap->path) < 0) { 1031 temp_path, strmap->path); 1035 i_unlink(temp_path);
|
/dovecot/src/plugins/quota/ |
H A D | quota-maildir.c | 244 string_t *str, *temp_path; local 268 temp_path = t_str_new(128); 269 str_append(temp_path, path); 270 fd = safe_mkstemp_hostpid_group(temp_path, perm.file_create_mode, 284 fd = safe_mkstemp_hostpid_group(temp_path, 307 i_error("write_full(%s) failed: %m", str_c(temp_path)); 309 i_unlink(str_c(temp_path)); 314 if (rename(str_c(temp_path), path) < 0) { 315 i_error("rename(%s, %s) failed: %m", str_c(temp_path), path); 316 i_unlink_if_exists(str_c(temp_path)); [all...] |
/dovecot/src/lib-dict/ |
H A D | dict-file.c | 518 const char *temp_path = NULL; local 532 temp_path = t_strdup_printf("%s.tmp", dict->path); 533 fd = creat(temp_path, 0600); 536 "dict-file: creat(%s) failed: %m", temp_path); 556 temp_path = file_dotlock_get_lock_path(dotlock); 572 (void)fd_copy_permissions(dict->fd, dict->path, fd, temp_path); 575 (void)fd_copy_parent_dir_permissions(dict->path, fd, temp_path); 594 *error_r = t_strdup_printf("write(%s) failed: %s", temp_path, 610 if (rename(temp_path, dict->path) < 0) { 612 temp_path, dic [all...] |
/dovecot/src/lib-storage/index/maildir/ |
H A D | maildir-uidlist.c | 1393 const char *control_dir, *temp_path; local 1406 temp_path = t_strconcat(control_dir, 1411 fd = open(temp_path, O_RDWR | O_CREAT | O_TRUNC, 0777); 1418 "open(%s, O_CREAT) failed: %m", temp_path); 1431 eperm_error_get_chgrp("fchown", temp_path, 1436 "fchown(%s) failed: %m", temp_path); 1441 ret = maildir_uidlist_write_fd(uidlist, fd, temp_path, 0, &file_size); 1443 if (rename(temp_path, uidlist->path) < 0) { 1446 temp_path, uidlist->path); 1452 i_unlink(temp_path); [all...] |
/dovecot/src/plugins/fts-squat/ |
H A D | squat-uidlist.c | 902 const char *temp_path; local 920 temp_path = t_strconcat(build_ctx->uidlist->path, ".tmp", NULL); 921 fd = squat_trie_create_fd(build_ctx->uidlist->trie, temp_path, O_TRUNC); 1040 const char *temp_path; local 1048 temp_path = t_strconcat(ctx->uidlist->path, ".tmp", NULL); 1067 i_error("write(%s) failed: %s", temp_path, 1070 } else if (rename(temp_path, ctx->uidlist->path) < 0) { 1072 temp_path, ctx->uidlist->path); 1086 i_error("close(%s) failed: %m", temp_path); 1089 i_unlink(temp_path); [all...] |
/dovecot/src/lib-imap-client/ |
H A D | imapc-connection.c | 73 char *temp_path; member in struct:imapc_connection_literal 434 i_close_fd_path(&literal->fd, literal->temp_path); 435 i_free_and_null(literal->temp_path); 624 conn->literal.temp_path = i_strdup(path); 646 conn->name, conn->literal.temp_path);
|