MCPcopy Create free account
hub / github.com/F-Stack/f-stack / open_file

Function open_file

freebsd/security/mac_veriexec_parser/mac_veriexec_parser.c:236–252  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

234}
235
236static int
237open_file(const char *path, struct nameidata *nid)
238{
239 int flags, rc;
240
241 flags = FREAD;
242
243 pwd_ensure_dirs();
244
245 NDINIT(nid, LOOKUP, 0, UIO_SYSSPACE, path, curthread);
246 rc = vn_open(nid, &flags, 0, NULL);
247 NDFREE(nid, NDF_ONLY_PNBUF);
248 if (rc != 0)
249 return (rc);
250
251 return (0);
252}
253
254/*
255 * Read the manifest from location specified in path and verify its digest.

Callers 2

read_manifestFunction · 0.70
parse_entryFunction · 0.70

Calls 3

pwd_ensure_dirsFunction · 0.85
NDFREEFunction · 0.85
vn_openFunction · 0.50

Tested by

no test coverage detected