Skip to content

Commit

Permalink
Use the standard libraries os.initgroups instead of the initgroups pa…
Browse files Browse the repository at this point in the history
…ckage.
  • Loading branch information
hannosch committed Jul 19, 2016
1 parent 71f7d99 commit 05ecffc
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
4 changes: 4 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ Features Added
- Products.BTreeFolder2 = 3.0
- Products.ExternalMethod = 3.0
- Products.MailHost = 3.0
- Products.OFSP = 3.0
- Products.PythonScripts = 3.0
- Products.SiteErrorLog = 3.0
- Products.StandardCacheManagers = 3.0
Expand All @@ -107,6 +108,9 @@ Features Added
Restructuring
+++++++++++++

- Remove dependency on initgroups. Use the standard libraries os.initgroups
instead.

- Removed nt_svcutils support from zopectl.

- Python 2.6 is no longer supported. Use Python 2.7.
Expand Down
4 changes: 1 addition & 3 deletions buildout.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,11 @@ eggs =
# RestrictedPython has an optional dependency on DateTime, make sure to run its
# tests with DateTime being available
RestrictedPython
initgroups
tempstorage
zExceptions
zLOG
ZopeUndo
# these are still dependencies of CMF. Test them here, so we don't have to
# define a CMF KGS
# Test optional dependencies.
Products.BTreeFolder2
Products.ExternalMethod
Products.MailHost
Expand Down
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ def _read_file(filename):
'ZopeUndo',
'docutils',
'five.globalrequest',
'initgroups',
'pytz',
'setuptools',
'tempstorage',
Expand Down
4 changes: 2 additions & 2 deletions src/Zope2/Startup/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,8 +404,8 @@ def dropPrivileges(cfg):
raise ZConfig.ConfigurationError(msg)

try:
import initgroups
initgroups.initgroups(effective_user, gid)
from os import initgroups
initgroups(effective_user, gid)
os.setgid(gid)
except OSError:
logger.exception('Could not set group id of effective user')
Expand Down
4 changes: 2 additions & 2 deletions versions.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@ Acquisition = 4.2.2
DateTime = 4.1.1
DocumentTemplate = 2.13.2
ExtensionClass = 4.1.2
initgroups = 2.13.0
Missing = 3.1
MultiMapping = 3.0
Persistence = 3.0a1
Products.OFSP = 2.13.2
Products.OFSP = 3.0
Products.ZCatalog = 3.2
Products.ZCTextIndex = 3.0
Record = 3.1
Expand All @@ -24,6 +23,7 @@ zLOG = 3.0
ZopeUndo = 4.1

# Optional dependencies
initgroups = 3.0
Products.BTreeFolder2 = 3.0
Products.ExternalMethod = 3.0
Products.MailHost = 3.0
Expand Down

0 comments on commit 05ecffc

Please sign in to comment.