On upgrading to ZOPE 2.6.1 on HP-UX I get problems with the daemon not switching user. This is caused by the compilation of initgroups not passing #if defined(__unix__) || defined(unix) This appears to be the only place where unix or __unix__ is expected to be defined. Where is it expected to be set. Take out the #if and Zope works. Is there a better way of determining whether initgroups exists. I looked for any other version in CVS but it doesn't appear to be there at all. David.
David, I'm not sure how to get the test to pass under HPUX, but I've always been a bit suspicious about the need for "initgroups" (I've never actually understood exactly what it was for, to be honest). You may be better of just disabling its import in your Zope's z2.py: 834,837c834,837 < try: < import initgroups < except: < raise SystemExit, 'initgroups is required to safely setuid' ---
# try: # import initgroups # except: # raise SystemExit, 'initgroups is required to safely setuid' 871c871 < initgroups.initgroups(UID, gid)
# initgroups.initgroups(UID, gid)
----- Original Message ----- From: "David Cooper" <cooper@nato.nosc.mil> To: <zope-dev@zope.org> Sent: Monday, April 14, 2003 9:14 PM Subject: [Zope-dev] initgroups
On upgrading to ZOPE 2.6.1 on HP-UX I get problems with the daemon not switching user. This is caused by the compilation of initgroups not passing
#if defined(__unix__) || defined(unix)
This appears to be the only place where unix or __unix__ is expected to be defined. Where is it expected to be set.
Take out the #if and Zope works.
Is there a better way of determining whether initgroups exists.
I looked for any other version in CVS but it doesn't appear to be there at all.
David.
_______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
David Cooper wrote at 2003-4-14 18:14 -0700:
On upgrading to ZOPE 2.6.1 on HP-UX I get problems with the daemon not switching user. This is caused by the compilation of initgroups not passing
#if defined(__unix__) || defined(unix)
This appears to be the only place where unix or __unix__ is expected to be defined. Where is it expected to be set.
Usually, the compiler (preprocessor) defines some macros describing the platform. Usually, it defines either "__unix__" or "unix" on unix like platforms... Dieter
participants (3)
-
Chris McDonough -
David Cooper -
Dieter Maurer