/dflybsd-src/sbin/kldconfig/ |
H A D | kldconfig.c | 145 char pathbuf[MAXPATHLEN+1]; in addpath() local 154 if (realpath(path, pathbuf) == NULL) in addpath() 155 strlcpy(pathbuf, path, sizeof(pathbuf)); in addpath() 157 len = strlen(pathbuf); in addpath() 160 if ((len == 0) || (pathbuf[len-1] != '/')) { in addpath() 161 if (len == sizeof(pathbuf) - 1) in addpath() 162 errx(1, "path too long: %s", pathbuf); in addpath() 163 pathbuf[len] = '/'; in addpath() 167 if ((len > 0) && (pathbuf[len-1] == '/')) in addpath() 168 pathbuf[--len] = '\0'; in addpath() [all …]
|
/dflybsd-src/contrib/tcsh-6/ |
H A D | glob.c | 466 struct strbuf pathbuf = strbuf_INIT; in glob1() local 474 err = glob2(&pathbuf, pattern, pglob, no_match); in glob1() 475 xfree(pathbuf.s); in glob1() 485 glob2(struct strbuf *pathbuf, const Char *pattern, glob_t *pglob, int no_match) in glob2() argument 499 strbuf_terminate(pathbuf); in glob2() 501 if (Lstat(pathbuf->s, &sbuf)) in glob2() 505 pathbuf->s[pathbuf->len - 1] != SEP) && in glob2() 509 (Stat(pathbuf->s, &sbuf) == 0) && in glob2() 513 strbuf_append1(pathbuf, SEP); in glob2() 514 strbuf_terminate(pathbuf); in glob2() [all …]
|
H A D | 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()
|
/dflybsd-src/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()
|
/dflybsd-src/bin/ln/ |
H A D | ln.c | 173 char pathbuf[PATH_MAX]; in samedirent() local 193 memcpy(pathbuf, ".", 2); in samedirent() 195 memcpy(pathbuf, path1, file1 - path1); in samedirent() 196 pathbuf[file1 - path1] = '\0'; in samedirent() 198 if (stat(pathbuf, &sb1) != 0) in samedirent() 201 memcpy(pathbuf, ".", 2); in samedirent() 203 memcpy(pathbuf, path2, file2 - path2); in samedirent() 204 pathbuf[file2 - path2] = '\0'; in samedirent() 206 if (stat(pathbuf, &sb2) != 0) in samedirent()
|
/dflybsd-src/usr.sbin/pw/ |
H A D | grupd.c | 59 static char pathbuf[MAXPATHLEN]; in getgrpath() local 61 snprintf(pathbuf, sizeof pathbuf, "%s/%s", grpath, file); in getgrpath() 62 return pathbuf; in getgrpath()
|
H A D | pwupd.c | 65 static char pathbuf[MAXPATHLEN]; in getpwpath() local 67 snprintf(pathbuf, sizeof pathbuf, "%s/%s", pwpath, file); in getpwpath() 68 return pathbuf; in getpwpath()
|
/dflybsd-src/lib/libc/gen/ |
H A D | glob.c | 561 Char pathbuf[MAXPATHLEN]; in glob1() local 566 return (glob2(pathbuf, pathbuf, pathbuf + MAXPATHLEN - 1, in glob1() 576 glob2(Char *pathbuf, Char *pathend, Char *pathend_last, Char *pattern, in glob2() argument 590 if (g_lstat(pathbuf, &sb, pglob)) in glob2() 605 (g_stat(pathbuf, &sb, pglob) == 0) && in glob2() 613 return (globextend(pathbuf, pglob, limit)); in glob2() 636 return (glob3(pathbuf, pathend, pathend_last, pattern, in glob2() 643 glob3(Char *pathbuf, Char *pathend, Char *pathend_last, in glob3() argument 659 if ((dirp = g_opendir(pathbuf, pglob)) == NULL) { in glob3() 662 if (g_Ctoc(pathbuf, buf, sizeof(buf))) in glob3() [all …]
|
/dflybsd-src/lib/libssh/openbsd-compat/ |
H A D | 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 …]
|
/dflybsd-src/usr.bin/mail/ |
H A D | fio.c | 62 char linebuf[LINESIZE], pathbuf[PATHSIZE]; in setptr() local 66 snprintf(pathbuf, sizeof(pathbuf), "%s/mail.XXXXXXXXXX", tmpdir); in setptr() 67 if ((c = mkstemp(pathbuf)) == -1 || (mestmp = Fdopen(c, "r+")) == NULL) in setptr() 68 err(1, "can't open %s", pathbuf); in setptr() 69 rm(pathbuf); in setptr()
|
/dflybsd-src/sbin/fsck/ |
H A D | pass2.c | 56 char pathbuf[MAXPATHLEN + 1]; in pass2() local 157 getpathname(pathbuf, inp->i_number, inp->i_number); in pass2() 160 "DIRECTORY", pathbuf, inp->i_isize, in pass2() 164 "DIRECTORY", pathbuf, inp->i_isize, in pass2() 232 char pathbuf[MAXPATHLEN + 1]; in pass2check() local 441 getpathname(pathbuf, idesc->id_number, in pass2check() 444 pwarn("%s%s%s %s %s\n", pathbuf, in pass2check() 445 (strcmp(pathbuf, "/") == 0 ? "" : "/"), in pass2check()
|
H A D | inode.c | 65 char pathbuf[MAXPATHLEN + 1]; in ckinode() local 86 getpathname(pathbuf, idesc->id_number, in ckinode() 89 pathbuf); in ckinode() 123 getpathname(pathbuf, idesc->id_number, in ckinode() 126 pathbuf); in ckinode() 154 char pathbuf[MAXPATHLEN + 1]; in iblock() local 201 getpathname(pathbuf, idesc->id_number, in iblock() 204 pathbuf); in iblock()
|
H A D | dir.c | 273 char pathbuf[MAXPATHLEN + 1]; in fileerror() local 278 getpathname(pathbuf, cwd, ino); in fileerror() 280 pfatal("NAME=%s\n", pathbuf); in fileerror() 286 (dp->di_mode & IFMT) == IFDIR ? "DIR" : "FILE", pathbuf); in fileerror() 288 pfatal("NAME=%s\n", pathbuf); in fileerror() 546 char pathbuf[MAXPATHLEN + 1]; in makeentry() local 565 getpathname(pathbuf, parent, parent); in makeentry() 567 if (expanddir(dp, pathbuf) == 0) in makeentry()
|
/dflybsd-src/contrib/ncurses/ncurses/tinfo/ |
H A D | 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()
|
/dflybsd-src/bin/ps/ |
H A D | ps.c | 256 char pathbuf[PATH_MAX]; in main() local 262 snprintf(pathbuf, sizeof(pathbuf), in main() 264 ttypath = pathbuf; in main() 266 snprintf(pathbuf, sizeof(pathbuf), in main() 268 ttypath = pathbuf; in main()
|
/dflybsd-src/libexec/rtld-elf/ |
H A D | libmap.c | 397 char pathbuf[64], *s, *t; in lm_findn() local 399 if (n < sizeof(pathbuf) - 1) in lm_findn() 400 s = pathbuf; in lm_findn() 406 if (s != pathbuf) in lm_findn()
|
/dflybsd-src/usr.bin/rpcgen/ |
H A D | rpc_main.c | 77 static char pathbuf[MAXPATHLEN + 1]; variable 1070 strlcpy(pathbuf, argv[i], sizeof(pathbuf)); in parseargs() 1071 if (strlcat(pathbuf, "/cpp", sizeof(pathbuf)) in parseargs() 1072 >= sizeof(pathbuf)) { in parseargs() 1076 CPP = pathbuf; in parseargs()
|
/dflybsd-src/contrib/bmake/ |
H A D | 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()
|
/dflybsd-src/usr.sbin/mtree/ |
H A D | spec.c | 424 static char pathbuf[4*MAXPATHLEN + 1]; in vispath() local 427 strsvis(pathbuf, path, VIS_CSTYLE, extra); in vispath() 429 strsvis(pathbuf, path, VIS_OCTAL, extra_glob); in vispath() 430 return pathbuf; in vispath()
|
/dflybsd-src/usr.bin/xinstall/ |
H A D | xinstall.c | 595 char backup[MAXPATHLEN], *p, pathbuf[MAXPATHLEN], tempfile[MAXPATHLEN]; in install() local 613 (void)snprintf(pathbuf, sizeof(pathbuf), "%s%s%s", in install() 617 to_name = pathbuf; in install()
|
/dflybsd-src/sys/netgraph/ksocket/ |
H A D | ng_ksocket.c | 326 char pathbuf[SOCK_MAXADDRLEN + 1]; in ng_ksocket_sockaddr_unparse() local 329 bcopy(sun->sun_path, pathbuf, pathlen); in ng_ksocket_sockaddr_unparse() 330 pathbuf[pathlen] = '\0'; in ng_ksocket_sockaddr_unparse() 331 if ((pathtoken = ng_encode_string(pathbuf)) == NULL) in ng_ksocket_sockaddr_unparse()
|
/dflybsd-src/contrib/gdb-7/bfd/ |
H A D | archive.c | 1413 static char *pathbuf = NULL; in adjust_relative_path() local 1489 if (pathbuf != NULL) in adjust_relative_path() 1490 free (pathbuf); in adjust_relative_path() 1492 pathbuf = (char *) bfd_malloc (len); in adjust_relative_path() 1493 if (pathbuf == NULL) in adjust_relative_path() 1498 newp = pathbuf; in adjust_relative_path() 1514 return pathbuf; in adjust_relative_path()
|
/dflybsd-src/contrib/binutils-2.34/bfd/ |
H A D | archive.c | 1370 static char *pathbuf = NULL; in adjust_relative_path() local 1446 if (pathbuf != NULL) in adjust_relative_path() 1447 free (pathbuf); in adjust_relative_path() 1449 pathbuf = (char *) bfd_malloc (len); in adjust_relative_path() 1450 if (pathbuf == NULL) in adjust_relative_path() 1455 newp = pathbuf; in adjust_relative_path() 1471 return pathbuf; in adjust_relative_path()
|
/dflybsd-src/contrib/binutils-2.27/bfd/ |
H A D | archive.c | 1455 static char *pathbuf = NULL; in adjust_relative_path() local 1531 if (pathbuf != NULL) in adjust_relative_path() 1532 free (pathbuf); in adjust_relative_path() 1534 pathbuf = (char *) bfd_malloc (len); in adjust_relative_path() 1535 if (pathbuf == NULL) in adjust_relative_path() 1540 newp = pathbuf; in adjust_relative_path() 1556 return pathbuf; in adjust_relative_path()
|
/dflybsd-src/sys/bus/cam/ |
H A D | cam_periph.c | 505 char pathbuf[32], *periph_name; in camperiphunit() local 510 ksnprintf(pathbuf, sizeof(pathbuf), "scbus%d", pathid); in camperiphunit() 516 if (strcmp(strval, pathbuf) != 0) in camperiphunit()
|