Bug 195910 - net/ngrep: Add capsicum sandboxing support
Summary: net/ngrep: Add capsicum sandboxing support
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Kubilay Kocak
URL:
Keywords: easy, needs-qa, patch-ready
Depends on:
Blocks:
 
Reported: 2014-12-12 03:53 UTC by logan
Modified: 2014-12-22 12:10 UTC (History)
3 users (show)

See Also:
edwin: maintainer-feedback+


Attachments
capsicum for ngrep (5.25 KB, patch)
2014-12-12 03:53 UTC, logan
no flags Details | Diff
capsicum for ngrep (5.25 KB, patch)
2014-12-12 03:59 UTC, logan
no flags Details | Diff
capsicum for ngrep (5.26 KB, patch)
2014-12-12 04:14 UTC, logan
no flags Details | Diff
capsicum for ngrep (5.53 KB, patch)
2014-12-12 07:33 UTC, logan
no flags Details | Diff
updated diff (5.42 KB, patch)
2014-12-18 14:28 UTC, Mark Felder
no flags Details | Diff
poudriere log (18.23 KB, text/plain)
2014-12-18 14:30 UTC, Mark Felder
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description logan 2014-12-12 03:53:08 UTC
Created attachment 150498 [details]
capsicum for ngrep

Implement capsicum support as default for ngrep.

(Please note that upstream author has not responded to our mail requests).
Comment 1 logan 2014-12-12 03:59:46 UTC
Created attachment 150499 [details]
capsicum for ngrep

Fix Makefile option to use proper variable
Comment 2 logan 2014-12-12 04:14:39 UTC
Created attachment 150500 [details]
capsicum for ngrep

Upload correct version of the diff (Thanks to astrodog).
Comment 3 Harrison Grundy 2014-12-12 04:24:47 UTC
No regression, works here.
Comment 4 Edwin Groothuis freebsd_committer freebsd_triage 2014-12-12 04:35:31 UTC
If it works, please commit it.
If you want to become maintainer, please be it.
Comment 5 logan 2014-12-12 04:42:55 UTC
(In reply to Edwin Groothuis from comment #4)
> If it works, please commit it.
> If you want to become maintainer, please be it.

Hi Edwin,

I will be happy to maintain it, however, please note that I can't commit changes.

(I have a few more changes coming up for improving capsicum support a bit more).
Comment 6 logan 2014-12-12 07:33:44 UTC
Created attachment 150502 [details]
capsicum for ngrep

Restrict ioctl operations, instead of blindly allowing all of them.
Comment 7 Mark Linimon freebsd_committer freebsd_triage 2014-12-12 18:57:00 UTC
Fix Summary and assign.
Comment 8 Kubilay Kocak freebsd_committer freebsd_triage 2014-12-18 13:36:49 UTC
Progress pending the following changes:

- Update patch to include MAINTAINER change
- Use OPTIONS helpers for MCAPSICUM
- Attach successful poudriere output
Comment 9 Mark Felder freebsd_committer freebsd_triage 2014-12-18 14:28:57 UTC
Created attachment 150718 [details]
updated diff

update MAINTAINER, change options to new style, PORTREVISION bump, add LICENSE, please portlint
Comment 10 Mark Felder freebsd_committer freebsd_triage 2014-12-18 14:30:09 UTC
Created attachment 150719 [details]
poudriere log

poudriere build log. I have others for 8.4, 9.3, and 10.1. They all built fine.

Have *not* tested running ngrep, though.
Comment 11 logan 2014-12-18 18:10:05 UTC
(In reply to Mark Felder from comment #10)
> Created attachment 150719 [details]
> poudriere log
> 
> poudriere build log. I have others for 8.4, 9.3, and 10.1. They all built
> fine.
> 
> Have *not* tested running ngrep, though.

I've tested with ngrep running. I'll ask astrodog if he can confirm on his build.

Thank you Mark !
Comment 12 Harrison Grundy 2014-12-18 18:25:52 UTC
Runs here.
Comment 13 commit-hook freebsd_committer freebsd_triage 2014-12-22 12:08:35 UTC
A commit references this bug:

Author: koobs
Date: Mon Dec 22 12:08:14 UTC 2014
New revision: 375232
URL: https://svnweb.freebsd.org/changeset/ports/375232

Log:
  net/ngrep: Add Capcisum sandboxing support

  - Add OPTION and patches for Capsicum support
  - Update MAINTAINER
  - Add LICENSE (BSD4CLAUSE) and LICENSE_FILE
  - Use OPTIONS helpers
  - Sort USES/USE section
  - Sort OPTIONS_DEFAULT

  PR:		195910 (with changes)
  Submitted by:	logan at elandsys com
  Submitted by:	feld
  Approved by:	maintainer (edwin)

Changes:
  head/net/ngrep/Makefile
  head/net/ngrep/files/patch-Configure.in
  head/net/ngrep/files/patch-ngrep.c
Comment 14 Kubilay Kocak freebsd_committer freebsd_triage 2014-12-22 12:10:31 UTC
Committed, with the following changes:

- WRKSRC override not required, defaults to ${PORTNAME-PORTVERSION}
- Use *_CONFIGURE_{ON,ENABLE} instead of *_CONFIGURE_ARGS (invalid)
- Remove USE_AUTOTOOLS=autoconf (unecessary)
- Add LICENSE_FILE
- Use OPTIONS helpers
- Sort USES/USE section
- Sort OPTIONS_DEFAULT

Thanks Logan & Mark!