Bug #233

lighttpd tries to connect to FAM before dropping priviledges

Added by Anonymous 1229 days ago. Updated 550 days ago.

Status:Fixed Start:
Priority:Normal Due date:
Assigned to:- % Done:

0%

Category:core
Target version:-
Pending:

Resolution:

fixed


Description

lighttpd calls stat_cache_init() before dropping priviledges (in the case where server.(user|group)name is set), meaning the fam process is started as root. Just afterwards, lighttpd will drop privilidges and is unable to use the fam process (this is probably also the cause of the HUP's that were being recieved, that changeset 622 works around).

Also, with the introduction of changeset 622, comes the possibility that FAMOpen2() might fail because famd isn't running (if using fam over gamin). The attached patch also takes care of this condition.

One totally unrelated fix is included in the patch. If for some reason setitimer() ever failed, it would cause a segfault due to invalid use of log_error_write().

-- Aaron Walker <ka0ttic

10_all_stat_cache_init_after_setuid.diff - -- Aaron Walker <ka0ttic (1.4 KB) Anonymous, 08/27/2005 11:42 AM

History

08/27/2005 02:36 PM - jan

  • Status changed from New to Fixed
  • Resolution set to fixed

merged in r629

Also available in: Atom PDF