[apparmor] [PATCH 4/5] Library function to find the apparmorfsfilesystem mount point

Kees Cook kees.cook at canonical.com
Fri Jul 22 14:43:16 UTC 2011


Me and my broken-record on being extra paranoid with input argument
tests...

On Thu, Jul 21, 2011 at 01:31:56PM -0700, John Johansen wrote:
> +int aa_find_mountpoint(char **mnt)
> +{
> +	struct stat statbuf;
> +	struct mntent *mntpt;
> +	FILE *mntfile;
> +	int rc = -1;

Good idea to check mnt!=NULL here...

Otherwise, looks great. I like the early bail-out check for the default
path.

-Kees

-- 
Kees Cook
Ubuntu Security Team



More information about the AppArmor mailing list