Skip to content

Commit 46275f1

Browse files
author
Richard Jones
committed
logfile must be specified if pidfile is [SF#772820]
1 parent 3765a29 commit 46275f1

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

CHANGES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ are given with the most recent entry first.
55
- Fixed editing attributes on FileClass nodes.
66
- Query editing now works correctly (sf bug 621248)
77
- roundup-server now logs IP addresses by default (sf bug 778795)
8+
- logfile must be specified if pidfile is (sf bug 772820)
89

910
2003-07-29 0.6.0b4
1011
- plugged cross-site-scripting hole (thanks Jeff Epler)

roundup/scripts/roundup_server.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#
1717
""" HTTP Server that serves roundup.
1818
19-
$Id: roundup_server.py,v 1.25 2003-08-12 01:11:43 richard Exp $
19+
$Id: roundup_server.py,v 1.26 2003-08-12 01:14:11 richard Exp $
2020
"""
2121

2222
# python version check
@@ -316,7 +316,7 @@ def usage(message=''):
316316
-l: sets a filename to log to (instead of stdout)
317317
-d: run the server in the background and on UN*X write the server's PID
318318
to the nominated file. Note: on Windows the PID argument is needed,
319-
but ignored.
319+
but ignored. The -l option *must* be specified if this option is.
320320
-N: log client machine names in access log instead of IP addresses (much
321321
slower)
322322
@@ -405,6 +405,9 @@ def run():
405405
elif opt == '-h': usage()
406406
elif opt == '-N': RoundupRequestHandler.LOG_IPADDRESS = 0
407407

408+
if pidfile and not logfile:
409+
raise ValueError, _("logfile *must* be specified if pidfile is")
410+
408411
if hasattr(os, 'getuid'):
409412
# if root, setuid to the running user
410413
if not os.getuid() and user is not None:

0 commit comments

Comments
 (0)