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/include/proto.h | 2 -- source3/lib/system.c | 14 -------------- source3/modules/vfs_default.c | 4 ++-- 3 files changed, 2 insertions(+), 18 deletions(-) (limited to 'source3') diff --git a/source3/include/proto.h b/source3/include/proto.h index a731e9ef48..7e6f608896 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -1003,8 +1003,6 @@ int sys_mknod(const char *path, mode_t mode, SMB_DEV_T dev); char *sys_realpath(const char *path, char *resolved_path); int sys_waitpid(pid_t pid,int *status,int options); char *sys_getwd(char *s); -int sys_symlink(const char *oldpath, const char *newpath); -int sys_readlink(const char *path, char *buf, size_t bufsiz); int sys_lchown(const char *fname,uid_t uid,gid_t gid); int sys_chroot(const char *dname); void set_effective_capability(enum smbd_capability capability); 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. ********************************************************************/ diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c index f47ff8fdfc..37b0fc392b 100644 --- a/source3/modules/vfs_default.c +++ b/source3/modules/vfs_default.c @@ -869,7 +869,7 @@ static int vfswrap_symlink(vfs_handle_struct *handle, const char *oldpath, cons int result; START_PROFILE(syscall_symlink); - result = sys_symlink(oldpath, newpath); + result = symlink(oldpath, newpath); END_PROFILE(syscall_symlink); return result; } @@ -879,7 +879,7 @@ static int vfswrap_readlink(vfs_handle_struct *handle, const char *path, char * int result; START_PROFILE(syscall_readlink); - result = sys_readlink(path, buf, bufsiz); + result = readlink(path, buf, bufsiz); END_PROFILE(syscall_readlink); return result; } -- cgit