diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/replace/README | 1 | ||||
-rw-r--r-- | lib/replace/libreplace.m4 | 2 | ||||
-rw-r--r-- | lib/replace/replace.c | 8 | ||||
-rw-r--r-- | lib/replace/replace.h | 4 |
4 files changed, 14 insertions, 1 deletions
diff --git a/lib/replace/README b/lib/replace/README index f189e8716f..1005281a6b 100644 --- a/lib/replace/README +++ b/lib/replace/README @@ -47,6 +47,7 @@ mkstemp (a secure one!) pread pwrite chown +lchown getpass readline (the library) inet_ntoa diff --git a/lib/replace/libreplace.m4 b/lib/replace/libreplace.m4 index a93a9dad45..cc9be162ac 100644 --- a/lib/replace/libreplace.m4 +++ b/lib/replace/libreplace.m4 @@ -108,7 +108,7 @@ AC_CHECK_FUNCS(seteuid setresuid setegid setresgid chroot bzero strerror) AC_CHECK_FUNCS(vsyslog setlinebuf mktime ftruncate chsize rename) AC_CHECK_FUNCS(waitpid strlcpy strlcat initgroups memmove strdup) AC_CHECK_FUNCS(pread pwrite strndup strcasestr strtok_r mkdtemp) -AC_CHECK_FUNCS(isatty chown link readlink symlink) +AC_CHECK_FUNCS(isatty chown lchown link readlink symlink) AC_HAVE_DECL(setresuid, [#include <unistd.h>]) AC_HAVE_DECL(setresgid, [#include <unistd.h>]) AC_HAVE_DECL(errno, [#include <errno.h>]) diff --git a/lib/replace/replace.c b/lib/replace/replace.c index 37705b93cd..f4faef992a 100644 --- a/lib/replace/replace.c +++ b/lib/replace/replace.c @@ -650,3 +650,11 @@ int rep_symlink(const char *oldpath, const char *newpath) return -1; } #endif + +#ifndef HAVE_LCHOWN +int rep_lchown(const char *fname,uid_t uid,gid_t gid) +{ + errno = ENOSYS; + return -1; +} +#endif diff --git a/lib/replace/replace.h b/lib/replace/replace.h index f56c5b0dc9..b81bf5c576 100644 --- a/lib/replace/replace.h +++ b/lib/replace/replace.h @@ -235,6 +235,10 @@ int rep_readlink(const char *path, char *buf, size_t bufsize); int rep_symlink(const char *oldpath, const char *newpath); #endif +#ifndef HAVE_LCHOWN +#define lchown rep_lchown +int rep_lchown(const char *fname,uid_t uid,gid_t gid); +#endif #ifndef HAVE_SETLINEBUF #define setlinebuf rep_setlinebuf |