diff options
-rw-r--r-- | ChangeLog.txt | 1 | ||||
-rw-r--r-- | ports/linux/guts/capset.c | 13 | ||||
-rw-r--r-- | ports/linux/portdefs.h | 2 | ||||
-rw-r--r-- | ports/linux/pseudo_wrappers.c | 7 | ||||
-rw-r--r-- | ports/linux/wrapfuncs.in | 1 |
5 files changed, 24 insertions, 0 deletions
diff --git a/ChangeLog.txt b/ChangeLog.txt index d2f93b0..1539411 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -5,6 +5,7 @@ * All of these from: Gaƫl PORTAY <gael.portay@savoirfairelinux.com> * (seebs) import fix from Rabin Vincent for test case * (seebs) import fix from Rabin Vincent for pthread mutexes + * (seebs) import fix from George McCollister for capset. 2016-11-23: * (seebs) actually wait on server shutdown for pseudo -S [cmd] diff --git a/ports/linux/guts/capset.c b/ports/linux/guts/capset.c new file mode 100644 index 0000000..51e0cdf --- /dev/null +++ b/ports/linux/guts/capset.c @@ -0,0 +1,13 @@ +/* + * Copyright (c) 2016 Wind River Systems; see + * guts/COPYRIGHT for information. + * + * int capset(cap_user_header_t hdrp, const cap_user_data_t datap) + * int rc = -1; + */ + + rc = real_capset(hdrp, datap); + +/* return rc; + * } + */ diff --git a/ports/linux/portdefs.h b/ports/linux/portdefs.h index cf6b375..942356d 100644 --- a/ports/linux/portdefs.h +++ b/ports/linux/portdefs.h @@ -25,3 +25,5 @@ GLIBC_COMPAT_SYMBOL(memcpy,2.2.5); #elif defined(__i386__) GLIBC_COMPAT_SYMBOL(memcpy,2.0); #endif + +#include <linux/capability.h> diff --git a/ports/linux/pseudo_wrappers.c b/ports/linux/pseudo_wrappers.c index 0e9a41f..e7f79f8 100644 --- a/ports/linux/pseudo_wrappers.c +++ b/ports/linux/pseudo_wrappers.c @@ -42,3 +42,10 @@ int pseudo_mknodat(int dirfd, const char *path, mode_t mode, dev_t dev) { return real___xmknodat(_MKNOD_VER, dirfd, path, mode, &dev); } + +int pseudo_capset(cap_user_header_t hdrp, const cap_user_data_t datap) { + (void)hdrp; + (void)datap; + + return 0; +} diff --git a/ports/linux/wrapfuncs.in b/ports/linux/wrapfuncs.in index c45e01a..fca5b50 100644 --- a/ports/linux/wrapfuncs.in +++ b/ports/linux/wrapfuncs.in @@ -53,3 +53,4 @@ int euidaccess(const char *path, int mode); int getpw(uid_t uid, char *buf); int getpwent_r(struct passwd *pwbuf, char *buf, size_t buflen, struct passwd **pwbufp); int getgrent_r(struct group *gbuf, char *buf, size_t buflen, struct group **gbufp); +int capset(cap_user_header_t hdrp, const cap_user_data_t datap); /* real_func=pseudo_capset */ |