Home
last modified time | relevance | path

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

12

/freebsd-10-stable/sbin/kldconfig/
Dkldconfig.c153 char pathbuf[MAXPATHLEN+1]; in addpath() local
162 if (realpath(path, pathbuf) == NULL) in addpath()
163 strlcpy(pathbuf, path, sizeof(pathbuf)); in addpath()
165 len = strlen(pathbuf); in addpath()
168 if ((len == 0) || (pathbuf[len-1] != '/')) { in addpath()
169 if (len == sizeof(pathbuf) - 1) in addpath()
170 errx(1, "path too long: %s", pathbuf); in addpath()
171 pathbuf[len] = '/'; in addpath()
175 if ((len > 0) && (pathbuf[len-1] == '/')) in addpath()
176 pathbuf[--len] = '\0'; in addpath()
[all …]
/freebsd-10-stable/contrib/tcsh/
Dglob.c465 struct strbuf pathbuf = strbuf_INIT; in glob1() local
473 err = glob2(&pathbuf, pattern, pglob, no_match); in glob1()
474 xfree(pathbuf.s); in glob1()
484 glob2(struct strbuf *pathbuf, const Char *pattern, glob_t *pglob, int no_match) in glob2() argument
498 strbuf_terminate(pathbuf); in glob2()
500 if (Lstat(pathbuf->s, &sbuf)) in glob2()
504 pathbuf->s[pathbuf->len - 1] != SEP) && in glob2()
508 (Stat(pathbuf->s, &sbuf) == 0) && in glob2()
512 strbuf_append1(pathbuf, SEP); in glob2()
513 strbuf_terminate(pathbuf); in glob2()
[all …]
Dtc.os.c1222 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-10-stable/contrib/openpam/lib/libpam/
Dopenpam_check_owner_perms.c104 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-10-stable/lib/ncurses/ncurses/
Dtermcap.c108 char pathbuf[PBUFSIZ]; /* holds raw path of filenames */ in _nc_read_termcap_entry() local
117 p = pathbuf; in _nc_read_termcap_entry()
131 strncpy(pathbuf, termpath, PBUFSIZ); in _nc_read_termcap_entry()
134 strncpy(pathbuf, home, PBUFSIZ - 1); /* $HOME first */ in _nc_read_termcap_entry()
135 pathbuf[PBUFSIZ - 2] = '\0'; /* -2 because we add a slash */ in _nc_read_termcap_entry()
136 p += strlen(pathbuf); /* path, looking in */ in _nc_read_termcap_entry()
139 strncpy(p, _PATH_DEF, PBUFSIZ - (p - pathbuf)); in _nc_read_termcap_entry()
143 strncpy(pathbuf, cp, PBUFSIZ); /* still can be tokenized */ in _nc_read_termcap_entry()
147 strcpy(pathbuf, _PATH_DEF_SEC); in _nc_read_termcap_entry()
149 pathbuf[PBUFSIZ - 1] = '\0'; in _nc_read_termcap_entry()
[all …]
/freebsd-10-stable/bin/ln/
Dln.c184 char pathbuf[PATH_MAX]; in samedirent() local
204 memcpy(pathbuf, ".", 2); in samedirent()
206 memcpy(pathbuf, path1, file1 - path1); in samedirent()
207 pathbuf[file1 - path1] = '\0'; in samedirent()
209 if (stat(pathbuf, &sb1) != 0) in samedirent()
212 memcpy(pathbuf, ".", 2); in samedirent()
214 memcpy(pathbuf, path2, file2 - path2); in samedirent()
215 pathbuf[file2 - path2] = '\0'; in samedirent()
217 if (stat(pathbuf, &sb2) != 0) in samedirent()
/freebsd-10-stable/usr.sbin/pw/
Dgrupd.c44 static char pathbuf[MAXPATHLEN]; in getgrpath() local
46 snprintf(pathbuf, sizeof pathbuf, "%s/%s", conf.etcpath, file); in getgrpath()
48 return (pathbuf); in getgrpath()
Dpwupd.c48 static char pathbuf[MAXPATHLEN]; in getpwpath() local
50 snprintf(pathbuf, sizeof pathbuf, "%s/%s", conf.etcpath, file); in getpwpath()
52 return (pathbuf); in getpwpath()
/freebsd-10-stable/crypto/heimdal/lib/roken/
Dglob.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-10-stable/crypto/openssh/openbsd-compat/
Dglob.c612 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,
696 glob3(Char *pathbuf, Char *pathbuf_last, Char *pathend, Char *pathend_last, argument
718 if ((dirp = g_opendir(pathbuf, pglob)) == NULL) {
[all …]
/freebsd-10-stable/sbin/fsck_ffs/
Dpass2.c68 char pathbuf[MAXPATHLEN + 1]; in pass2() local
162 getpathname(pathbuf, inp->i_number, inp->i_number); in pass2()
165 "DIRECTORY", pathbuf, in pass2()
169 "DIRECTORY", pathbuf, in pass2()
225 getpathname(pathbuf, inp->i_parent, inp->i_number); in pass2()
227 (uintmax_t)inp->i_number, pathbuf); in pass2()
228 getpathname(pathbuf, inp->i_dotdot, inp->i_dotdot); in pass2()
230 (uintmax_t)inp->i_dotdot, pathbuf); in pass2()
231 getpathname(pathbuf, inp->i_parent, inp->i_parent); in pass2()
233 (uintmax_t)inp->i_parent, pathbuf); in pass2()
Ddir.c251 char pathbuf[MAXPATHLEN + 1]; in fileerror() local
256 getpathname(pathbuf, cwd, ino); in fileerror()
258 pfatal("NAME=%s\n", pathbuf); in fileerror()
265 pathbuf); in fileerror()
267 pfatal("NAME=%s\n", pathbuf); in fileerror()
519 char pathbuf[MAXPATHLEN + 1]; in makeentry() local
538 getpathname(pathbuf, parent, parent); in makeentry()
540 if (expanddir(dp, pathbuf) == 0) in makeentry()
Dinode.c65 char pathbuf[MAXPATHLEN + 1]; in ckinode() local
92 getpathname(pathbuf, idesc->id_number, in ckinode()
95 pathbuf); in ckinode()
131 getpathname(pathbuf, idesc->id_number, in ckinode()
134 pathbuf); in ckinode()
160 char pathbuf[MAXPATHLEN + 1]; in iblock() local
210 getpathname(pathbuf, idesc->id_number, in iblock()
213 pathbuf); in iblock()
/freebsd-10-stable/usr.bin/mail/
Dfio.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-10-stable/lib/libc/gen/
Dglob.c630 Char pathbuf[MAXPATHLEN]; in glob1() local
635 return (glob2(pathbuf, pathbuf, pathbuf + MAXPATHLEN - 1, in glob1()
645 glob2(Char *pathbuf, Char *pathend, Char *pathend_last, Char *pattern, in glob2() argument
659 if (g_lstat(pathbuf, &sb, pglob)) in glob2()
671 g_stat(pathbuf, &sb, pglob) == 0 && in glob2()
681 return (globextend(pathbuf, pglob, limit, NULL)); in glob2()
708 return (glob3(pathbuf, pathend, pathend_last, pattern, in glob2()
715 glob3(Char *pathbuf, Char *pathend, Char *pathend_last, in glob3() argument
732 g_Ctoc(pathbuf, buf, sizeof(buf))) { in glob3()
739 if ((dirp = g_opendir(pathbuf, pglob)) == NULL) { in glob3()
[all …]
/freebsd-10-stable/contrib/sendmail/smrsh/
Dsmrsh.c151 char pathbuf[1000]; local
163 (void) sm_strlcpyn(pathbuf, sizeof pathbuf, 2, "PATH=", PATH);
164 newenv[0] = pathbuf;
/freebsd-10-stable/contrib/ncurses/ncurses/tinfo/
Dread_termcap.c778 char pathbuf[PBUFSIZ]; /* holds raw path of filenames */ in _nc_tgetent() local
787 p = pathbuf; in _nc_tgetent()
799 _nc_str_init(&desc, pathbuf, sizeof(pathbuf)); in _nc_tgetent()
823 *fname++ = pathbuf; /* tokenize path into vector of names */ in _nc_tgetent()
1014 char pathbuf[PATH_MAX]; in _nc_read_termcap_entry() local
1049 (void) sprintf(pathbuf, PRIVATE_CAP, envhome); in _nc_read_termcap_entry()
1050 ADD_TC(pathbuf, filecount); in _nc_read_termcap_entry()
/freebsd-10-stable/sys/kern/
Dvfs_mount.c1100 char *pathbuf; in vfs_domount() local
1162 pathbuf = malloc(MNAMELEN, M_TEMP, M_WAITOK); in vfs_domount()
1163 strcpy(pathbuf, fspath); in vfs_domount()
1164 error = vn_path_to_global_path(td, vp, pathbuf, MNAMELEN); in vfs_domount()
1167 error = vfs_domount_first(td, vfsp, pathbuf, vp, in vfs_domount()
1170 free(pathbuf, M_TEMP); in vfs_domount()
1195 char *pathbuf; in sys_unmount() local
1205 pathbuf = malloc(MNAMELEN, M_TEMP, M_WAITOK); in sys_unmount()
1206 error = copyinstr(uap->path, pathbuf, MNAMELEN, NULL); in sys_unmount()
1208 free(pathbuf, M_TEMP); in sys_unmount()
[all …]
/freebsd-10-stable/cddl/contrib/opensolaris/cmd/zlook/
Dzlook.c273 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-10-stable/usr.bin/rpcgen/
Drpc_main.c81 static char pathbuf[MAXPATHLEN + 1]; variable
1134 if (strlcpy(pathbuf, argv[i], in parseargs()
1135 sizeof(pathbuf)) >= sizeof(pathbuf) in parseargs()
1136 || strlcat(pathbuf, "/cpp", in parseargs()
1137 sizeof(pathbuf)) >= in parseargs()
1138 sizeof(pathbuf)) { in parseargs()
1142 CPP = pathbuf; in parseargs()
/freebsd-10-stable/libexec/rtld-elf/
Dlibmap.c402 char pathbuf[64], *s, *t; in lm_findn() local
404 if (n < sizeof(pathbuf) - 1) in lm_findn()
405 s = pathbuf; in lm_findn()
411 if (s != pathbuf) in lm_findn()
/freebsd-10-stable/lib/libdpv/
Ddpv.c69 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-10-stable/contrib/ntp/util/
Dntp-keygen.c320 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-10-stable/bin/ps/
Dps.c812 char pathbuf[PATH_MAX], pathbuf2[PATH_MAX], pathbuf3[PATH_MAX]; in addelem_tty() local
828 strlcpy(pathbuf, _PATH_DEV, sizeof(pathbuf)); in addelem_tty()
829 strlcat(pathbuf, elem, sizeof(pathbuf)); in addelem_tty()
830 ttypath = pathbuf; in addelem_tty()
831 if (strncmp(pathbuf, _PATH_TTY, strlen(_PATH_TTY)) == 0) in addelem_tty()
833 if (strncmp(pathbuf, _PATH_PTS, strlen(_PATH_PTS)) == 0) in addelem_tty()
835 if (strcmp(pathbuf, _PATH_CONSOLE) == 0) in addelem_tty()
/freebsd-10-stable/contrib/opie/
Dopiesu.c105 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);

12