1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
Author: Patrick McDermott <patrick.mcdermott@libiquity.com>
Subject: Fix unconditional use of libcap types
diff -Naurp src.orig/libfakeroot.c src/libfakeroot.c
--- src.orig/libfakeroot.c 2018-07-01 15:01:34.000000000 -0400
+++ src/libfakeroot.c 2019-05-31 19:49:24.248037242 -0400
@@ -1561,13 +1561,13 @@ int setgroups(SETGROUPS_SIZE_TYPE size,
return 0;
}
-#ifdef HAVE_CAPSET
+#if defined(HAVE_CAPSET) && defined(HAVE_SYS_CAPABILITY_H)
int capset(cap_user_header_t hdrp, const cap_user_data_t datap)
{
int rc = next_capset(hdrp, datap);
return (fakeroot_disabled) ? (rc) : 0;
}
-#endif /* HAVE_CAPSET */
+#endif /* HAVE_CAPSET && HAVE_SYS_CAPABILITY_H */
#if defined(HAVE_SETXATTR) || defined(HAVE_LSETXATTR) || defined(HAVE_FSETXATTR)
static size_t common_setxattr(INT_STRUCT_STAT *st, const char *name, void * value, size_t size, int flags)
diff -Naurp src.orig/wrapfunc.inp src/wrapfunc.inp
--- src.orig/wrapfunc.inp 2018-07-01 15:01:34.000000000 -0400
+++ src/wrapfunc.inp 2019-05-31 19:49:33.312023813 -0400
@@ -146,9 +146,9 @@ setfsgid;gid_t;(gid_t fsgid);(fsgid)
initgroups;int;(const char *user, INITGROUPS_SECOND_ARG group);(user, group)
setgroups;int;(SETGROUPS_SIZE_TYPE size, const gid_t *list);(size, list)
setpriority;int;(int which, int who, int prio);(which, who, prio)
-#ifdef HAVE_CAPSET
+#if defined(HAVE_CAPSET) && defined(HAVE_SYS_CAPABILITY_H)
capset;int;(cap_user_header_t hdrp, const cap_user_data_t datap);(hdrp, datap)
-#endif /* HAVE_CAPSET */
+#endif /* HAVE_CAPSET && HAVE_SYS_CAPABILITY_H */
#ifdef HAVE_LISTXATTR
listxattr; ssize_t;(const char *path, char *list, size_t size);(path, list, size)
#endif /* HAVE_LISTXATTR */
|