Home
last modified time | relevance | path

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

1234

/netbsd-src/external/bsd/openpam/dist/lib/libpam/
H A Dopenpam_check_owner_perms.c107 char pathbuf[PATH_MAX]; in openpam_check_path_owner_perms() local
115 if (realpath(path, pathbuf) == NULL) in openpam_check_path_owner_perms()
117 len = strlen(pathbuf); in openpam_check_path_owner_perms()
119 if (stat(pathbuf, &sb) != 0) { in openpam_check_path_owner_perms()
122 openpam_log(PAM_LOG_ERROR, "%s: %m", pathbuf); in openpam_check_path_owner_perms()
129 "%s: not a regular file", pathbuf); in openpam_check_path_owner_perms()
136 "%s: insecure ownership or permissions", pathbuf); in openpam_check_path_owner_perms()
140 while (--len > 0 && pathbuf[len] != '/') in openpam_check_path_owner_perms()
141 pathbuf[len] = '\0'; in openpam_check_path_owner_perms()
/netbsd-src/sys/sys/
H A Dnamei.h71 struct pathbuf;
73 struct pathbuf *pathbuf_create(const char *path);
74 struct pathbuf *pathbuf_assimilate(char *path);
75 int pathbuf_copyin(const char *userpath, struct pathbuf **ret);
76 void pathbuf_destroy(struct pathbuf *);
79 void pathbuf_copystring(const struct pathbuf *, char *buf, size_t maxlen);
82 const char *pathbuf_stringcopy_get(struct pathbuf *);
83 void pathbuf_stringcopy_put(struct pathbuf *, const char *);
86 int pathbuf_maybe_copyin(const char *userpath, enum uio_seg seg, struct pathbuf **ret);
115 struct pathbuf *ni_pathbuf; /* pathname container */
[all …]
H A Dnamei.src51 * To call namei, first set up a pathbuf with pathbuf_create or
54 * pathbuf before you've finished using the nameidata, or mysterious
63 struct pathbuf;
65 struct pathbuf *pathbuf_create(const char *path);
66 struct pathbuf *pathbuf_assimilate(char *path);
67 int pathbuf_copyin(const char *userpath, struct pathbuf **ret);
68 void pathbuf_destroy(struct pathbuf *);
71 void pathbuf_copystring(const struct pathbuf *, char *buf, size_t maxlen);
74 const char *pathbuf_stringcopy_get(struct pathbuf *);
75 void pathbuf_stringcopy_put(struct pathbuf *, const char *);
[all …]
H A Dexec.h100 struct pathbuf; /* from namei.h */
273 struct pathbuf *, char **);
315 struct pathbuf **, size_t *);
H A Dvfs_syscalls.h62 struct pathbuf;
63 int do_open(struct lwp *, struct vnode *, struct pathbuf *, int, int, int *);
/netbsd-src/external/mpl/bind/dist/fuzz/
H A Ddns_message_checksig.c140 char pathbuf[PATH_MAX]; in cleanup()
149 snprintf(pathbuf, sizeof(pathbuf), "%s/%s", wd, f1); in cleanup()
150 fd = fopen(pathbuf, "w"); in cleanup()
152 fprintf(stderr, "fopen(%s) failed\n", pathbuf); in cleanup()
158 snprintf(pathbuf, sizeof(pathbuf), "%s/%s", wd, f2); in cleanup()
159 fd = fopen(pathbuf, "w"); in cleanup()
161 fprintf(stderr, "fopen(%s) failed\n", pathbuf); in cleanup()
167 snprintf(pathbuf, sizeo in cleanup()
132 char pathbuf[PATH_MAX]; cleanup() local
192 char pathbuf[PATH_MAX]; LLVMFuzzerInitialize() local
[all...]
/netbsd-src/lib/libc/gen/
H A Dglob.c589 Char pathbuf[MAXPATHLEN+1]; in glob1() local
601 return glob2(pathbuf, pathbuf, in glob1()
602 pathbuf + (sizeof(pathbuf) / sizeof(*pathbuf)) - 1, pattern, in glob1()
612 glob2(Char *pathbuf, Char *pathend, Char *pathlim, const Char *pattern, in glob2() argument
620 _DIAGASSERT(pathbuf != NULL); in glob2()
626 qprintf("glob2", pathbuf); in glob2()
635 if (g_lstat(pathbuf, &sb, pglob)) in glob2()
648 (g_stat(pathbuf, &sb, pglob) == 0) && in glob2()
656 return globextend(pathbuf, pglob, limit); in glob2()
679 return glob3(pathbuf, pathend, pathlim, pattern, p, in glob2()
[all …]
/netbsd-src/bin/ln/
H A Dln.c191 char pathbuf[PATH_MAX]; in samedirent() local
211 memcpy(pathbuf, ".", 2); in samedirent()
213 memcpy(pathbuf, path1, file1 - path1); in samedirent()
214 pathbuf[file1 - path1] = '\0'; in samedirent()
216 if (stat(pathbuf, &sb1) != 0) in samedirent()
219 memcpy(pathbuf, ".", 2); in samedirent()
221 memcpy(pathbuf, path2, file2 - path2); in samedirent()
222 pathbuf[file2 - path2] = '\0'; in samedirent()
224 if (stat(pathbuf, &sb2) != 0) in samedirent()
/netbsd-src/sys/stand/efiboot/
H A Dboot.c155 bootcfg_path(char *pathbuf, size_t pathbuflen) in bootcfg_path() argument
164 efi_file_path(efi_bootdp, BOOTCFG_FILENAME, pathbuf, pathbuflen)) in bootcfg_path()
165 snprintf(pathbuf, pathbuflen, "%s:%s", default_device, in bootcfg_path()
397 char pathbuf[80]; in command_version() local
414 if (bootcfg_path(pathbuf, sizeof(pathbuf)) == 0) { in command_version()
415 command_printtab("Config path", "%s\n", pathbuf); in command_version()
569 char pathbuf[80]; in boot() local
572 if (bootcfg_path(pathbuf, sizeof(pathbuf)) == 0) { in boot()
574 parsebootconf(pathbuf); in boot()
/netbsd-src/usr.bin/mail/
H A Dtemp.c54 char pathbuf[MAXPATHLEN]; in tinit() local
90 if (getcwd(pathbuf, sizeof(pathbuf)) != NULL) in tinit()
91 origdir = savestr(pathbuf); in tinit()
/netbsd-src/crypto/external/bsd/heimdal/dist/lib/roken/
H A Dglob.c498 Char pathbuf[MaxPathLen+1]; in glob1() local
503 return(glob2(pathbuf, pathbuf, pattern, pglob, limit)); in glob1()
521 glob2(Char *pathbuf, Char *pathend, Char *pattern, glob_t *pglob, in glob2() argument
535 if (g_lstat(pathbuf, &sb, pglob)) in glob2()
541 (g_stat(pathbuf, &sb, pglob) == 0) && in glob2()
547 return(globextend(pathbuf, pglob, limit)); in glob2()
565 return(glob3(pathbuf, pathend, pattern, p, pglob, in glob2()
572 glob3(Char *pathbuf, Char *pathend, Char *pattern, Char *restpattern, in glob3() argument
591 if ((dirp = g_opendir(pathbuf, pglob)) == NULL) { in glob3()
594 g_Ctoc(pathbuf, buf); in glob3()
[all …]
/netbsd-src/sbin/fsck_lfs/
H A Dinode.c132 char pathbuf[MAXPATHLEN + 1]; in ckinode() local
165 getpathname(pathbuf, sizeof(pathbuf), in ckinode()
168 pathbuf, (long long)idesc->id_number); in ckinode()
205 getpathname(pathbuf, sizeof(pathbuf), in ckinode()
208 pathbuf, (long long)idesc->id_number); in ckinode()
238 char pathbuf[MAXPATHLEN + 1], buf[BUFSIZ]; in iblock() local
301 getpathname(pathbuf, sizeof(pathbuf), in iblock()
304 pathbuf, (long long)idesc->id_number); in iblock()
H A Dpass2.c70 char pathbuf[MAXPATHLEN + 1]; in pass2() local
149 getpathname(pathbuf, sizeof(pathbuf), inp->i_number, in pass2()
152 pathbuf, (unsigned long) inp->i_isize, LFS_DIRBLKSIZ); in pass2()
223 char pathbuf[MAXPATHLEN + 1]; in pass2check() local
419 getpathname(pathbuf, sizeof(pathbuf), in pass2check()
424 pwarn("%s %s %s\n", pathbuf, in pass2check()
H A Ddir.c305 char pathbuf[MAXPATHLEN + 1]; in fileerror() local
312 getpathname(pathbuf, sizeof(pathbuf), cwd, ino); in fileerror()
314 pfatal("NAME=%s\n", pathbuf); in fileerror()
324 "DIR" : "FILE", pathbuf); in fileerror()
326 pfatal("NAME=%s\n", pathbuf); in fileerror()
555 char pathbuf[MAXPATHLEN + 1]; in makeentry() local
579 getpathname(pathbuf, sizeof(pathbuf), parent, parent); in makeentry()
582 if (expanddir(vp, dp, pathbuf) == 0) in makeentry()
/netbsd-src/sbin/fsck_ext2fs/
H A Dinode.c174 char pathbuf[MAXPATHLEN + 1]; in ckinode() local
192 getpathname(pathbuf, sizeof(pathbuf), in ckinode()
195 pathbuf); in ckinode()
229 getpathname(pathbuf, sizeof(pathbuf), in ckinode()
232 pathbuf); in ckinode()
262 char pathbuf[MAXPATHLEN + 1]; in iblock() local
312 getpathname(pathbuf, sizeof(pathbuf), in iblock()
315 pathbuf); in iblock()
H A Dpass2.c95 char pathbuf[MAXPATHLEN + 1]; in pass2() local
166 getpathname(pathbuf, sizeof(pathbuf), inp->i_number, in pass2()
169 pathbuf, (u_long)inp->i_isize, sblock.e2fs_bsize); in pass2()
232 char pathbuf[MAXPATHLEN + 1]; in pass2check() local
417 getpathname(pathbuf, sizeof(pathbuf), in pass2check()
422 pwarn("%s %s %s\n", pathbuf, in pass2check()
H A Ddir.c300 char pathbuf[MAXPATHLEN + 1]; in fileerror() local
305 getpathname(pathbuf, sizeof(pathbuf), cwd, ino); in fileerror()
307 pfatal("NAME=%s\n", pathbuf); in fileerror()
313 (fs2h16(dp->e2di_mode) & IFMT) == IFDIR ? "DIR" : "FILE", pathbuf); in fileerror()
315 pfatal("NAME=%s\n", pathbuf); in fileerror()
524 char pathbuf[MAXPATHLEN + 1]; in makeentry() local
544 getpathname(pathbuf, sizeof(pathbuf), parent, parent); in makeentry()
546 if (expanddir(dp, pathbuf) == 0) in makeentry()
/netbsd-src/bin/ps/
H A Dps.c156 char pathbuf[MAXPATHLEN]; in ttyname2dev() local
170 (void)snprintf(pathbuf, in ttyname2dev()
171 sizeof(pathbuf), "%s%s", _PATH_DEV, ttname); in ttyname2dev()
172 ttypath = pathbuf; in ttyname2dev()
174 (void)snprintf(pathbuf, in ttyname2dev()
175 sizeof(pathbuf), "%s%s", _PATH_TTY, ttname); in ttyname2dev()
176 ttypath = pathbuf; in ttyname2dev()
189 snprintf(pathbuf, sizeof(pathbuf), "pts/%d", ptsminor); in ttyname2dev()
190 if (strcmp(pathbuf, ttname) == 0 && ptsminor >= 0) in ttyname2dev()
/netbsd-src/sbin/fsck_ffs/
H A Dpass2.c76 char pathbuf[MAXPATHLEN + 1]; in pass2() local
174 getpathname(pathbuf, sizeof(pathbuf), inp->i_number, in pass2()
178 "DIRECTORY", pathbuf, in pass2()
182 "DIRECTORY", pathbuf, in pass2()
334 char pathbuf[MAXPATHLEN + 1]; local
596 getpathname(pathbuf, sizeof(pathbuf),
600 pwarn("%s %s %s\n", pathbuf,
H A Ddir.c423 char pathbuf[MAXPATHLEN + 1]; in fileerror() local
429 getpathname(pathbuf, sizeof(pathbuf), cwd, ino); in fileerror()
431 pfatal("NAME=%s\n", pathbuf); in fileerror()
438 (iswap16(mode) & IFMT) == IFDIR ? "DIR" : "FILE", pathbuf); in fileerror()
441 pfatal("NAME=%s\n", pathbuf); in fileerror()
717 char pathbuf[MAXPATHLEN + 1]; in makeentry() local
739 getpathname(pathbuf, sizeof(pathbuf), parent, parent); in makeentry()
741 if (expanddir(dp, pathbuf) == 0) in makeentry()
H A Dinode.c81 char pathbuf[MAXPATHLEN + 1]; in ckinode() local
109 getpathname(pathbuf, sizeof(pathbuf), in ckinode()
112 pathbuf); in ckinode()
152 getpathname(pathbuf, sizeof(pathbuf), in ckinode()
155 pathbuf); in ckinode()
183 char pathbuf[MAXPATHLEN + 1]; in iblock() local
248 getpathname(pathbuf, sizeof(pathbuf), in iblock()
251 pathbuf); in iblock()
/netbsd-src/sys/kern/
H A Dvfs_lookup.c238 * first create a pathbuf and adjust all the bells and whistles on it
242 struct pathbuf {
248 static struct pathbuf * in pathbuf_create_raw()
251 struct pathbuf *pb; in pathbuf_create_raw()
265 pathbuf_destroy(struct pathbuf *pb) in pathbuf_destroy()
274 struct pathbuf * in pathbuf_assimilate()
277 struct pathbuf *pb; in pathbuf_assimilate()
286 struct pathbuf * in pathbuf_create()
289 struct pathbuf *pb; in pathbuf_create()
306 pathbuf_copyin(const char *userpath, struct pathbuf **re in pathbuf_copyin()
239 struct pathbuf { global() struct
245 pb_pathcopyusespathbuf global() argument
[all...]
/netbsd-src/lib/libterminfo/
H A Dterm.c325 char pathbuf[PATH_MAX]; in _ti_dbgettermp() local
335 if (l != 0 && l + 1 < sizeof(pathbuf)) { in _ti_dbgettermp()
336 memcpy(pathbuf, p, l); in _ti_dbgettermp()
337 pathbuf[l] = '\0'; in _ti_dbgettermp()
338 r = _ti_dbgetterm(term, pathbuf, name, flags); in _ti_dbgettermp()
/netbsd-src/external/mpl/bind/dist/tests/dns/
H A Dgeoip_test.c71 char pathbuf[PATH_MAX]; in open_geoip2()
74 snprintf(pathbuf, sizeof(pathbuf), "%s/%s", dir, dbfile); in open_geoip2()
75 ret = MMDB_open(pathbuf, MMDB_MODE_MMAP, mmdb); in open_geoip2()
72 char pathbuf[PATH_MAX]; open_geoip2() local
/netbsd-src/external/cddl/osnet/dist/cmd/zlook/
H A 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()

1234