summaryrefslogtreecommitdiff
path: root/source/lib
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-06-29 22:32:24 +0000
committerJeremy Allison <jra@samba.org>2001-06-29 22:32:24 +0000
commitc24e6b41ea60ab4bac2fcd19da947851d6df3c7c (patch)
treef3b2b2e323f02131190892dab2748bc0000c3c6d /source/lib
parent001e9b7b540f04c80ba65c879aaa41acddc86f3e (diff)
downloadsamba-c24e6b41ea60ab4bac2fcd19da947851d6df3c7c.tar.gz
Ensured all the system calls in msdfs.c go through the vfs layer.
Added vfs calls to symlink() and readlink() with appropriate configure checks. Jeremy.
Diffstat (limited to 'source/lib')
-rw-r--r--source/lib/system.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/source/lib/system.c b/source/lib/system.c
index 810096ef362..a402af77c9b 100644
--- a/source/lib/system.c
+++ b/source/lib/system.c
@@ -265,6 +265,34 @@ 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
+}
+
+/*******************************************************************
+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
+}
+
+/*******************************************************************
chown isn't used much but OS/2 doesn't have it
********************************************************************/