summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-11-01 03:35:58 +0100
committerJelmer Vernooij <jelmer@samba.org>2008-11-01 03:35:58 +0100
commite8cda43e171c1aa8f4b858228e715290d400691c (patch)
tree38f8fec8ef93ba577920e3d8abf276771ba6caf5 /source3
parentdbda9adfaf388f62cf359ea728ae303d81df81a9 (diff)
downloadsamba-e8cda43e171c1aa8f4b858228e715290d400691c.tar.gz
samba-e8cda43e171c1aa8f4b858228e715290d400691c.tar.bz2
samba-e8cda43e171c1aa8f4b858228e715290d400691c.zip
Move sys_symlink() to libreplace.
Diffstat (limited to 'source3')
-rw-r--r--source3/include/proto.h2
-rw-r--r--source3/lib/system.c14
-rw-r--r--source3/modules/vfs_default.c4
3 files changed, 2 insertions, 18 deletions
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
@@ -581,20 +581,6 @@ char *sys_getwd(char *s)
}
/*******************************************************************
-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;
}