On Thu, Mar 26, 2015 at 04:47:57PM -0500, Tyler Hicks wrote:
> The _aa_dirat_for_each() function used the DIR * type for its first
> parameter. It then switched back and forth between the directory file
> descriptors, retrieved with dirfd(), and directory streams, retrieved
> with fdopendir(), when making syscalls and calling the call back
> function.
> 
> This patch greatly simplifies the function by simply using directory
> file descriptors. No functionality is lost since callers can still
> easily use the function after calling dirfd() to retrieve the underlying
> file descriptor.
> 
> Signed-off-by: Tyler Hicks <tyhi...@canonical.com>

I like the gist of this patch but I think the parameter shouldn't be named
dirfd; if we ever need the dirent.h header back again, this'll cause no
end of confusion. It'd be safer to just pick a less obvious name, dir_fd
for example.

With a name change,
Acked-by: Seth Arnold <seth.arn...@canonical.com>

Thanks

Attachment: signature.asc
Description: Digital signature

-- 
AppArmor mailing list
AppArmor@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/apparmor

Reply via email to