smack_kernel...ate_files_as(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– smack_kernel_create_files_as(9) πŸ’–

okay so first thing bestie β€” this page lives in the Kernel API Manual, and its actual name is smack_kernel_create_files_as(9). up in the header it gets chopped down to smack_kernel...ate_files_as(9) which is honestly so rude to it 😭 but that's just the title line being dramatic, the real name is the full one, iykyk.


🌸 NAME 🌸

smack_kernel_create_files_as β€” sets the file creation label in a set of creds. that's the whole vibe. it goes in, it sets the label, it leaves. main character energy, no notes ✨


πŸŽ€ SYNOPSIS πŸŽ€

int smack_kernel_create_files_as (struct cred *new , struct inode *inode );

literally that's it. two args, one int coming back at you 🫢


πŸ¦‹ ARGUMENTS πŸ¦‹

  • new β€” points to the set of credentials that are gonna get modified. yes these creds, the ones you handed over. they're getting re-labeled, that's the whole point πŸ’…
  • inode β€” points to the inode you're using as a reference. it's the blueprint, the inspo, the "make it look like that one" 🎯

⭐ DESCRIPTION ⭐

so here's the tea β˜• β€” this function sets the file creation context inside a set of credentials to be the same as the objective context of the inode you passed in.

read that again: the creds get the inode's objective context as their file creation context. matching set. coordinating outfits. that's the entire job, and it ate πŸ”₯


πŸ‘‘ SEE ALSO πŸ‘‘

bestie. buckle up. there are a LOT of friends in this group chat, and every single one of them is invited 🫢

the kernel file is ./security/smack/smack_lsm.c, and here's everyone:

like I said. whole group chat. every single one showed up and honestly? iconic πŸ‘‘


ngl there's genuinely no OPTIONS, no EXIT STATUS, no ENVIRONMENT section on this one β€” it's a kernel API page, it keeps things short and cute. don't go looking for sections that aren't there bestie πŸ’€

and that's the page!! πŸŽ€πŸ’– sign-off time: this one comes from the source path ./security/smack, dated October 2026, and the header/footer versions of the title are the chopped-up smack_kernel...ate_files_as(9). slay, go set some labels πŸ¦‹βœ¨

πŸ“¦ where this page comes from