2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-09-05 16:55:32 +00:00

On Hurd and kfreebsd under Debian, I have disabled the build of the parser

since things go extremely badly when capabilities disappear. If someone
wants to work on it, I have some initial patch attempts, but it was getting
too time-consuming, so I back-burnered the parser. A very small change was
needed to get the libraries to build, and this is it.

Description: Workaround non-Linux environments to build everything but the
 parser.
Author: Kees Cook <kees@debian.org>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
This commit is contained in:
Kees Cook
2011-05-02 13:38:12 -07:00
parent 1644ce31e7
commit a25a2ec0d9

View File

@@ -37,7 +37,11 @@ static int setprocattr(const char *path, const char *buf, int len)
int rc = -1;
int fd, ret, ctlerr = 0;
char *ctl = NULL;
#ifdef SYS_gettid
pid_t tid = syscall(SYS_gettid);
#else
pid_t tid = getpid();
#endif
if (!buf) {
errno = EINVAL;