Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
244edc89
Commit
244edc89
authored
Oct 04, 2001
by
Martin v. Löwis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add chroot call. Implements feature #459267.
parent
fcc16330
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
27 additions
and
3 deletions
+27
-3
Doc/lib/libos.tex
Doc/lib/libos.tex
+6
-0
Modules/posixmodule.c
Modules/posixmodule.c
+15
-0
configure
configure
+2
-2
configure.in
configure.in
+1
-1
pyconfig.h.in
pyconfig.h.in
+3
-0
No files found.
Doc/lib/libos.tex
View file @
244edc89
...
...
@@ -577,6 +577,12 @@ Return a string representing the current working directory.
Availability: Macintosh,
\UNIX
{}
, Windows.
\end{funcdesc}
\begin{funcdesc}
{
chroot
}{
path
}
Change the root directory of the current process to
\var
{
path
}
.
Availability:
\UNIX
{}
.
\versionadded
{
2.2
}
\end{funcdesc}
\begin{funcdesc}
{
chmod
}{
path, mode
}
Change the mode of
\var
{
path
}
to the numeric
\var
{
mode
}
.
Availability:
\UNIX
{}
, Windows.
...
...
Modules/posixmodule.c
View file @
244edc89
...
...
@@ -724,6 +724,18 @@ posix_chmod(PyObject *self, PyObject *args)
}
#ifdef HAVE_CHROOT
static
char
posix_chroot__doc__
[]
=
"chroot(path) -> None
\n
\
Change root directory to path."
;
static
PyObject
*
posix_chroot
(
PyObject
*
self
,
PyObject
*
args
)
{
return
posix_1str
(
args
,
"et:chroot"
,
chroot
);
}
#endif
#ifdef HAVE_FSYNC
static
char
posix_fsync__doc__
[]
=
"fsync(fildes) -> None
\n
\
...
...
@@ -5336,6 +5348,9 @@ static PyMethodDef posix_methods[] = {
#ifdef HAVE_CHOWN
{
"chown"
,
posix_chown
,
METH_VARARGS
,
posix_chown__doc__
},
#endif
/* HAVE_CHOWN */
#ifdef HAVE_CHROOT
{
"chroot"
,
posix_chroot
,
METH_VARARGS
,
posix_chroot__doc__
},
#endif
#ifdef HAVE_CTERMID
{
"ctermid"
,
posix_ctermid
,
METH_VARARGS
,
posix_ctermid__doc__
},
#endif
...
...
configure
View file @
244edc89
#! /bin/sh
# From configure.in Revision: 1.26
1
# From configure.in Revision: 1.26
2
# Guess values for system-dependent variables and create Makefiles.
# Generated automatically using autoconf version 2.13
...
...
@@ -4683,7 +4683,7 @@ fi
echo
"
$ac_t
""MACHDEP_OBJS"
1>&6
# checks for library functions
for
ac_func
in
alarm
chown
clock confstr ctermid ctermid_r execv
\
for
ac_func
in
alarm
chown c
hroot
c
lock confstr ctermid ctermid_r execv
\
flock fork fsync fdatasync fpathconf ftime ftruncate
\
gai_strerror getgroups getlogin getpeername getpid getpwent getwd
\
hstrerror inet_pton
kill link
lstat
mkfifo
mktime mremap
\
...
...
configure.in
View file @
244edc89
...
...
@@ -1316,7 +1316,7 @@ fi
AC_MSG_RESULT(MACHDEP_OBJS)
# checks for library functions
AC_CHECK_FUNCS(alarm chown clock confstr ctermid ctermid_r execv \
AC_CHECK_FUNCS(alarm chown c
hroot c
lock confstr ctermid ctermid_r execv \
flock fork fsync fdatasync fpathconf ftime ftruncate \
gai_strerror getgroups getlogin getpeername getpid getpwent getwd \
hstrerror inet_pton kill link lstat mkfifo mktime mremap \
...
...
pyconfig.h.in
View file @
244edc89
...
...
@@ -321,6 +321,9 @@
/* Define if you have the chown function. */
#undef HAVE_CHOWN
/* Define if you have the chroot function. */
#undef HAVE_CHROOT
/* Define if you have the clock function. */
#undef HAVE_CLOCK
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment