Download Install Tutorial Docs FAQ Tools WikiLicense Team IRC Planet Involvement Shop Book

Ticket #789 (defect)

Opened 3 months ago

Last modified 3 months ago

Bug in DropPrivileges plugin

Status: closed (fixed)

Reported by: Andrew Stromnov <stromnov@gmail.com> Assigned to: fumanchu
Priority: normal Milestone: 3.1
Component: CherryPy code Keywords:
Cc: stromnov@gmail.com

Bug in DropPrivileges? plugin (trunk). Probably 'gid' and 'uid' must be replaced with 'self.gid' and 'self.uid'.

  File "cherrypy/restsrv/plugins.py", line 146, in start
    if uid is None and gid is None:
UnboundLocalError: local variable 'uid' referenced before assignment

Change History

02/19/08 10:29:37: Modified by stromnov@gmail.com

  • cc set to stromnov@gmail.com.

Probably the same problem with 'umask' in Win-specific section

02/19/08 11:23:26: Modified by fumanchu

  • owner changed from rdelon to fumanchu.
  • status changed from new to assigned.

Bah. That's what we get for not having tests.

Should the DropPrivileges? plugin take uid, gid, umask constructor arguments?

02/19/08 11:50:34: Modified by stromnov@gmail.com

Yes, probably plugin should take this constructor arguments.

PS. Is this plugin compatible with Daemonizer plugin? Da

02/19/08 12:28:36: Modified by fumanchu

Fixed in [1895]. Can someone test it?

And yes, it should be compatible with the Daemonizer plugin (if not, that's another bug).

02/19/08 14:15:51: Modified by stromnov@gmail.com

Successfully tested on Win Vista. Probably "self.bus.log('uid/gid not set')" is unnecessary on win32 platform.

02/19/08 14:22:52: Modified by fumanchu

  • status changed from assigned to closed.
  • resolution set to fixed.

OK, removed the spurious log msg in [1896].

Hosted by WebFaction

Log in as guest/cpguest to create tickets