Home
last modified time | relevance | path

Searched refs:pathbuf (Results 1 – 25 of 31) sorted by relevance

12

/freebsd-14-stable/sbin/kldconfig/
HDkldconfig.c144 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-14-stable/contrib/tcsh/
HDglob.c468 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 …]
HDtc.os.c1218 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-14-stable/contrib/openpam/lib/libpam/
HDopenpam_check_owner_perms.c102 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-14-stable/usr.sbin/pw/
HDgrupd.c41 static char pathbuf[MAXPATHLEN]; in getgrpath() local
43 snprintf(pathbuf, sizeof pathbuf, "%s/%s", conf.etcpath, file); in getgrpath()
45 return (pathbuf); in getgrpath()
HDpwupd.c45 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-14-stable/crypto/heimdal/lib/roken/
HDglob.c496 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-14-stable/usr.bin/mail/
HDfio.c66 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-14-stable/crypto/openssh/openbsd-compat/
HDglob.c616 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-14-stable/contrib/ncurses/ncurses/tinfo/
HDread_termcap.c793 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 (int) (sizeof(pathbuf) - sizeof(PRIVATE_CAP)), in _nc_read_termcap_entry()
1077 ADD_TC(pathbuf, filecount); in _nc_read_termcap_entry()
/freebsd-14-stable/lib/libc/gen/
HDglob.c628 Char pathbuf[MAXPATHLEN]; in glob1() local
633 return (glob2(pathbuf, pathbuf, pathbuf + MAXPATHLEN - 1, in glob1()
643 glob2(Char *pathbuf, Char *pathend, Char *pathend_last, Char *pattern, in glob2() argument
657 if (g_lstat(pathbuf, &sb, pglob)) in glob2()
669 g_stat(pathbuf, &sb, pglob) == 0 && in glob2()
679 return (globextend(pathbuf, pglob, limit, NULL)); in glob2()
706 return (glob3(pathbuf, pathend, pathend_last, pattern, in glob2()
713 glob3(Char *pathbuf, Char *pathend, Char *pathend_last, in glob3() argument
730 g_Ctoc(pathbuf, buf, sizeof(buf))) { in glob3()
737 if ((dirp = g_opendir(pathbuf, pglob)) == NULL) { in glob3()
[all …]
HDglob-compat11.c595 Char pathbuf[MAXPATHLEN]; in glob1() local
600 return (glob2(pathbuf, pathbuf, pathbuf + MAXPATHLEN - 1, in glob1()
610 glob2(Char *pathbuf, Char *pathend, Char *pathend_last, Char *pattern, in glob2() argument
624 if (g_lstat(pathbuf, &sb, pglob)) in glob2()
636 g_stat(pathbuf, &sb, pglob) == 0 && in glob2()
646 return (globextend(pathbuf, pglob, limit, NULL)); in glob2()
673 return (glob3(pathbuf, pathend, pathend_last, pattern, in glob2()
680 glob3(Char *pathbuf, Char *pathend, Char *pathend_last, in glob3() argument
697 g_Ctoc(pathbuf, buf, sizeof(buf))) { in glob3()
704 if ((dirp = g_opendir(pathbuf, pglob)) == NULL) { in glob3()
[all …]
/freebsd-14-stable/sbin/fsck_ffs/
HDpass2.c69 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()
HDdir.c435 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()
HDinode.c74 char pathbuf[MAXPATHLEN + 1]; in ckinode() local
108 getpathname(pathbuf, idesc->id_number, in ckinode()
111 pathbuf); in ckinode()
149 getpathname(pathbuf, idesc->id_number, in ckinode()
152 pathbuf); in ckinode()
180 char pathbuf[MAXPATHLEN + 1]; in iblock() local
235 getpathname(pathbuf, idesc->id_number, in iblock()
238 pathbuf); in iblock()
/freebsd-14-stable/contrib/sendmail/smrsh/
HDsmrsh.c151 char pathbuf[1000]; local
163 (void) sm_strlcpyn(pathbuf, sizeof pathbuf, 2, "PATH=", PATH);
164 newenv[0] = pathbuf;
/freebsd-14-stable/usr.bin/rpcgen/
HDrpc_main.c80 static char pathbuf[MAXPATHLEN + 1]; variable
1235 if (strlcpy(pathbuf, argv[i], in parseargs()
1236 sizeof(pathbuf)) >= sizeof(pathbuf) in parseargs()
1237 || strlcat(pathbuf, "/cpp", in parseargs()
1238 sizeof(pathbuf)) >= in parseargs()
1239 sizeof(pathbuf)) { in parseargs()
1243 CPP = pathbuf; in parseargs()
/freebsd-14-stable/libexec/rtld-elf/
HDlibmap.c412 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-14-stable/lib/libdpv/
HDdpv.c67 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-14-stable/contrib/ntp/util/
HDntp-keygen.c324 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-14-stable/sys/contrib/openzfs/cmd/zed/agents/
HDzfs_mod.c208 char pathbuf[PATH_MAX]; in zfs_process_add() local
383 if (realpath(rawpath, pathbuf) == NULL && !is_mpath_wholedisk) { in zfs_process_add()
443 leafname = strrchr(pathbuf, '/') + 1; in zfs_process_add()
521 (void) snprintf(pathbuf, sizeof (pathbuf), "%s%s", in zfs_process_add()
524 "replaced by '%s'", path, pathbuf); in zfs_process_add()
525 path = pathbuf; in zfs_process_add()
/freebsd-14-stable/contrib/bmake/
HDutil.c241 char pathbuf[MAXPATHLEN], nextpathbuf[MAXPATHLEN * 2]; in getwd() local
250 pathbuf[MAXPATHLEN - 1] = '\0'; in getwd()
251 pathptr = &pathbuf[MAXPATHLEN - 1]; in getwd()
/freebsd-14-stable/sys/kern/
HDvfs_mount.c1597 char *pathbuf; in vfs_domount() local
1673 pathbuf = malloc(MNAMELEN, M_TEMP, M_WAITOK); in vfs_domount()
1674 strcpy(pathbuf, fspath); in vfs_domount()
1681 error = vn_path_to_global_path(td, vp, pathbuf, in vfs_domount()
1685 nd.ni_dvp, pathbuf, MNAMELEN, in vfs_domount()
1688 error = vfs_domount_first(td, vfsp, pathbuf, vp, in vfs_domount()
1691 free(pathbuf, M_TEMP); in vfs_domount()
1728 char *fsidbuf, *pathbuf; in kern_unmount() local
1760 pathbuf = malloc(MNAMELEN, M_TEMP, M_WAITOK); in kern_unmount()
1761 error = copyinstr(path, pathbuf, MNAMELEN, NULL); in kern_unmount()
[all …]
/freebsd-14-stable/contrib/mtree/
HDspec.c436 static char pathbuf[4*MAXPATHLEN + 1]; in vispath() local
439 strsvis(pathbuf, path, VIS_CSTYLE, extra); in vispath()
441 strsvis(pathbuf, path, VIS_OCTAL, extra_glob); in vispath()
442 return pathbuf; in vispath()
/freebsd-14-stable/contrib/ntp/ntpd/
HDntp_crypto.c3443 char pathbuf[MAXFILENAME]; in cert_parse() local
3475 X509_NAME_oneline(X509_get_subject_name(cert), pathbuf, in cert_parse()
3476 sizeof(pathbuf)); in cert_parse()
3477 pch = strstr(pathbuf, "CN="); in cert_parse()
3480 pathbuf); in cert_parse()
3498 X509_NAME_oneline(X509_get_issuer_name(cert), pathbuf, in cert_parse()
3499 sizeof(pathbuf)); in cert_parse()
3500 if ((pch = strstr(pathbuf, "CN=")) == NULL) { in cert_parse()
3502 pathbuf); in cert_parse()
3538 BIO_gets(bp, pathbuf, sizeof(pathbuf)); in cert_parse()
[all …]

12