[apparmor] [PATCH] define PATH_MAX when missing from limits.h
Steve Beattie
steve at nxnw.org
Fri May 27 21:15:06 UTC 2011
On Fri, May 27, 2011 at 02:10:16PM -0700, Kees Cook wrote:
> Some non-Linux systems do not define PATH_MAX (Hurd). Since I have no
> interest in supporting a fully dynamic PATH_MAX in AppArmor, work around
> this by just defining a static value that matches Linux's limits.h value.
Acked-By: Steve Beattie <sbeattie at ubuntu.com>
> === modified file 'libraries/libapparmor/src/kernel_interface.c'
> --- libraries/libapparmor/src/kernel_interface.c 2011-05-02 20:38:12 +0000
> +++ libraries/libapparmor/src/kernel_interface.c 2011-05-27 21:08:42 +0000
> @@ -27,6 +27,11 @@
> #include <limits.h>
> #include <stdarg.h>
>
> +/* some non-Linux systems do not define a static value */
> +#ifndef PATH_MAX
> +# define PATH_MAX 4096
> +#endif
> +
> #define symbol_version(real, name, version) \
> __asm__ (".symver " #real "," #name "@" #version)
> #define default_symbol_version(real, name, version) \
--
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/20110527/8bf24b43/attachment.pgp>
More information about the AppArmor
mailing list