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
711f87ca
Kaydet (Commit)
711f87ca
authored
Eki 20, 2011
tarafından
Florent Xicluna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #9168: now smtpd is able to bind privileged port.
üst
cd1d3ef7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
10 deletions
+12
-10
smtpd.py
Lib/smtpd.py
+10
-10
NEWS
Misc/NEWS
+2
-0
No files found.
Lib/smtpd.py
Dosyayı görüntüle @
711f87ca
...
...
@@ -678,6 +678,16 @@ def parseargs():
if
__name__
==
'__main__'
:
options
=
parseargs
()
# Become nobody
classname
=
options
.
classname
if
"."
in
classname
:
lastdot
=
classname
.
rfind
(
"."
)
mod
=
__import__
(
classname
[:
lastdot
],
globals
(),
locals
(),
[
""
])
classname
=
classname
[
lastdot
+
1
:]
else
:
import
__main__
as
mod
class_
=
getattr
(
mod
,
classname
)
proxy
=
class_
((
options
.
localhost
,
options
.
localport
),
(
options
.
remotehost
,
options
.
remoteport
))
if
options
.
setuid
:
try
:
import
pwd
...
...
@@ -691,16 +701,6 @@ if __name__ == '__main__':
if
e
.
errno
!=
errno
.
EPERM
:
raise
print
(
'Cannot setuid "nobody"; try running with -n option.'
,
file
=
sys
.
stderr
)
sys
.
exit
(
1
)
classname
=
options
.
classname
if
"."
in
classname
:
lastdot
=
classname
.
rfind
(
"."
)
mod
=
__import__
(
classname
[:
lastdot
],
globals
(),
locals
(),
[
""
])
classname
=
classname
[
lastdot
+
1
:]
else
:
import
__main__
as
mod
class_
=
getattr
(
mod
,
classname
)
proxy
=
class_
((
options
.
localhost
,
options
.
localport
),
(
options
.
remotehost
,
options
.
remoteport
))
try
:
asyncore
.
loop
()
except
KeyboardInterrupt
:
...
...
Misc/NEWS
Dosyayı görüntüle @
711f87ca
...
...
@@ -54,6 +54,8 @@ Core and Builtins
Library
-------
- Issue #9168: now smtpd is able to bind privileged port.
- Issue #12529: fix cgi.parse_header issue on strings with double-quotes and
semicolons together. Patch by Ben Darnell and Petri Lehtinen.
...
...
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