kobject_get_ownership(9)
π kobject_get_ownership (Kernel API Manual, section 9)
okay bestie, gather round, because today we're learning how to snag the sysfs ownership info for a kobject and honestly? it's giving "small function, big container energy" π«Ά
β¨ NAME β¨
kobject_get_ownership β gets the sysfs ownership data for @kobj. literally that's the whole job, no cap π
πΈ SYNOPSIS πΈ
void kobject_get_ownership (const struct kobject *kobj , kuid_t *uid ,
kgid_t *gid );
notice the void bestie β she returns nothing, she just fills things in. main character behavior, honestly π
π ARGUMENTS π
kobjβ the kobject in question. yes, the kobject. the one we're talking about. keep up πuidβ the kernel user ID for sysfs objects. this is where the user ID goes π§gidβ the kernel group ID for sysfs objects. and this is where the group ID goes π
π¦ DESCRIPTION π¦
So what does she actually do? She returns the initial uid/gid pair β the one you should be using when you create the sysfs representation of a given kobject β¨
And when is that a whole thing? Normally it's used to adjust the ownership of objects inside a container π«Ά like, the vibes of "this object lives in a container and needs its own ownership situation" β that's the use case, fr fr.
no extra lore, no secret behavior, that's genuinely it. she's simple, she's iconic, she ate π
π₯ SEE ALSO π₯
Kernel file ./lib/kobject.c β and the whole kobject/kset friend group, because they all roll together π
kobject_namespace(9)kobject_get_path(9)kobject_set_name_vargs(9)kobject_set_name(9)kobject_init(9)kobject_add(9)kobject_init_and_add(9)kobject_rename(9)kobject_move(9)kobject_del(9)kobject_get(9)kobject_put(9)kobject_create(9)kobject_create_and_add(9)kset_init(9)kset_register(9)kset_unregister(9)kset_find_obj(9)kset_create(9)kset_create_and_add(9)
iykyk π
okay that's the page!! this one came from ./lib, dated October 2026, and it's filed under kobject_get_ownership(9) β mwah, go read the source bestie, it's right there πβ¨
π¦ 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