Lines Matching defs:file

57     char *file;             /* mmap cache file name */
58 int fd; /* file descriptor */
133 char *file = NULL;
148 file = talloc_asprintf(tmp_ctx, "%s_%s",
149 mc_ctx->file, "corrupted");
150 if (file == NULL) {
156 fd = creat(file, 0600);
160 "Failed to open file '%s' [%d]: %s\n",
161 file, err, strerror(err));
180 "Stored copy of corrupted mmap cache in file '%s\n'", file);
185 err = unlink(file);
189 "Failed to remove file '%s': %s.\n", file,
1091 * When we (re)create a new file we must mark the current file as recycled
1093 * We unlink the current file and make a new one.
1103 ofd = open(mc_ctx->file, O_RDWR);
1108 "Failed to lock file %s.\n", mc_ctx->file);
1112 DEBUG(SSSDBG_FATAL_FAILURE, "Failed to mark mmap file %s as"
1114 mc_ctx->file, ret, strerror(ret));
1121 "Failed to open old memory cache file %s: %d(%s).\n",
1122 mc_ctx->file, ret, strerror(ret));
1126 ret = unlink(mc_ctx->file);
1129 DEBUG(SSSDBG_TRACE_FUNC, "Failed to rm mmap file %s: %d(%s)\n",
1130 mc_ctx->file, ret, strerror(ret));
1133 /* temporarily relax umask as we need the file to be readable
1138 mc_ctx->fd = open(mc_ctx->file, O_CREAT | O_EXCL | O_RDWR, 0644);
1142 DEBUG(SSSDBG_CRIT_FAILURE, "Failed to open mmap file %s: %d(%s)\n",
1143 mc_ctx->file, ret, strerror(ret));
1150 "Failed to lock file %s.\n", mc_ctx->file);
1158 uret = unlink(mc_ctx->file);
1161 DEBUG(SSSDBG_TRACE_FUNC, "Failed to rm mmap file %s: %d(%s)\n",
1162 mc_ctx->file, uret, strerror(uret));
1179 /* no reason to update anything else if the file is recycled or
1208 "Failed to unmap old memory cache file."
1218 "Failed to close old memory cache file."
1266 mc_ctx->file = talloc_asprintf(mc_ctx, "%s/%s",
1268 if (!mc_ctx->file) {
1289 /* for now ALWAYS create a new file on restart */
1299 DEBUG(SSSDBG_CRIT_FAILURE, "Failed to resize file %s: %d(%s)\n",
1300 mc_ctx->file, ret, strerror(ret));
1309 DEBUG(SSSDBG_CRIT_FAILURE, "Failed to mmap file %s(%zu): %d(%s)\n",
1310 mc_ctx->file, mc_ctx->mmap_size,
1336 /* Closing the file descriptor and unmapping the file
1338 if (mc_ctx && mc_ctx->file && mc_ctx->fd != -1) {
1339 dret = unlink(mc_ctx->file);
1343 "Failed to rm mmap file %s: %d(%s)\n", mc_ctx->file,