diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/configure.in | 2 | ||||
-rw-r--r-- | source3/include/proto.h | 1 | ||||
-rw-r--r-- | source3/lib/system.c | 18 | ||||
-rw-r--r-- | source3/smbd/server.c | 2 |
4 files changed, 2 insertions, 21 deletions
diff --git a/source3/configure.in b/source3/configure.in index 4e5ce99b78..c2a5d1a75f 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -1025,7 +1025,7 @@ if test x"$ac_cv_func_execl" = x"no"; then EXTRA_BIN_PROGS="$EXTRA_BIN_PROGS bin/smbrun\$(EXEEXT)" fi -AC_CHECK_FUNCS(waitpid getcwd strdup strndup strnlen strerror fchown chmod fchmod chroot mknod mknod64) +AC_CHECK_FUNCS(waitpid getcwd strdup strndup strnlen strerror fchown chmod fchmod mknod mknod64) AC_CHECK_FUNCS(strtol strtoll strtoul strtoull strtouq __strtoull) AC_CHECK_FUNCS(fstat strchr chflags) AC_CHECK_FUNCS(getrlimit fsync fdatasync memset strlcpy strlcat setpgid) diff --git a/source3/include/proto.h b/source3/include/proto.h index e8b25667ab..ee6dcc1601 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -1002,7 +1002,6 @@ int sys_closedir(SMB_STRUCT_DIR *dirp); int sys_mknod(const char *path, mode_t mode, SMB_DEV_T dev); int sys_waitpid(pid_t pid,int *status,int options); char *sys_getwd(char *s); -int sys_chroot(const char *dname); void set_effective_capability(enum smbd_capability capability); void drop_effective_capability(enum smbd_capability capability); long sys_random(void); diff --git a/source3/lib/system.c b/source3/lib/system.c index da2797322a..d23e7ae6db 100644 --- a/source3/lib/system.c +++ b/source3/lib/system.c @@ -565,24 +565,6 @@ char *sys_getwd(char *s) return wd; } -/******************************************************************* -os/2 also doesn't have chroot -********************************************************************/ -int sys_chroot(const char *dname) -{ -#ifndef HAVE_CHROOT - static int done; - if (!done) { - DEBUG(1,("WARNING: no chroot!\n")); - done=1; - } - errno = ENOSYS; - return -1; -#else - return(chroot(dname)); -#endif -} - #if defined(HAVE_POSIX_CAPABILITIES) /************************************************************************** diff --git a/source3/smbd/server.c b/source3/smbd/server.c index 4e81263ee4..7583da65a5 100644 --- a/source3/smbd/server.c +++ b/source3/smbd/server.c @@ -1415,7 +1415,7 @@ extern void build_options(bool screen); } if (*lp_rootdir()) { - if (sys_chroot(lp_rootdir()) == 0) + if (chroot(lp_rootdir()) == 0) DEBUG(2,("Changed root to %s\n", lp_rootdir())); } |