[apparmor] [PATCH 1/3] Generate the features list from the features directory
Kees Cook
kees at ubuntu.com
Wed Feb 22 23:18:35 UTC 2012
On Wed, Feb 22, 2012 at 03:04:56PM -0800, John Johansen wrote:
> +static char *handle_features_dir(const char *filename, char **buffer, int size,
> + char *pos)
> [...]
> + flags_string = malloc(1024);
> + handle_features_dir(FLAGS_FILE, &flags_string, 2048, flags_string);
Shouldn't that 1024 be 2048, or vice versa?
> + if (strstr(flags_string, "network"))
> + kernel_supports_network = 1;
> + if (strstr(flags_string, "mount"))
> + kernel_supports_mount = 1;
Looks like you were going for a more complex flags_string in the function,
but then just did a quick check for things here instead?
-Kees
--
Kees Cook
More information about the AppArmor
mailing list