[apparmor] [Patch] abstract out the directory walking routine

Steve Beattie steve at nxnw.org
Thu Aug 16 23:48:20 UTC 2012


On Thu, Aug 16, 2012 at 04:23:04PM -0700, John Johansen wrote:
> > parser_misc.c as they're kind of intended to serve the same purpose;
> > helper functions that don't fit in a specific location, but that's not
> > a blocker for this patch.
> > 
> actually my plan was to move things the other way as they got cleaned up.

Yes, that's fine. I don't really care which way a merge goes, I just
don't want two of them.

> > I do wonder if it wouldn't be better to have three versions of this
> > function, one as-is requiring @dir and @name to be non-NULL, and the
> > other two for the single argument version of the functions (I suspect
> > the one with @dir only would be called by the other two, but I haven't
> > thought very hard about it). This would potentially be a little more
> > defensive programming as a caller that meant to pass a non-NULL as one
> > of the arguments but messed up for some reason would generate an error,
> > and not be accepted with unexpected behavior.
> > 
> Hrmmm I'll tinker with it, I am thinking that the others would basically
> be wrapper fns.

Right, my thought as well.

> Okay I'll count that as an acked-by: and send out the tinkering patch
> on top of this.

Thanks for reading my mind and intent. :-)

-- 
Steve Beattie
<sbeattie at ubuntu.com>
http://NxNW.org/~steve/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20120816/20a0189d/attachment.pgp>


More information about the AppArmor mailing list