Skip to content

Commit 365dce2

Browse files
committed
afpd: Log an error when directory has invalid did, GitHub #1893
1 parent 379cef3 commit 365dce2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

etc/afpd/dircache.c

+4
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,10 @@ int dircache_add(const struct vol *vol,
434434
struct dir key;
435435
hnode_t *hn;
436436

437+
LOG(log_error, logtype_afpd,
438+
"dircache_add(): did:%u is less than the allowed %d. Data in \"%s\" may be invalid.",
439+
ntohl(dir->d_did), CNID_START, cfrombstr(dir->d_u_name));
440+
437441
AFP_ASSERT(dir);
438442
AFP_ASSERT(ntohl(dir->d_pdid) >= 2);
439443
AFP_ASSERT(ntohl(dir->d_did) >= CNID_START);

0 commit comments

Comments
 (0)