Lines Matching refs:targetfile
6340 char targetfile[MAXPATHLEN]; local
6385 if (len + strlen(filename) + 1 >= sizeof(targetfile))
6391 (void) sm_strlcpy(targetfile, SafeFileEnv, sizeof(targetfile));
6392 realfile = targetfile + len;
6398 if (targetfile[len - 1] != '/')
6399 (void) sm_strlcat(targetfile,
6400 "/", sizeof(targetfile));
6401 (void) sm_strlcat(targetfile, filename,
6402 sizeof(targetfile));
6407 expand(mailer->m_rootdir, targetfile, sizeof(targetfile), e);
6408 len = strlen(targetfile);
6410 if (strncmp(targetfile, filename, len) == 0)
6413 if (len + strlen(filename) + 1 >= sizeof(targetfile))
6416 targetfile, filename);
6419 realfile = targetfile + len;
6420 if (targetfile[len - 1] != '/')
6421 (void) sm_strlcat(targetfile, "/", sizeof(targetfile));
6423 (void) sm_strlcat(targetfile, filename + 1,
6424 sizeof(targetfile));
6426 (void) sm_strlcat(targetfile, filename,
6427 sizeof(targetfile));
6431 if (sm_strlcpy(targetfile, filename, sizeof(targetfile)) >=
6432 sizeof(targetfile))
6437 realfile = targetfile;
6502 if (stat(targetfile, &stb) < 0)
6653 if (realfile != targetfile)
6660 sm_dprintf("mailfile: chroot %s\n", targetfile);
6661 if (chroot(targetfile) < 0)
6664 targetfile);
6748 (realfile != targetfile && !S_ISREG(mode)))