Patrick Steinhardt has proposed merging lp:~steinhardtp/apparmor/musl into
lp:apparmor.
Requested reviews:
AppArmor Developers (apparmor-dev)
For more details, see:
https://code.launchpad.net/~steinhardtp/apparmor/musl/+merge/331414
These are changes required to build most of AppArmor with musl libc.
One thing missing right now is a problem with `secure_getenv` in
"libapparmor/src/private.c", where neither `secure_getenv` nor
`__secure_getenv` exist in musl libc as they are GNU extensions only. A
possible fix would be to simply remove the error and replace it with a `#define
secure_genetv getenv`, but I guess this might be rather controversial. So I
refrained from including it in the PR right now.
--
Your team AppArmor Developers is requested to review the proposed merge of
lp:~steinhardtp/apparmor/musl into lp:apparmor.
=== modified file 'libraries/libapparmor/include/sys/apparmor.h'
--- libraries/libapparmor/include/sys/apparmor.h 2016-03-18 22:28:50 +0000
+++ libraries/libapparmor/include/sys/apparmor.h 2017-09-27 09:55:36 +0000
@@ -22,7 +22,9 @@
#include <stdint.h>
#include <sys/types.h>
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
/*
* Class of public mediation types in the AppArmor policy db
@@ -191,6 +193,8 @@
extern int aa_policy_cache_replace_all(aa_policy_cache *policy_cache,
aa_kernel_interface *kernel_interface);
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
#endif /* sys/apparmor.h */
=== modified file 'libraries/libapparmor/include/sys/apparmor_private.h'
--- libraries/libapparmor/include/sys/apparmor_private.h 2015-06-16 20:49:51 +0000
+++ libraries/libapparmor/include/sys/apparmor_private.h 2017-09-27 09:55:36 +0000
@@ -20,7 +20,9 @@
#include <stdio.h>
#include <sys/stat.h>
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
int _aa_is_blacklisted(const char *name);
@@ -33,6 +35,8 @@
int _aa_dirat_for_each(int dirfd, const char *name, void *data,
int (* cb)(int, const char *, struct stat *, void *));
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
#endif /* sys/apparmor_private.h */
=== modified file 'parser/parser_alias.c'
--- parser/parser_alias.c 2014-10-02 19:58:54 +0000
+++ parser/parser_alias.c 2017-09-27 09:55:36 +0000
@@ -25,6 +25,8 @@
#include "parser.h"
#include "profile.h"
+typedef int (*comparison_fn_t)(const void *, const void *);
+
struct alias_rule {
char *from;
char *to;
=== modified file 'parser/parser_include.c'
--- parser/parser_include.c 2015-03-25 22:09:26 +0000
+++ parser/parser_include.c 2017-09-27 09:55:36 +0000
@@ -45,6 +45,7 @@
#include <unistd.h>
#include <errno.h>
#include <dirent.h>
+#include <limits.h>
#include "lib.h"
#include "parser.h"
=== modified file 'parser/parser_misc.c'
--- parser/parser_misc.c 2016-03-19 08:52:45 +0000
+++ parser/parser_misc.c 2017-09-27 09:55:36 +0000
@@ -124,7 +124,9 @@
{"core", RLIMIT_CORE},
{"rss", RLIMIT_RSS},
{"nofile", RLIMIT_NOFILE},
+#ifdef RLIMIT_OFILE
{"ofile", RLIMIT_OFILE},
+#endif
{"as", RLIMIT_AS},
{"nproc", RLIMIT_NPROC},
{"memlock", RLIMIT_MEMLOCK},
=== modified file 'parser/parser_symtab.c'
--- parser/parser_symtab.c 2014-10-02 19:58:54 +0000
+++ parser/parser_symtab.c 2017-09-27 09:55:36 +0000
@@ -25,6 +25,9 @@
#include "immunix.h"
#include "parser.h"
+typedef int (*comparison_fn_t)(const void *, const void *);
+typedef void (*__free_fn_t)(void *);
+
enum var_type {
sd_boolean,
sd_set,
=== modified file 'parser/parser_yacc.y'
--- parser/parser_yacc.y 2016-06-03 05:24:22 +0000
+++ parser/parser_yacc.y 2017-09-27 09:55:36 +0000
@@ -902,6 +902,7 @@
pwarn(_("RLIMIT 'cpu' no units specified using default units of seconds\n"));
value = tmp;
break;
+#ifdef RLIMIT_RTTIME
case RLIMIT_RTTIME:
/* RTTIME is measured in microseconds */
if (!end || $6 == end || tmp < 0)
@@ -913,6 +914,7 @@
pwarn(_("RLIMIT 'rttime' no units specified using default units of microseconds\n"));
value = tmp;
break;
+#endif
case RLIMIT_NOFILE:
case RLIMIT_NPROC:
case RLIMIT_LOCKS:
--
AppArmor mailing list
[email protected]
Modify settings or unsubscribe at:
https://lists.ubuntu.com/mailman/listinfo/apparmor