get_cred_many(9)
π 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 π
:
get_group_info(9)put_group_info(9)put_cred_many(9)current_cred(9)current_real_cred(9)__task_cred(9)get_current_cred(9)get_current_user(9)get_current_groups(9)
πΈ thatβs the page, bestie! source/version:./include/linuxβ’ date:October 2026β’ from the Kernel API Manual, mwah π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms