summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraham Dumpleton <Graham.Dumpleton@gmail.com>2015-10-12 11:27:33 +1100
committerGraham Dumpleton <Graham.Dumpleton@gmail.com>2015-10-12 11:27:33 +1100
commit5cf1d13d18d33861600b0aea4f807f4f3c9b7f8a (patch)
tree4845a06438bdfe6d5dcb8e2d8b59357da682f274
parent02f2b3a42e2b168999c123a0fb32cbc822c0fe14 (diff)
parent86930875162ca40d8e844ff5599550d85606a610 (diff)
downloadmod_wsgi-5cf1d13d18d33861600b0aea4f807f4f3c9b7f8a.tar.gz
Merge branch 'release/4.4.18'4.4.18
-rw-r--r--docs/release-notes.rst1
-rw-r--r--docs/release-notes/version-4.4.17.rst3
-rw-r--r--docs/release-notes/version-4.4.18.rst19
-rw-r--r--src/server/__init__.py16
-rw-r--r--src/server/wsgi_version.h4
5 files changed, 36 insertions, 7 deletions
diff --git a/docs/release-notes.rst b/docs/release-notes.rst
index b7f2b4b..bacd702 100644
--- a/docs/release-notes.rst
+++ b/docs/release-notes.rst
@@ -5,6 +5,7 @@ Release Notes
.. toctree::
:maxdepth: 2
+ release-notes/version-4.4.18
release-notes/version-4.4.17
release-notes/version-4.4.16
release-notes/version-4.4.15
diff --git a/docs/release-notes/version-4.4.17.rst b/docs/release-notes/version-4.4.17.rst
index a076093..3ad37d3 100644
--- a/docs/release-notes/version-4.4.17.rst
+++ b/docs/release-notes/version-4.4.17.rst
@@ -15,4 +15,5 @@ Bugs Fixed
1. If ``mod_wsgi-express`` was run under a user ID for which there was no
password entry in the system password file, it would fail when looking up
-the user name. If this occurs now use ``#nnn`` as the default user name.
+the user name. If this occurs now use ``#nnn`` as the default user name,
+where ``nnn`` is the user ID.
diff --git a/docs/release-notes/version-4.4.18.rst b/docs/release-notes/version-4.4.18.rst
new file mode 100644
index 0000000..f4c5374
--- /dev/null
+++ b/docs/release-notes/version-4.4.18.rst
@@ -0,0 +1,19 @@
+==============
+Version 4.4.18
+==============
+
+Version 4.4.18 of mod_wsgi can be obtained from:
+
+ https://codeload.github.com/GrahamDumpleton/mod_wsgi/tar.gz/4.4.18
+
+For details on the availability of Windows binaries see:
+
+ https://github.com/GrahamDumpleton/mod_wsgi/tree/master/win32
+
+Bugs Fixed
+----------
+
+1. If ``mod_wsgi-express`` was run under a user ID for which there was no
+password entry in the system password file, it would fail when looking up
+the group name. If this occurs now use ``#nnn`` as the default group name,
+where ``nnn`` is the user ID.
diff --git a/src/server/__init__.py b/src/server/__init__.py
index fbc77c7..124a692 100644
--- a/src/server/__init__.py
+++ b/src/server/__init__.py
@@ -51,15 +51,23 @@ def where():
def default_run_user():
try:
- return pwd.getpwuid(os.getuid()).pw_name
+ uid = os.getuid()
+ return pwd.getpwuid(uid).pw_name
except KeyError:
- return '#%d' % os.getuid()
+ return '#%d' % uid
def default_run_group():
try:
- return grp.getgrgid(pwd.getpwuid(os.getuid()).pw_gid).gr_name
+ uid = os.getuid()
+ entry = pwd.getpwuid(uid)
except KeyError:
- return '#%d' % pwd.getpwuid(os.getuid()).pw_gid
+ return '#%d' % uid
+
+ try:
+ gid = entry.pw_gid
+ return grp.getgrgid(gid).gr_name
+ except KeyError:
+ return '#%d' % gid
def find_program(names, default=None, paths=[]):
for name in names:
diff --git a/src/server/wsgi_version.h b/src/server/wsgi_version.h
index 727a762..747a115 100644
--- a/src/server/wsgi_version.h
+++ b/src/server/wsgi_version.h
@@ -25,8 +25,8 @@
#define MOD_WSGI_MAJORVERSION_NUMBER 4
#define MOD_WSGI_MINORVERSION_NUMBER 4
-#define MOD_WSGI_MICROVERSION_NUMBER 17
-#define MOD_WSGI_VERSION_STRING "4.4.17"
+#define MOD_WSGI_MICROVERSION_NUMBER 18
+#define MOD_WSGI_VERSION_STRING "4.4.18"
/* ------------------------------------------------------------------------- */