MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / fd_regular_current_user

Function fd_regular_current_user

src/daemon/service.c:335–345  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

333}
334
335static bool fd_regular_current_user(int fd, struct stat *status_out) {
336 struct stat status;
337 if (fstat(fd, &status) != 0 || !S_ISREG(status.st_mode) || status.st_uid != geteuid() ||
338 status.st_nlink != 1) {
339 return false;
340 }
341 if (status_out) {
342 *status_out = status;
343 }
344 return true;
345}
346
347static bool fd_regular(int fd, struct stat *status_out) {
348 struct stat status;

Callers 3

posix_lock_file_openFunction · 0.85
posix_log_file_openFunction · 0.85
posix_log_refresh_lockedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected