2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-09-01 14:55:10 +00:00

deal with socket types to ignore, handle backward compat for earlier AF_MAX value

This commit is contained in:
Kees Cook
2009-11-11 10:58:57 -08:00
parent 0d2518551f
commit 4173f0a558
2 changed files with 4 additions and 1 deletions

View File

@@ -246,6 +246,8 @@ static struct network_tuple network_mappings[] = {
* hence the wrapping function.
*/
size_t get_af_max() {
/* HACK: declare that version without "create" had a static AF_MAX */
if (!perms_create) return 36;
#if AA_AF_MAX > AF_MAX
return AA_AF_MAX;
#else