From 161d70a57ae8a17dcbc9c426bfff33c8c51318b7 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 1 Nov 2008 03:27:45 +0100 Subject: Move sys_chown() to rep_chown(). --- source3/lib/system.c | 19 ------------------- 1 file changed, 19 deletions(-) (limited to 'source3/lib/system.c') diff --git a/source3/lib/system.c b/source3/lib/system.c index eabb6d6dc4..7f5f572255 100644 --- a/source3/lib/system.c +++ b/source3/lib/system.c @@ -622,25 +622,6 @@ int sys_link(const char *oldpath, const char *newpath) #endif } -/******************************************************************* -chown isn't used much but OS/2 doesn't have it -********************************************************************/ - -int sys_chown(const char *fname,uid_t uid,gid_t gid) -{ -#ifndef HAVE_CHOWN - static int done; - if (!done) { - DEBUG(1,("WARNING: no chown!\n")); - done=1; - } - errno = ENOSYS; - return -1; -#else - return(chown(fname,uid,gid)); -#endif -} - /******************************************************************* Wrapper for lchown. ********************************************************************/ -- cgit From bbbe6ab72284c78c095babd875070aaac8c477dd Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 1 Nov 2008 03:30:47 +0100 Subject: Move sys_link to libreplace. --- source3/lib/system.c | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'source3/lib/system.c') diff --git a/source3/lib/system.c b/source3/lib/system.c index 7f5f572255..cb3551c11e 100644 --- a/source3/lib/system.c +++ b/source3/lib/system.c @@ -608,20 +608,6 @@ int sys_readlink(const char *path, char *buf, size_t bufsiz) #endif } -/******************************************************************* -system wrapper for link -********************************************************************/ - -int sys_link(const char *oldpath, const char *newpath) -{ -#ifndef HAVE_LINK - errno = ENOSYS; - return -1; -#else - return link(oldpath, newpath); -#endif -} - /******************************************************************* Wrapper for lchown. ********************************************************************/ -- cgit From dbda9adfaf388f62cf359ea728ae303d81df81a9 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 1 Nov 2008 03:33:39 +0100 Subject: Move sys_readlink() to libreplace. --- source3/lib/system.c | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'source3/lib/system.c') diff --git a/source3/lib/system.c b/source3/lib/system.c index cb3551c11e..ac64954107 100644 --- a/source3/lib/system.c +++ b/source3/lib/system.c @@ -594,20 +594,6 @@ int sys_symlink(const char *oldpath, const char *newpath) #endif } -/******************************************************************* -system wrapper for readlink -********************************************************************/ - -int sys_readlink(const char *path, char *buf, size_t bufsiz) -{ -#ifndef HAVE_READLINK - errno = ENOSYS; - return -1; -#else - return readlink(path, buf, bufsiz); -#endif -} - /******************************************************************* Wrapper for lchown. ********************************************************************/ -- cgit From e8cda43e171c1aa8f4b858228e715290d400691c Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 1 Nov 2008 03:35:58 +0100 Subject: Move sys_symlink() to libreplace. --- source3/lib/system.c | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'source3/lib/system.c') diff --git a/source3/lib/system.c b/source3/lib/system.c index ac64954107..e2ed11d450 100644 --- a/source3/lib/system.c +++ b/source3/lib/system.c @@ -580,20 +580,6 @@ char *sys_getwd(char *s) return wd; } -/******************************************************************* -system wrapper for symlink -********************************************************************/ - -int sys_symlink(const char *oldpath, const char *newpath) -{ -#ifndef HAVE_SYMLINK - errno = ENOSYS; - return -1; -#else - return symlink(oldpath, newpath); -#endif -} - /******************************************************************* Wrapper for lchown. ********************************************************************/ -- cgit From 38d67363aca81b970717c58b07e04396ae9dfd9f Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 1 Nov 2008 03:39:20 +0100 Subject: Move sys_lchown() to libreplace. --- source3/lib/system.c | 19 ------------------- 1 file changed, 19 deletions(-) (limited to 'source3/lib/system.c') diff --git a/source3/lib/system.c b/source3/lib/system.c index e2ed11d450..27722fcab2 100644 --- a/source3/lib/system.c +++ b/source3/lib/system.c @@ -580,25 +580,6 @@ char *sys_getwd(char *s) return wd; } -/******************************************************************* - Wrapper for lchown. -********************************************************************/ - -int sys_lchown(const char *fname,uid_t uid,gid_t gid) -{ -#ifndef HAVE_LCHOWN - static int done; - if (!done) { - DEBUG(1,("WARNING: no lchown!\n")); - done=1; - } - errno = ENOSYS; - return -1; -#else - return(lchown(fname,uid,gid)); -#endif -} - /******************************************************************* os/2 also doesn't have chroot ********************************************************************/ -- cgit From a6d537bb6cec25eb27cf8884ca5e3362a86818b3 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 1 Nov 2008 03:42:27 +0100 Subject: Move sys_realpath() to libreplace. --- source3/lib/system.c | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'source3/lib/system.c') diff --git a/source3/lib/system.c b/source3/lib/system.c index 27722fcab2..da2797322a 100644 --- a/source3/lib/system.c +++ b/source3/lib/system.c @@ -537,21 +537,6 @@ int sys_mknod(const char *path, mode_t mode, SMB_DEV_T dev) #endif } -/******************************************************************* - Wrapper for realpath. -********************************************************************/ - -char *sys_realpath(const char *path, char *resolved_path) -{ -#if defined(HAVE_REALPATH) - return realpath(path, resolved_path); -#else - /* As realpath is not a system call we can't return ENOSYS. */ - errno = EINVAL; - return NULL; -#endif -} - /******************************************************************* The wait() calls vary between systems ********************************************************************/ -- cgit From 6a2caa34b24c2225dba9da011eaa5cc3eb8752be Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 1 Nov 2008 03:46:09 +0100 Subject: Remove sys_chroot() - libreplace already provides an alternative. --- source3/lib/system.c | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'source3/lib/system.c') diff --git a/source3/lib/system.c b/source3/lib/system.c index da2797322a..d23e7ae6db 100644 --- a/source3/lib/system.c +++ b/source3/lib/system.c @@ -565,24 +565,6 @@ char *sys_getwd(char *s) return wd; } -/******************************************************************* -os/2 also doesn't have chroot -********************************************************************/ -int sys_chroot(const char *dname) -{ -#ifndef HAVE_CHROOT - static int done; - if (!done) { - DEBUG(1,("WARNING: no chroot!\n")); - done=1; - } - errno = ENOSYS; - return -1; -#else - return(chroot(dname)); -#endif -} - #if defined(HAVE_POSIX_CAPABILITIES) /************************************************************************** -- cgit From 7b186c48d365ae8eda81ae9a0af100d2214bee32 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 1 Nov 2008 03:49:49 +0100 Subject: Remove sys_dl*() - stubs are already provided by libreplace. --- source3/lib/system.c | 40 ---------------------------------------- 1 file changed, 40 deletions(-) (limited to 'source3/lib/system.c') diff --git a/source3/lib/system.c b/source3/lib/system.c index d23e7ae6db..90dbdafa92 100644 --- a/source3/lib/system.c +++ b/source3/lib/system.c @@ -1190,46 +1190,6 @@ int sys_pclose(int fd) return wstatus; } -/************************************************************************** - Wrappers for dlopen, dlsym, dlclose. -****************************************************************************/ - -void *sys_dlopen(const char *name, int flags) -{ -#if defined(HAVE_DLOPEN) - return dlopen(name, flags); -#else - return NULL; -#endif -} - -void *sys_dlsym(void *handle, const char *symbol) -{ -#if defined(HAVE_DLSYM) - return dlsym(handle, symbol); -#else - return NULL; -#endif -} - -int sys_dlclose (void *handle) -{ -#if defined(HAVE_DLCLOSE) - return dlclose(handle); -#else - return 0; -#endif -} - -const char *sys_dlerror(void) -{ -#if defined(HAVE_DLERROR) - return dlerror(); -#else - return NULL; -#endif -} - int sys_dup2(int oldfd, int newfd) { #if defined(HAVE_DUP2) -- cgit