summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-05-23 23:55:12 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:22:46 -0500
commit57d6318a0b5ecc0154547a04acef8ac222c1d28f (patch)
treec87905c626d1c6cac32ba8b4b3f6948484b5acd7 /source3/lib
parentdbfd6bf8c8cc9945c4ba7e22ac44b1f33f9c7ce6 (diff)
downloadsamba-57d6318a0b5ecc0154547a04acef8ac222c1d28f.tar.gz
samba-57d6318a0b5ecc0154547a04acef8ac222c1d28f.tar.bz2
samba-57d6318a0b5ecc0154547a04acef8ac222c1d28f.zip
r23105: Add lchown to the vfs layer. We need this in the POSIX code.
Jeremy. (This used to be commit 932523cbb508db869b726768e86bfa8e248f768b)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/system.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/source3/lib/system.c b/source3/lib/system.c
index eaebc7190f..d7321501ad 100644
--- a/source3/lib/system.c
+++ b/source3/lib/system.c
@@ -642,6 +642,25 @@ int sys_chown(const char *fname,uid_t uid,gid_t gid)
}
/*******************************************************************
+ 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
********************************************************************/
int sys_chroot(const char *dname)