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/include/proto.h | 1 - source3/lib/system.c | 19 ------------------- source3/modules/vfs_default.c | 2 +- source3/modules/vfs_netatalk.c | 2 +- 4 files changed, 2 insertions(+), 22 deletions(-) (limited to 'source3') diff --git a/source3/include/proto.h b/source3/include/proto.h index 7e6f608896..5104910e99 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -1003,7 +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_lchown(const char *fname,uid_t uid,gid_t gid); int sys_chroot(const char *dname); void set_effective_capability(enum smbd_capability capability); void drop_effective_capability(enum smbd_capability capability); 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 ********************************************************************/ diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c index 37b0fc392b..13c2770208 100644 --- a/source3/modules/vfs_default.c +++ b/source3/modules/vfs_default.c @@ -621,7 +621,7 @@ static int vfswrap_lchown(vfs_handle_struct *handle, const char *path, uid_t uid int result; START_PROFILE(syscall_lchown); - result = sys_lchown(path, uid, gid); + result = lchown(path, uid, gid); END_PROFILE(syscall_lchown); return result; } diff --git a/source3/modules/vfs_netatalk.c b/source3/modules/vfs_netatalk.c index 2cc4a6c4ba..ca7085ca18 100644 --- a/source3/modules/vfs_netatalk.c +++ b/source3/modules/vfs_netatalk.c @@ -399,7 +399,7 @@ static int atalk_lchown(struct vfs_handle_struct *handle, const char *path, uid_ goto exit_lchown; } - sys_lchown(adbl_path, uid, gid); + lchown(adbl_path, uid, gid); exit_lchown: talloc_destroy(ctx); -- cgit