xt_check_proc_name(9)
β¨ xt_check_proc_name(9) β¨
okay so bestie, we're in the Kernel API Manual today and this one's a little function with a big job π
πΈ NAME πΈ
xt_check_proc_name β literally just here to check that name is suitable for /proc file creation π«Ά
π SYNOPSIS π
int xt_check_proc_name (const char *name , unsigned int size );
π ARGUMENTS π
nameβ the file name candidate, like the lil' name your file wants to have π₯Ίsizeβ length of buffer, aka how much room we're working with π
π¦ DESCRIPTION π¦
so some x_tables modules are out here wishing to create a file in /proc, right? and this function is the vibe check for that π it makes sure the name is actually suitable for this purpose β it checks that name is NUL terminated β
and that it isn't a 'special' name, like ".." π (yes, the classic chaos pick, we are NOT letting that through).
returns a negative number on error, or 0 if name is useable π
fr fr, negative = not it, 0 = slay, it's useable π
π₯ SEE ALSO π₯
Kernel file ./net/netfilter/x_tables.c plus the whole friend group: xt_check_entry_offsets(9), xt_alloc_entry_offsets(9), xt_find_jump_offset(9), xt_copy_counters(9), xt_unregister_table_pre_exit(9), xt_unregister_table_exit(9), xt_hook_ops_alloc(9), xt_percpu_counter_alloc(9) π§
okay that's the whole page bestie, no gatekeeping π this one's living in ./net/netfilter and it's dated October 2026 β iconic of it, honestly. go forth and validate your proc names ππΈ
π¦ 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