Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
0cec0ffc
Kaydet (Commit)
0cec0ffc
authored
Tem 28, 2002
tarafından
Martin v. Löwis
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Patch #573770: Implement lchown.
üst
ddc6f474
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
49 additions
and
8 deletions
+49
-8
libos.tex
Doc/lib/libos.tex
+7
-0
NEWS
Misc/NEWS
+3
-3
posixmodule.c
Modules/posixmodule.c
+30
-0
configure
configure
+4
-3
configure.in
configure.in
+2
-2
pyconfig.h.in
pyconfig.h.in
+3
-0
No files found.
Doc/lib/libos.tex
Dosyayı görüntüle @
0cec0ffc
...
@@ -641,6 +641,13 @@ and \var{gid}.
...
@@ -641,6 +641,13 @@ and \var{gid}.
Availability:
\UNIX
.
Availability:
\UNIX
.
\end{funcdesc}
\end{funcdesc}
\begin{funcdesc}
{
lchown
}{
path, uid, gid
}
Change the owner and group id of
\var
{
path
}
to the numeric
\var
{
uid
}
and gid. This function will not follow symbolic links.
Availability:
\UNIX
.
\versionadded
{
2.3
}
\end{funcdesc}
\begin{funcdesc}
{
link
}{
src, dst
}
\begin{funcdesc}
{
link
}{
src, dst
}
Create a hard link pointing to
\var
{
src
}
named
\var
{
dst
}
.
Create a hard link pointing to
\var
{
src
}
named
\var
{
dst
}
.
Availability:
\UNIX
.
Availability:
\UNIX
.
...
...
Misc/NEWS
Dosyayı görüntüle @
0cec0ffc
...
@@ -162,8 +162,8 @@ Extension modules
...
@@ -162,8 +162,8 @@ Extension modules
This will create a temporary in-memory bsddb that won't be
This will create a temporary in-memory bsddb that won't be
written to disk.
written to disk.
- posix.
killpg, posix.mknod, and posix.getpgid have been added where
- posix.
lchown, posix.killpg, posix.mknod, and posix.getpgid have been
available.
a
dded where a
vailable.
- The locale module now exposes the C library's gettext interface.
- The locale module now exposes the C library's gettext interface.
...
@@ -339,7 +339,7 @@ Build
...
@@ -339,7 +339,7 @@ Build
to require editing the core to teach the trashcan mechanism about the
to require editing the core to teach the trashcan mechanism about the
new type.
new type.
- Accoring to Annex F of the current C standard,
- Accor
d
ing to Annex F of the current C standard,
The Standard C macro HUGE_VAL and its float and long double analogs,
The Standard C macro HUGE_VAL and its float and long double analogs,
HUGE_VALF and HUGE_VALL, expand to expressions whose values are
HUGE_VALF and HUGE_VALL, expand to expressions whose values are
...
...
Modules/posixmodule.c
Dosyayı görüntüle @
0cec0ffc
...
@@ -930,6 +930,33 @@ posix_chown(PyObject *self, PyObject *args)
...
@@ -930,6 +930,33 @@ posix_chown(PyObject *self, PyObject *args)
}
}
#endif
/* HAVE_CHOWN */
#endif
/* HAVE_CHOWN */
#ifdef HAVE_LCHOWN
PyDoc_STRVAR
(
posix_lchown__doc__
,
"lchown(path, uid, gid)
\n\n
\
Change the owner and group id of path to the numeric uid and gid.
\n
\
This function will not follow symbolic links."
);
static
PyObject
*
posix_lchown
(
PyObject
*
self
,
PyObject
*
args
)
{
char
*
path
=
NULL
;
int
uid
,
gid
;
int
res
;
if
(
!
PyArg_ParseTuple
(
args
,
"etii:lchown"
,
Py_FileSystemDefaultEncoding
,
&
path
,
&
uid
,
&
gid
))
return
NULL
;
Py_BEGIN_ALLOW_THREADS
res
=
lchown
(
path
,
(
uid_t
)
uid
,
(
gid_t
)
gid
);
Py_END_ALLOW_THREADS
if
(
res
<
0
)
return
posix_error_with_allocated_filename
(
path
);
PyMem_Free
(
path
);
Py_INCREF
(
Py_None
);
return
Py_None
;
}
#endif
/* HAVE_LCHOWN */
#ifdef HAVE_GETCWD
#ifdef HAVE_GETCWD
PyDoc_STRVAR
(
posix_getcwd__doc__
,
PyDoc_STRVAR
(
posix_getcwd__doc__
,
...
@@ -6225,6 +6252,9 @@ static PyMethodDef posix_methods[] = {
...
@@ -6225,6 +6252,9 @@ static PyMethodDef posix_methods[] = {
#ifdef HAVE_CHOWN
#ifdef HAVE_CHOWN
{
"chown"
,
posix_chown
,
METH_VARARGS
,
posix_chown__doc__
},
{
"chown"
,
posix_chown
,
METH_VARARGS
,
posix_chown__doc__
},
#endif
/* HAVE_CHOWN */
#endif
/* HAVE_CHOWN */
#ifdef HAVE_LCHOWN
{
"lchown"
,
posix_lchown
,
METH_VARARGS
,
posix_lchown__doc__
},
#endif
/* HAVE_LCHOWN */
#ifdef HAVE_CHROOT
#ifdef HAVE_CHROOT
{
"chroot"
,
posix_chroot
,
METH_VARARGS
,
posix_chroot__doc__
},
{
"chroot"
,
posix_chroot
,
METH_VARARGS
,
posix_chroot__doc__
},
#endif
#endif
...
...
configure
Dosyayı görüntüle @
0cec0ffc
#! /bin/sh
#! /bin/sh
# From configure.in Revision: 1.33
4
.
# From configure.in Revision: 1.33
5
.
# Guess values for system-dependent variables and create Makefiles.
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.53.
# Generated by GNU Autoconf 2.53.
#
#
...
@@ -11417,6 +11417,7 @@ echo "${ECHO_T}MACHDEP_OBJS" >&6
...
@@ -11417,6 +11417,7 @@ echo "${ECHO_T}MACHDEP_OBJS" >&6
...
@@ -11441,8 +11442,8 @@ echo "${ECHO_T}MACHDEP_OBJS" >&6
...
@@ -11441,8 +11442,8 @@ echo "${ECHO_T}MACHDEP_OBJS" >&6
for
ac_func
in
alarm
chown chroot
clock confstr ctermid ctermid_r execv
\
for
ac_func
in
alarm
chown chroot
clock confstr ctermid ctermid_r execv
\
fchdir flock fork fsync fdatasync fpathconf ftime ftruncate
\
fchdir flock fork fsync fdatasync fpathconf ftime ftruncate
\
gai_strerror getgroups getlogin getpeername getpgid getpid getpwent getwd
\
gai_strerror getgroups getlogin getpeername getpgid getpid getpwent getwd
\
hstrerror inet_pton
kill
killpg
l
ink
lstat
mkfifo mknod
mktime mremap
\
hstrerror inet_pton
kill
killpg l
chown
link
lstat
mkfifo mknod
mktime
\
nice
pathconf pause plock poll pthread_init
\
mremap
nice
pathconf pause plock poll pthread_init
\
putenv
readlink
\
putenv
readlink
\
select
setegid seteuid setgid setgroups
\
select
setegid seteuid setgid setgroups
\
setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf
\
setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf
\
...
...
configure.in
Dosyayı görüntüle @
0cec0ffc
...
@@ -1619,8 +1619,8 @@ AC_MSG_RESULT(MACHDEP_OBJS)
...
@@ -1619,8 +1619,8 @@ AC_MSG_RESULT(MACHDEP_OBJS)
AC_CHECK_FUNCS(alarm chown chroot clock confstr ctermid ctermid_r execv \
AC_CHECK_FUNCS(alarm chown chroot clock confstr ctermid ctermid_r execv \
fchdir flock fork fsync fdatasync fpathconf ftime ftruncate \
fchdir flock fork fsync fdatasync fpathconf ftime ftruncate \
gai_strerror getgroups getlogin getpeername getpgid getpid getpwent getwd \
gai_strerror getgroups getlogin getpeername getpgid getpid getpwent getwd \
hstrerror inet_pton kill killpg l
ink lstat mkfifo mknod mktime mremap
\
hstrerror inet_pton kill killpg l
chown link lstat mkfifo mknod mktime
\
nice pathconf pause plock poll pthread_init \
mremap
nice pathconf pause plock poll pthread_init \
putenv readlink \
putenv readlink \
select setegid seteuid setgid setgroups \
select setegid seteuid setgid setgroups \
setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \
setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \
...
...
pyconfig.h.in
Dosyayı görüntüle @
0cec0ffc
...
@@ -211,6 +211,9 @@
...
@@ -211,6 +211,9 @@
Solaris and Linux, the necessary defines are already defined.) */
Solaris and Linux, the necessary defines are already defined.) */
#undef HAVE_LARGEFILE_SUPPORT
#undef HAVE_LARGEFILE_SUPPORT
/* Define to 1 if you have the `lchown' function. */
#undef HAVE_LCHOWN
/* Define to 1 if you have the `dl' library (-ldl). */
/* Define to 1 if you have the `dl' library (-ldl). */
#undef HAVE_LIBDL
#undef HAVE_LIBDL
...
...
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