Bug 199516 - net/ss5: Segfaults due to missing /var/log/ss5 directory
Summary: net/ss5: Segfaults due to missing /var/log/ss5 directory
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Jason Unovitch
URL:
Keywords: needs-patch, needs-qa
Depends on:
Blocks:
 
Reported: 2015-04-18 12:46 UTC by dewayne
Modified: 2015-12-28 00:51 UTC (History)
3 users (show)

See Also:
koobs: maintainer-feedback? (raffaele.delorenzo)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dewayne 2015-04-18 12:46:47 UTC
First run of ss5 after a new installation of the ss5 package results in a segmentation fault due to missing /var/log/ss5

Performing a 
mkdir /var/log/ss5 && chmod 740 /var/log/ss5 fixes the problem.  This needs to be added to the Makefile or preferably pkg-plist?

Then running ss5 succeeds and runs correctly.

The /var/log/ss5/ss5.log is created and owned by root:wheel, while ps shows
nobody   91999  0.0  0.3  5668  2960  ??  S    10:31PM   0:00.09 /usr/local/sbin/ss5 -t

Ideally (a wish list), if a new id could be added to /usr/ports/UIDs and GIDs and the startup script run with the new uid:gid.  :)

Platform: amd64 10.1Stable (built 2 days ago). xeon processor.
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2015-04-18 14:37:41 UTC
Marcus, It appears this issue should have auto-assigned, but didnt
Comment 2 Kubilay Kocak freebsd_committer freebsd_triage 2015-04-18 14:41:43 UTC
@Dewayne,

This section of the Porters Handbook goes over how to create (empty) directories:

http://www2.au.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/book.html#plist-cleaning

If you need help getting a diff prepared, and testing the changes, don't hesitate to grab me on IRC
Comment 3 Marcus von Appen freebsd_committer freebsd_triage 2015-05-18 13:20:38 UTC
(In reply to Kubilay Kocak from comment #1)
> Marcus, It appears this issue should have auto-assigned, but didnt

No, it featured the wrong category.
Comment 4 Jason Unovitch freebsd_committer freebsd_triage 2015-12-28 00:47:00 UTC
Take. A segfault upon starting the service right after install does not present a good impression of the quality of the package.
Comment 5 commit-hook freebsd_committer freebsd_triage 2015-12-28 00:48:09 UTC
A commit references this bug:

Author: junovitch
Date: Mon Dec 28 00:47:32 UTC 2015
New revision: 404611
URL: https://svnweb.freebsd.org/changeset/ports/404611

Log:
  net/ss5: add /var/log/ss5 to plist

  - Create /var/log/ss5 to prevent segfault upon service start

  PR:		199516
  Reported by:	dewayne@heuristicsystems.com.au
  Approved by:	maintainer timeout (8 months)
  MFH:		2015Q4 (plist fix blanket)

Changes:
  head/net/ss5/Makefile
  head/net/ss5/pkg-plist
Comment 6 commit-hook freebsd_committer freebsd_triage 2015-12-28 00:49:11 UTC
A commit references this bug:

Author: junovitch
Date: Mon Dec 28 00:48:39 UTC 2015
New revision: 404612
URL: https://svnweb.freebsd.org/changeset/ports/404612

Log:
  MFH: r404611

  net/ss5: add /var/log/ss5 to plist

  - Create /var/log/ss5 to prevent segfault upon service start

  PR:		199516
  Reported by:	dewayne@heuristicsystems.com.au
  Approved by:	maintainer timeout (8 months)
  Approved by:	ports-secteam (plist fix blanket)

Changes:
_U  branches/2015Q4/
  branches/2015Q4/net/ss5/Makefile
  branches/2015Q4/net/ss5/pkg-plist
Comment 7 Jason Unovitch freebsd_committer freebsd_triage 2015-12-28 00:51:46 UTC
Dewayne,
Thank you for the report and sorry for the delay getting a fix into ports.  A minimal solution is in place so the package is operational out of the box.  If you can produce a patch for an improvement such as a dedicated UID/GID as you mentioned in comment 0 then please open a new PR appropriately titled for an improvement to the default security posture of the port.