get_cred_many(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– get_cred_many(9) β€” from the Kernel API Manual, bestie ✨

🌸 NAME 🌸

  • get_cred_many β€” Get references on a set of credentials πŸ’…

πŸŽ€ SYNOPSIS πŸŽ€

const struct cred * get_cred_many (const struct cred *cred , int nr );

πŸ¦‹ ARGUMENTS πŸ¦‹

okay so here’s what you’re feeding it:

  • cred β€” The credentials to reference 🫢
  • nr β€” Number of references to acquire ✨

✨ DESCRIPTION ✨

Get references on the specified set of credentials. It’s giving β€œgrab a little bundle of refs” energy. πŸ’–

⚠️ bestie, the caller must release all acquired reference. no cap β€” that part is on you.

If NULL is passed, it is returned with no action. Literally just comes right back to you, zero drama. πŸ™ˆ

This is used to deal with a committed set of credentials. Although the pointer is const, this will temporarily discard the const and increment the usage count. The purpose of this is to attempt to catch at compile time the accidental alteration of a set of credentials that should be considered immutable. πŸ›‘οΈ it’s giving compile-time bodyguard, fr fr.

πŸ’œ RETURN πŸ’œ

cred when the references are acquired, NULL otherwise. iconic little return situation. πŸ‘‘

🌈 SEE ALSO 🌈

Kernel file ./include/linux/cred.h is the home base, and here’s the whole squad πŸ’…:


🌸 that’s the page, bestie! source/version: ./include/linux β€’ date: October 2026 β€’ from the Kernel API Manual, mwah πŸ’‹
πŸ“¦ where this page comes from