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

Seth Arnold seth.arnold at gmail.com
Fri Jul 22 21:50:01 UTC 2011


Oh, I _liked_ the quick fast check for the usual case :) I'm just a little concerned that the name doesn't necessarily imply the behavior.
------Original Message------
From: John Johansen
To: Kees Cook
Cc: Seth Arnold
Cc: apparmor at lists.ubuntu.com
Subject: Re: [apparmor] [PATCH 4/5] Library function to find the apparmorfsfilesystemmount point
Sent: Jul 22, 2011 2:01 PM

On 07/22/2011 07:43 AM, Kees Cook wrote:
> 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...
>
yep

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

well I did too but Seth is right that we then don't know whether its
under securityfs or something else.





More information about the AppArmor mailing list