| /freebsd-12.1/contrib/tcsh/ |
| H A D | glob.c | 476 xfree(pathbuf.s); in glob1() 506 pathbuf->s[pathbuf->len - 1] != SEP) && in glob2() 515 strbuf_terminate(pathbuf); in glob2() 524 orig_len = pathbuf->len; in glob2() 537 pathbuf->len = orig_len; in glob2() 577 orig_len = pathbuf->len; in glob3() 601 pathbuf->len = orig_len; in glob3() 602 strbuf_terminate(pathbuf); in glob3() 605 if (*pathbuf->s && (Lstat(pathbuf->s, &sbuf) || !S_ISDIR(sbuf.st_mode) in glob3() 628 pathbuf->len = orig_len; in glob3() [all …]
|
| H A D | tc.os.c | 1222 char pathbuf[MAXPATHLEN]; /* temporary pathname buffer */ in xgetcwd() local 1223 char *pnptr = &pathbuf[(sizeof pathbuf)-1]; /* pathname pointer */ in xgetcwd() 1273 pnptr = strnrcpy(dirp->d_name, pnptr, pnptr - pathbuf); in xgetcwd() 1274 pnptr = strnrcpy("/", pnptr, pnptr - pathbuf); in xgetcwd() 1293 (void) chdir(strnrcpy(".", pnptr, pnptr - pathbuf)); in xgetcwd() 1308 char pathbuf[MAXPATHLEN], nextpathbuf[MAXPATHLEN * 2]; in xgetcwd() local 1319 pathbuf[MAXPATHLEN - 1] = '\0'; in xgetcwd() 1320 pathptr = &pathbuf[MAXPATHLEN - 1]; in xgetcwd() 1408 pathptr = strnrcpy(pathptr, d->d_name, pathptr - pathbuf); in xgetcwd() 1409 pathptr = strnrcpy(pathptr, "/", pathptr - pathbuf); in xgetcwd()
|
| /freebsd-12.1/sbin/kldconfig/ |
| H A D | kldconfig.c | 146 char pathbuf[MAXPATHLEN+1]; in addpath() local 155 if (realpath(path, pathbuf) == NULL) in addpath() 156 strlcpy(pathbuf, path, sizeof(pathbuf)); in addpath() 158 len = strlen(pathbuf); in addpath() 161 pathbuf[--len] = '\0'; in addpath() 165 if (!strcmp(pe->path, pathbuf)) in addpath() 197 char pathbuf[MAXPATHLEN+1]; in rempath() local 203 strlcpy(pathbuf, path, sizeof(pathbuf)); in rempath() 205 len = strlen(pathbuf); in rempath() 208 pathbuf[--len] = '\0'; in rempath() [all …]
|
| /freebsd-12.1/contrib/openpam/lib/libpam/ |
| H A D | openpam_check_owner_perms.c | 104 char pathbuf[PATH_MAX]; in openpam_check_path_owner_perms() local 111 if (realpath(path, pathbuf) == NULL) in openpam_check_path_owner_perms() 113 len = strlen(pathbuf); in openpam_check_path_owner_perms() 115 if (stat(pathbuf, &sb) != 0) { in openpam_check_path_owner_perms() 118 openpam_log(PAM_LOG_ERROR, "%s: %m", pathbuf); in openpam_check_path_owner_perms() 125 "%s: not a regular file", pathbuf); in openpam_check_path_owner_perms() 132 "%s: insecure ownership or permissions", pathbuf); in openpam_check_path_owner_perms() 136 while (--len > 0 && pathbuf[len] != '/') in openpam_check_path_owner_perms() 137 pathbuf[len] = '\0'; in openpam_check_path_owner_perms()
|
| /freebsd-12.1/lib/ncurses/ncurses/ |
| H A D | termcap.c | 112 char pathbuf[PBUFSIZ]; /* holds raw path of filenames */ in _nc_read_termcap_entry() local 121 p = pathbuf; in _nc_read_termcap_entry() 135 strncpy(pathbuf, termpath, PBUFSIZ); in _nc_read_termcap_entry() 138 strncpy(pathbuf, home, PBUFSIZ - 1); /* $HOME first */ in _nc_read_termcap_entry() 139 pathbuf[PBUFSIZ - 2] = '\0'; /* -2 because we add a slash */ in _nc_read_termcap_entry() 140 p += strlen(pathbuf); /* path, looking in */ in _nc_read_termcap_entry() 143 strncpy(p, _PATH_DEF, PBUFSIZ - (p - pathbuf)); in _nc_read_termcap_entry() 147 strncpy(pathbuf, cp, PBUFSIZ); /* still can be tokenized */ in _nc_read_termcap_entry() 151 strcpy(pathbuf, _PATH_DEF_SEC); in _nc_read_termcap_entry() 153 pathbuf[PBUFSIZ - 1] = '\0'; in _nc_read_termcap_entry() [all …]
|
| /freebsd-12.1/bin/ln/ |
| H A D | ln.c | 186 char pathbuf[PATH_MAX]; in samedirent() local 206 memcpy(pathbuf, ".", 2); in samedirent() 208 memcpy(pathbuf, path1, file1 - path1); in samedirent() 209 pathbuf[file1 - path1] = '\0'; in samedirent() 211 if (stat(pathbuf, &sb1) != 0) in samedirent() 214 memcpy(pathbuf, ".", 2); in samedirent() 216 memcpy(pathbuf, path2, file2 - path2); in samedirent() 217 pathbuf[file2 - path2] = '\0'; in samedirent() 219 if (stat(pathbuf, &sb2) != 0) in samedirent()
|
| /freebsd-12.1/usr.sbin/pw/ |
| H A D | grupd.c | 46 static char pathbuf[MAXPATHLEN]; in getgrpath() local 48 snprintf(pathbuf, sizeof pathbuf, "%s/%s", conf.etcpath, file); in getgrpath() 50 return (pathbuf); in getgrpath()
|
| H A D | pwupd.c | 50 static char pathbuf[MAXPATHLEN]; in getpwpath() local 52 snprintf(pathbuf, sizeof pathbuf, "%s/%s", conf.etcpath, file); in getpwpath() 54 return (pathbuf); in getpwpath()
|
| /freebsd-12.1/crypto/heimdal/lib/roken/ |
| H A D | glob.c | 496 Char pathbuf[MaxPathLen+1]; in glob1() local 501 return(glob2(pathbuf, pathbuf, pattern, pglob, limit)); in glob1() 519 glob2(Char *pathbuf, Char *pathend, Char *pattern, glob_t *pglob, in glob2() argument 533 if (g_lstat(pathbuf, &sb, pglob)) in glob2() 539 (g_stat(pathbuf, &sb, pglob) == 0) && in glob2() 545 return(globextend(pathbuf, pglob, limit)); in glob2() 563 return(glob3(pathbuf, pathend, pattern, p, pglob, in glob2() 570 glob3(Char *pathbuf, Char *pathend, Char *pattern, Char *restpattern, in glob3() argument 589 if ((dirp = g_opendir(pathbuf, pglob)) == NULL) { in glob3() 592 g_Ctoc(pathbuf, buf); in glob3() [all …]
|
| /freebsd-12.1/crypto/openssh/openbsd-compat/ |
| H A D | glob.c | 612 Char pathbuf[MAXPATHLEN]; local 617 return(glob2(pathbuf, pathbuf+MAXPATHLEN-1, 618 pathbuf, pathbuf+MAXPATHLEN-1, 628 glob2(Char *pathbuf, Char *pathbuf_last, Char *pathend, Char *pathend_last, argument 642 if (g_lstat(pathbuf, &sb, pglob)) 656 (g_stat(pathbuf, &sb, pglob) == 0) && 664 return(globextend(pathbuf, pglob, limitp, &sb)); 688 return(glob3(pathbuf, pathbuf_last, pathend, 718 if ((dirp = g_opendir(pathbuf, pglob)) == NULL) { 721 if (g_Ctoc(pathbuf, buf, sizeof(buf))) [all …]
|
| /freebsd-12.1/sbin/fsck_ffs/ |
| H A D | pass2.c | 70 char pathbuf[MAXPATHLEN + 1]; in pass2() local 166 getpathname(pathbuf, inp->i_number, inp->i_number); in pass2() 169 "DIRECTORY", pathbuf, in pass2() 173 "DIRECTORY", pathbuf, in pass2() 228 getpathname(pathbuf, inp->i_parent, inp->i_number); in pass2() 230 (uintmax_t)inp->i_number, pathbuf); in pass2() 231 getpathname(pathbuf, inp->i_dotdot, inp->i_dotdot); in pass2() 233 (uintmax_t)inp->i_dotdot, pathbuf); in pass2() 234 getpathname(pathbuf, inp->i_parent, inp->i_parent); in pass2() 236 (uintmax_t)inp->i_parent, pathbuf); in pass2()
|
| H A D | dir.c | 334 char pathbuf[MAXPATHLEN + 1]; in fileerror() local 339 getpathname(pathbuf, cwd, ino); in fileerror() 341 pfatal("NAME=%s\n", pathbuf); in fileerror() 348 pathbuf); in fileerror() 350 pfatal("NAME=%s\n", pathbuf); in fileerror() 603 char pathbuf[MAXPATHLEN + 1]; in makeentry() local 622 getpathname(pathbuf, parent, parent); in makeentry() 624 if (expanddir(dp, pathbuf) == 0) in makeentry()
|
| H A D | inode.c | 67 char pathbuf[MAXPATHLEN + 1]; in ckinode() local 96 getpathname(pathbuf, idesc->id_number, in ckinode() 99 pathbuf); in ckinode() 136 getpathname(pathbuf, idesc->id_number, in ckinode() 139 pathbuf); in ckinode() 165 char pathbuf[MAXPATHLEN + 1]; in iblock() local 217 getpathname(pathbuf, idesc->id_number, in iblock() 220 pathbuf); in iblock()
|
| /freebsd-12.1/usr.bin/mail/ |
| H A D | fio.c | 68 char linebuf[LINESIZE], pathbuf[PATHSIZE]; in setptr() local 72 (void)snprintf(pathbuf, sizeof(pathbuf), "%s/mail.XXXXXXXXXX", tmpdir); in setptr() 73 if ((c = mkstemp(pathbuf)) == -1 || (mestmp = Fdopen(c, "r+")) == NULL) in setptr() 74 err(1, "can't open %s", pathbuf); in setptr() 75 (void)rm(pathbuf); in setptr()
|
| /freebsd-12.1/lib/libc/gen/ |
| H A D | glob.c | 631 Char pathbuf[MAXPATHLEN]; in glob1() local 636 return (glob2(pathbuf, pathbuf, pathbuf + MAXPATHLEN - 1, in glob1() 646 glob2(Char *pathbuf, Char *pathend, Char *pathend_last, Char *pattern, in glob2() argument 660 if (g_lstat(pathbuf, &sb, pglob)) in glob2() 672 g_stat(pathbuf, &sb, pglob) == 0 && in glob2() 682 return (globextend(pathbuf, pglob, limit, NULL)); in glob2() 709 return (glob3(pathbuf, pathend, pathend_last, pattern, in glob2() 716 glob3(Char *pathbuf, Char *pathend, Char *pathend_last, in glob3() argument 733 g_Ctoc(pathbuf, buf, sizeof(buf))) { in glob3() 740 if ((dirp = g_opendir(pathbuf, pglob)) == NULL) { in glob3() [all …]
|
| H A D | glob-compat11.c | 599 Char pathbuf[MAXPATHLEN]; in glob1() local 604 return (glob2(pathbuf, pathbuf, pathbuf + MAXPATHLEN - 1, in glob1() 614 glob2(Char *pathbuf, Char *pathend, Char *pathend_last, Char *pattern, in glob2() argument 628 if (g_lstat(pathbuf, &sb, pglob)) in glob2() 640 g_stat(pathbuf, &sb, pglob) == 0 && in glob2() 650 return (globextend(pathbuf, pglob, limit, NULL)); in glob2() 677 return (glob3(pathbuf, pathend, pathend_last, pattern, in glob2() 684 glob3(Char *pathbuf, Char *pathend, Char *pathend_last, in glob3() argument 701 g_Ctoc(pathbuf, buf, sizeof(buf))) { in glob3() 708 if ((dirp = g_opendir(pathbuf, pglob)) == NULL) { in glob3() [all …]
|
| /freebsd-12.1/contrib/ncurses/ncurses/tinfo/ |
| H A D | read_termcap.c | 792 char pathbuf[PBUFSIZ]; /* holds raw path of filenames */ in _nc_tgetent() local 799 p = pathbuf; in _nc_tgetent() 811 _nc_str_init(&desc, pathbuf, sizeof(pathbuf)); in _nc_tgetent() 836 *fname++ = pathbuf; /* tokenize path into vector of names */ in _nc_tgetent() 1031 char pathbuf[PATH_MAX]; in _nc_read_termcap_entry() local 1068 _nc_SPRINTF(pathbuf, _nc_SLIMIT(sizeof(pathbuf)) in _nc_read_termcap_entry() 1070 ADD_TC(pathbuf, filecount); in _nc_read_termcap_entry()
|
| /freebsd-12.1/contrib/sendmail/smrsh/ |
| H A D | smrsh.c | 151 char pathbuf[1000]; local 163 (void) sm_strlcpyn(pathbuf, sizeof pathbuf, 2, "PATH=", PATH); 164 newenv[0] = pathbuf;
|
| /freebsd-12.1/sys/kern/ |
| H A D | vfs_mount.c | 1121 char *pathbuf; in vfs_domount() local 1181 pathbuf = malloc(MNAMELEN, M_TEMP, M_WAITOK); in vfs_domount() 1182 strcpy(pathbuf, fspath); in vfs_domount() 1189 free(pathbuf, M_TEMP); in vfs_domount() 1214 char *pathbuf; in sys_unmount() local 1224 pathbuf = malloc(MNAMELEN, M_TEMP, M_WAITOK); in sys_unmount() 1227 free(pathbuf, M_TEMP); in sys_unmount() 1231 AUDIT_ARG_TEXT(pathbuf); in sys_unmount() 1234 free(pathbuf, M_TEMP); in sys_unmount() 1252 UIO_SYSSPACE, pathbuf, td); in sys_unmount() [all …]
|
| /freebsd-12.1/cddl/contrib/opensolaris/cmd/zlook/ |
| H A D | zlook.c | 273 char pathbuf[MAXPATHLEN]; in main() local 278 (void) strlcpy(pathbuf, argv[optind], MAXPATHLEN); in main() 279 result = pathconf(pathbuf, check); in main() 280 (void) printf("pathconf(2) check for %s\n", pathbuf); in main()
|
| /freebsd-12.1/usr.bin/rpcgen/ |
| H A D | rpc_main.c | 81 static char pathbuf[MAXPATHLEN + 1]; variable 1144 if (strlcpy(pathbuf, argv[i], in parseargs() 1145 sizeof(pathbuf)) >= sizeof(pathbuf) in parseargs() 1146 || strlcat(pathbuf, "/cpp", in parseargs() 1147 sizeof(pathbuf)) >= in parseargs() 1148 sizeof(pathbuf)) { in parseargs() 1152 CPP = pathbuf; in parseargs()
|
| /freebsd-12.1/libexec/rtld-elf/ |
| H A D | libmap.c | 407 char pathbuf[64], *s, *t; in lm_findn() local 409 if (n < sizeof(pathbuf) - 1) in lm_findn() 410 s = pathbuf; in lm_findn() 416 if (s != pathbuf) in lm_findn()
|
| /freebsd-12.1/lib/libdpv/ |
| H A D | dpv.c | 69 static char pathbuf[PATH_MAX]; variable 577 len = snprintf(pathbuf, in dpv() 580 len = snprintf(pathbuf, in dpv() 589 if ((output_out = open(pathbuf, in dpv() 592 warn("%s", pathbuf); in dpv()
|
| /freebsd-12.1/contrib/ntp/util/ |
| H A D | ntp-keygen.c | 320 char pathbuf[MAXFILENAME + 1]; in main() local 482 if (RAND_file_name(pathbuf, sizeof(pathbuf)) == NULL) { in main() 487 temp = RAND_load_file(pathbuf, -1); in main() 491 pathbuf); in main() 495 "Random seed file %s %u bytes\n", pathbuf, temp); in main() 552 BIO_gets(bp, pathbuf, in main() 555 if (strcmp(pathbuf, in main() 558 else if (strcmp(pathbuf, in main() 1968 char pathbuf[MAXFILENAME + 1]; in x509() local 2084 snprintf(pathbuf, sizeof(pathbuf), "%scert", id); in x509() [all …]
|
| /freebsd-12.1/bin/ps/ |
| H A D | ps.c | 851 char pathbuf[PATH_MAX], pathbuf2[PATH_MAX], pathbuf3[PATH_MAX]; in addelem_tty() local 867 strlcpy(pathbuf, _PATH_DEV, sizeof(pathbuf)); in addelem_tty() 868 strlcat(pathbuf, elem, sizeof(pathbuf)); in addelem_tty() 869 ttypath = pathbuf; in addelem_tty() 870 if (strncmp(pathbuf, _PATH_TTY, strlen(_PATH_TTY)) == 0) in addelem_tty() 872 if (strncmp(pathbuf, _PATH_PTS, strlen(_PATH_PTS)) == 0) in addelem_tty() 874 if (strcmp(pathbuf, _PATH_CONSOLE) == 0) in addelem_tty()
|