File tree Expand file tree Collapse file tree 2 files changed +20
-4
lines changed Expand file tree Collapse file tree 2 files changed +20
-4
lines changed Original file line number Diff line number Diff line change @@ -9,3 +9,11 @@ Version 4.4.18 of mod_wsgi can be obtained from:
99For details on the availability of Windows binaries see:
1010
1111 https://github.com/GrahamDumpleton/mod_wsgi/tree/master/win32
12+
13+ Bugs Fixed
14+ ----------
15+
16+ 1. If ``mod_wsgi-express `` was run under a user ID for which there was no
17+ password entry in the system password file, it would fail when looking up
18+ the group name. If this occurs now use ``#nnn `` as the default group name,
19+ where ``nnn `` is the user ID.
Original file line number Diff line number Diff line change @@ -51,15 +51,23 @@ def where():
5151
5252def default_run_user ():
5353 try :
54- return pwd .getpwuid (os .getuid ()).pw_name
54+ uid = os .getuid ()
55+ return pwd .getpwuid (uid ).pw_name
5556 except KeyError :
56- return '#%d' % os . getuid ()
57+ return '#%d' % uid
5758
5859def default_run_group ():
5960 try :
60- return grp .getgrgid (pwd .getpwuid (os .getuid ()).pw_gid ).gr_name
61+ uid = os .getuid ()
62+ entry = pwd .getpwuid (uid )
6163 except KeyError :
62- return '#%d' % pwd .getpwuid (os .getuid ()).pw_gid
64+ return '#%d' % uid
65+
66+ try :
67+ gid = entry .pw_gid
68+ return grp .getgrgid (gid ).gr_name
69+ except KeyError :
70+ return '#%d' % gid
6371
6472def find_program (names , default = None , paths = []):
6573 for name in names :
You can’t perform that action at this time.
0 commit comments