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

John Johansen john.johansen at canonical.com
Fri Jul 22 21:01:31 UTC 2011


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