| /freebsd-13-stable/sbin/kldconfig/ |
| HD | kldconfig.c | 144 char pathbuf[MAXPATHLEN+1]; in addpath() local 153 if (realpath(path, pathbuf) == NULL) in addpath() 154 strlcpy(pathbuf, path, sizeof(pathbuf)); in addpath() 156 len = strlen(pathbuf); in addpath() 158 if ((len > 0) && (pathbuf[len-1] == '/')) in addpath() 159 pathbuf[--len] = '\0'; in addpath() 163 if (!strcmp(pe->path, pathbuf)) in addpath() 168 errx(1, "already in the module search path: %s", pathbuf); in addpath() 173 ((pe->path = strdup(pathbuf)) == NULL)) { in addpath() 195 char pathbuf[MAXPATHLEN+1]; in rempath() local [all …]
|
| /freebsd-13-stable/contrib/tcsh/ |
| HD | glob.c | 468 struct strbuf pathbuf = strbuf_INIT; in glob1() local 476 err = glob2(&pathbuf, pattern, pglob, no_match); in glob1() 477 xfree(pathbuf.s); in glob1() 487 glob2(struct strbuf *pathbuf, const Char *pattern, glob_t *pglob, int no_match) in glob2() argument 501 strbuf_terminate(pathbuf); in glob2() 503 if (Lstat(pathbuf->s, &sbuf)) in glob2() 507 pathbuf->s[pathbuf->len - 1] != SEP) && in glob2() 511 (Stat(pathbuf->s, &sbuf) == 0) && in glob2() 515 strbuf_append1(pathbuf, SEP); in glob2() 516 strbuf_terminate(pathbuf); in glob2() [all …]
|
| HD | tc.os.c | 1218 char pathbuf[MAXPATHLEN]; /* temporary pathname buffer */ in xgetcwd() local 1219 char *pnptr = &pathbuf[(sizeof pathbuf)-1]; /* pathname pointer */ in xgetcwd() 1269 pnptr = strnrcpy(dirp->d_name, pnptr, pnptr - pathbuf); in xgetcwd() 1270 pnptr = strnrcpy("/", pnptr, pnptr - pathbuf); in xgetcwd() 1289 (void) chdir(strnrcpy(".", pnptr, pnptr - pathbuf)); in xgetcwd() 1304 char pathbuf[MAXPATHLEN], nextpathbuf[MAXPATHLEN * 2]; in xgetcwd() local 1315 pathbuf[MAXPATHLEN - 1] = '\0'; in xgetcwd() 1316 pathptr = &pathbuf[MAXPATHLEN - 1]; in xgetcwd() 1404 pathptr = strnrcpy(pathptr, d->d_name, pathptr - pathbuf); in xgetcwd() 1405 pathptr = strnrcpy(pathptr, "/", pathptr - pathbuf); in xgetcwd()
|
| /freebsd-13-stable/contrib/openpam/lib/libpam/ |
| HD | openpam_check_owner_perms.c | 102 char pathbuf[PATH_MAX]; in openpam_check_path_owner_perms() local 109 if (realpath(path, pathbuf) == NULL) in openpam_check_path_owner_perms() 111 len = strlen(pathbuf); in openpam_check_path_owner_perms() 113 if (stat(pathbuf, &sb) != 0) { in openpam_check_path_owner_perms() 116 openpam_log(PAM_LOG_ERROR, "%s: %m", pathbuf); in openpam_check_path_owner_perms() 123 "%s: not a regular file", pathbuf); in openpam_check_path_owner_perms() 130 "%s: insecure ownership or permissions", pathbuf); in openpam_check_path_owner_perms() 134 while (--len > 0 && pathbuf[len] != '/') in openpam_check_path_owner_perms() 135 pathbuf[len] = '\0'; in openpam_check_path_owner_perms()
|
| /freebsd-13-stable/lib/ncurses/ncurses/ |
| HD | termcap.c | 110 char pathbuf[PBUFSIZ]; /* holds raw path of filenames */ in _nc_read_termcap_entry() local 119 p = pathbuf; in _nc_read_termcap_entry() 133 strncpy(pathbuf, termpath, PBUFSIZ); in _nc_read_termcap_entry() 136 strncpy(pathbuf, home, PBUFSIZ - 1); /* $HOME first */ in _nc_read_termcap_entry() 137 pathbuf[PBUFSIZ - 2] = '\0'; /* -2 because we add a slash */ in _nc_read_termcap_entry() 138 p += strlen(pathbuf); /* path, looking in */ in _nc_read_termcap_entry() 141 strncpy(p, _PATH_DEF, PBUFSIZ - (p - pathbuf)); in _nc_read_termcap_entry() 145 strncpy(pathbuf, cp, PBUFSIZ); /* still can be tokenized */ in _nc_read_termcap_entry() 149 strcpy(pathbuf, _PATH_DEF_SEC); in _nc_read_termcap_entry() 151 pathbuf[PBUFSIZ - 1] = '\0'; in _nc_read_termcap_entry() [all …]
|
| /freebsd-13-stable/bin/ln/ |
| HD | ln.c | 189 char pathbuf[PATH_MAX]; in samedirent() local 209 memcpy(pathbuf, ".", 2); in samedirent() 211 memcpy(pathbuf, path1, file1 - path1); in samedirent() 212 pathbuf[file1 - path1] = '\0'; in samedirent() 214 if (stat(pathbuf, &sb1) != 0) in samedirent() 217 memcpy(pathbuf, ".", 2); in samedirent() 219 memcpy(pathbuf, path2, file2 - path2); in samedirent() 220 pathbuf[file2 - path2] = '\0'; in samedirent() 222 if (stat(pathbuf, &sb2) != 0) in samedirent()
|
| /freebsd-13-stable/usr.sbin/pw/ |
| HD | grupd.c | 41 static char pathbuf[MAXPATHLEN]; in getgrpath() local 43 snprintf(pathbuf, sizeof pathbuf, "%s/%s", conf.etcpath, file); in getgrpath() 45 return (pathbuf); in getgrpath()
|
| HD | pwupd.c | 45 static char pathbuf[MAXPATHLEN]; in getpwpath() local 47 snprintf(pathbuf, sizeof pathbuf, "%s/%s", conf.etcpath, file); in getpwpath() 49 return (pathbuf); in getpwpath()
|
| /freebsd-13-stable/crypto/heimdal/lib/roken/ |
| HD | 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-13-stable/usr.bin/mail/ |
| HD | fio.c | 66 char linebuf[LINESIZE], pathbuf[PATHSIZE]; in setptr() local 70 (void)snprintf(pathbuf, sizeof(pathbuf), "%s/mail.XXXXXXXXXX", tmpdir); in setptr() 71 if ((c = mkstemp(pathbuf)) == -1 || (mestmp = Fdopen(c, "r+")) == NULL) in setptr() 72 err(1, "can't open %s", pathbuf); in setptr() 73 (void)rm(pathbuf); in setptr()
|
| /freebsd-13-stable/crypto/openssh/openbsd-compat/ |
| HD | glob.c | 616 Char pathbuf[PATH_MAX]; local 621 return(glob2(pathbuf, pathbuf+PATH_MAX-1, 622 pathbuf, pathbuf+PATH_MAX-1, 632 glob2(Char *pathbuf, Char *pathbuf_last, Char *pathend, Char *pathend_last, argument 654 if (g_lstat(pathbuf, &sb, pglob)) 660 (g_stat(pathbuf, &sb, pglob) == 0) && 668 return(globextend(pathbuf, pglob, limitp, &sb)); 692 return(glob3(pathbuf, pathbuf_last, pathend, 700 glob3(Char *pathbuf, Char *pathbuf_last, Char *pathend, Char *pathend_last, argument 722 if ((dirp = g_opendir(pathbuf, pglob)) == NULL) { [all …]
|
| /freebsd-13-stable/lib/libc/gen/ |
| HD | glob.c | 629 Char pathbuf[MAXPATHLEN]; in glob1() local 634 return (glob2(pathbuf, pathbuf, pathbuf + MAXPATHLEN - 1, in glob1() 644 glob2(Char *pathbuf, Char *pathend, Char *pathend_last, Char *pattern, in glob2() argument 658 if (g_lstat(pathbuf, &sb, pglob)) in glob2() 670 g_stat(pathbuf, &sb, pglob) == 0 && in glob2() 680 return (globextend(pathbuf, pglob, limit, NULL)); in glob2() 707 return (glob3(pathbuf, pathend, pathend_last, pattern, in glob2() 714 glob3(Char *pathbuf, Char *pathend, Char *pathend_last, in glob3() argument 731 g_Ctoc(pathbuf, buf, sizeof(buf))) { in glob3() 738 if ((dirp = g_opendir(pathbuf, pglob)) == NULL) { in glob3() [all …]
|
| HD | glob-compat11.c | 597 Char pathbuf[MAXPATHLEN]; in glob1() local 602 return (glob2(pathbuf, pathbuf, pathbuf + MAXPATHLEN - 1, in glob1() 612 glob2(Char *pathbuf, Char *pathend, Char *pathend_last, Char *pattern, in glob2() argument 626 if (g_lstat(pathbuf, &sb, pglob)) in glob2() 638 g_stat(pathbuf, &sb, pglob) == 0 && in glob2() 648 return (globextend(pathbuf, pglob, limit, NULL)); in glob2() 675 return (glob3(pathbuf, pathend, pathend_last, pattern, in glob2() 682 glob3(Char *pathbuf, Char *pathend, Char *pathend_last, in glob3() argument 699 g_Ctoc(pathbuf, buf, sizeof(buf))) { in glob3() 706 if ((dirp = g_opendir(pathbuf, pglob)) == NULL) { in glob3() [all …]
|
| /freebsd-13-stable/sbin/fsck_ffs/ |
| HD | pass2.c | 69 char pathbuf[MAXPATHLEN + 1]; in pass2() local 168 getpathname(pathbuf, inp->i_number, inp->i_number); in pass2() 171 "DIRECTORY", pathbuf, in pass2() 175 "DIRECTORY", pathbuf, in pass2() 233 getpathname(pathbuf, inp->i_parent, inp->i_number); in pass2() 235 (uintmax_t)inp->i_number, pathbuf); in pass2() 236 getpathname(pathbuf, inp->i_dotdot, inp->i_dotdot); in pass2() 238 (uintmax_t)inp->i_dotdot, pathbuf); in pass2() 239 getpathname(pathbuf, inp->i_parent, inp->i_parent); in pass2() 241 (uintmax_t)inp->i_parent, pathbuf); in pass2()
|
| HD | dir.c | 435 char pathbuf[MAXPATHLEN + 1]; in fileerror() local 446 getpathname(pathbuf, cwd, ino); in fileerror() 450 pathbuf); in fileerror() 452 pfatal("NAME=%s\n", pathbuf); in fileerror() 744 char pathbuf[MAXPATHLEN + 1]; in makeentry() local 767 getpathname(pathbuf, parent, parent); in makeentry() 768 if (expanddir(&ip, pathbuf) == 0) { in makeentry()
|
| /freebsd-13-stable/contrib/ncurses/ncurses/tinfo/ |
| HD | read_termcap.c | 793 char pathbuf[PBUFSIZ]; /* holds raw path of filenames */ in _nc_tgetent() local 800 p = pathbuf; in _nc_tgetent() 812 _nc_str_init(&desc, pathbuf, sizeof(pathbuf)); in _nc_tgetent() 837 *fname++ = pathbuf; /* tokenize path into vector of names */ in _nc_tgetent() 1038 char pathbuf[PATH_MAX]; in _nc_read_termcap_entry() local 1073 _nc_SPRINTF(pathbuf, _nc_SLIMIT(sizeof(pathbuf)) in _nc_read_termcap_entry() 1075 ADD_TC(pathbuf, filecount); in _nc_read_termcap_entry()
|
| /freebsd-13-stable/contrib/sendmail/smrsh/ |
| HD | smrsh.c | 151 char pathbuf[1000]; local 163 (void) sm_strlcpyn(pathbuf, sizeof pathbuf, 2, "PATH=", PATH); 164 newenv[0] = pathbuf;
|
| /freebsd-13-stable/usr.bin/rpcgen/ |
| HD | rpc_main.c | 79 static char pathbuf[MAXPATHLEN + 1]; variable 1140 if (strlcpy(pathbuf, argv[i], in parseargs() 1141 sizeof(pathbuf)) >= sizeof(pathbuf) in parseargs() 1142 || strlcat(pathbuf, "/cpp", in parseargs() 1143 sizeof(pathbuf)) >= in parseargs() 1144 sizeof(pathbuf)) { in parseargs() 1148 CPP = pathbuf; in parseargs()
|
| /freebsd-13-stable/libexec/rtld-elf/ |
| HD | libmap.c | 412 char pathbuf[64], *s, *t; in lm_findn() local 414 if (n < sizeof(pathbuf) - 1) in lm_findn() 415 s = pathbuf; in lm_findn() 421 if (s != pathbuf) in lm_findn()
|
| /freebsd-13-stable/lib/libdpv/ |
| HD | dpv.c | 67 static char pathbuf[PATH_MAX]; variable 575 len = snprintf(pathbuf, in dpv() 578 len = snprintf(pathbuf, in dpv() 587 if ((output_out = open(pathbuf, in dpv() 590 warn("%s", pathbuf); in dpv()
|
| /freebsd-13-stable/contrib/ntp/util/ |
| HD | ntp-keygen.c | 324 char pathbuf[MAXFILENAME + 1]; in main() local 486 if (RAND_file_name(pathbuf, sizeof(pathbuf)) == NULL) { in main() 491 temp = RAND_load_file(pathbuf, -1); in main() 495 pathbuf); in main() 499 "Random seed file %s %u bytes\n", pathbuf, temp); in main() 556 BIO_gets(bp, pathbuf, in main() 559 if (strcmp(pathbuf, in main() 562 else if (strcmp(pathbuf, in main() 1987 char pathbuf[MAXFILENAME + 1]; in x509() local 2103 snprintf(pathbuf, sizeof(pathbuf), "%scert", id); in x509() [all …]
|
| /freebsd-13-stable/sys/kern/ |
| HD | vfs_mount.c | 1438 char *pathbuf; in vfs_domount() local 1514 pathbuf = malloc(MNAMELEN, M_TEMP, M_WAITOK); in vfs_domount() 1515 strcpy(pathbuf, fspath); in vfs_domount() 1522 error = vn_path_to_global_path(td, vp, pathbuf, in vfs_domount() 1526 nd.ni_dvp, pathbuf, MNAMELEN, in vfs_domount() 1529 error = vfs_domount_first(td, vfsp, pathbuf, vp, in vfs_domount() 1532 free(pathbuf, M_TEMP); in vfs_domount() 1569 char *pathbuf; in kern_unmount() local 1579 pathbuf = malloc(MNAMELEN, M_TEMP, M_WAITOK); in kern_unmount() 1580 error = copyinstr(path, pathbuf, MNAMELEN, NULL); in kern_unmount() [all …]
|
| /freebsd-13-stable/bin/ps/ |
| HD | ps.c | 852 char pathbuf[PATH_MAX], pathbuf2[PATH_MAX], pathbuf3[PATH_MAX]; in addelem_tty() local 868 strlcpy(pathbuf, _PATH_DEV, sizeof(pathbuf)); in addelem_tty() 869 strlcat(pathbuf, elem, sizeof(pathbuf)); in addelem_tty() 870 ttypath = pathbuf; in addelem_tty() 871 if (strncmp(pathbuf, _PATH_TTY, strlen(_PATH_TTY)) == 0) in addelem_tty() 873 if (strncmp(pathbuf, _PATH_PTS, strlen(_PATH_PTS)) == 0) in addelem_tty() 875 if (strcmp(pathbuf, _PATH_CONSOLE) == 0) in addelem_tty()
|
| /freebsd-13-stable/contrib/opie/ |
| HD | opiesu.c | 105 static char pathbuf[sizeof("PATH") + sizeof(DEFAULT_PATH) - 1] = "PATH="; variable 107 static char *cleanenv[] = {userbuf, homebuf, shellbuf, pathbuf, 0, 0}; 274 strcat(pathbuf, DEFAULT_PATH);
|
| /freebsd-13-stable/contrib/bmake/ |
| HD | util.c | 241 char pathbuf[MAXPATHLEN], nextpathbuf[MAXPATHLEN * 2]; in getwd() local 250 pathbuf[MAXPATHLEN - 1] = '\0'; in getwd() 251 pathptr = &pathbuf[MAXPATHLEN - 1]; in getwd()
|