cred_fscmp(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

Hiii bestie!! Welcome to cred_fscmp(9) from the Kernel API Manual β€” this is the page all about Compare two credentials with respect to filesystem access. It's giving kernel credential comparison realness, and we're gonna get into it πŸ¦‹βœ¨


✨ SYNOPSIS ✨

int cred_fscmp (const struct cred *a , const struct cred *b );

πŸŽ€ ARGUMENTS πŸŽ€

  • a β€” the first credential, aka the first bestie in this comparison πŸ’…
  • b β€” the second credential, aka the other bestie in this comparison πŸ’…

🌸 DESCRIPTION 🌸

Okay so here's the tea: the description says cred_cmp will return zero if both credentials have the same fsuid, fsgid, and supplementary groups. Yes, the page literally says cred_cmp there β€” I'm not renaming it, bestie πŸ’€

That is, if they will both provide the same access to files based on mode/uid/gid. Same access, same vibe, no cap ✨

If the credentials are different, then either -1 or 1 will be returned depending on whether a comes before or after b respectively in an arbitrary, but stable, ordering of credentials. Arbitrary but stable is the whole ordering moment, and I'm obsessed πŸ”₯


πŸ‘‘ RETURN πŸ‘‘

  • -1, 0, or 1 depending on comparison.

That's the return section, periodt πŸ’…


🌈 SEE ALSO 🌈

The SEE ALSO squad is the Kernel file ./kernel/cred.c, plus these icons:


xoxo, your kernel bestie πŸ’– β€” brought to you by source ./kernel, dated October 2026, and signed cred_fscmp(9) at the very end βœ¨πŸŽ€

πŸ“¦ where this page comes from