Switch branches/tags
Nothing to show
Commits on Jan 21, 2018
  1. Block start up until port process is running

    msantos committed Jan 21, 2018
    Fixes #23
    Thanks @brennana!
Commits on Jan 19, 2018
  1. epcap_send: return exit value

    msantos committed Jan 19, 2018
    Prepare for returning values to be used for the exit value of the
    port. Currently it is just ignored.
Commits on Jan 18, 2018
  1. epcap: add null sandbox

    msantos committed Jan 18, 2018
Commits on Jan 17, 2018
Commits on Jan 16, 2018
  1. Optionally specify time unit

    msantos committed Jan 16, 2018
    Include the timestamp in the deprecated erlang:now/0 format (default) or
    in microseconds:
        epcap:start([{time_unit, timestamp | microsecond}])
Commits on Jan 13, 2018
  1. tests: increase timeout trap

    msantos committed Jan 13, 2018
Commits on Jan 12, 2018
Commits on Jan 11, 2018
  1. epcap: set name in process list

    msantos committed Jan 11, 2018
    Use setproctitle(3) to label the port processes. On linux,
    setproctitle is not available in the standard library (it can be used if
    libbsd is available) so include the version from redis:
Commits on Jan 2, 2018
Commits on Jan 1, 2018
  1. Use pipe EOF to detect child exit

    msantos committed Jan 1, 2018
    Instead of relying on SIGCHLD, use a pair of file descriptors between
    the parent/child to "signal" if the capture process has exited.
Commits on Dec 31, 2017
  1. freebsd: add capsicum sandbox

    msantos committed Dec 31, 2017
    Add support for capsicum on freebsd:
        EPCAP_SANDBOX=capsicum rebar3 do clean, compile, ct
    This change adds some ifdef's to use process descriptors (why don't all
    unix'es support process descriptors? looking at you linux) because after
    capability mode is entered the supervisor process will not be able to
    signal the child process by PID.
Commits on Dec 29, 2017
  1. Remove use of errx()

    msantos committed Dec 29, 2017
Commits on Dec 28, 2017
  1. bsd: include for INT32_MAX

    msantos committed Dec 28, 2017
Commits on Dec 27, 2017
  1. rebar: don't override CFLAGS

    msantos committed Dec 27, 2017
Commits on Dec 26, 2017
  1. Move rlimit restrictions to sandbox

    msantos committed Dec 26, 2017
    Begin re-organizing to add support for different sandboxes: seccomp/Linux,
    pledge/OpenBSD, capsicum/FreeBSD, rlimit/any, null/any.
    This change is the minimum required to enforce the rlimit restrictions
    as is done today. Future sandboxing may be done in several stages:
    * init : minimize privileges before any resources are allocated
    * {inject, true|false}: further restrict capabilities based on options
Commits on Dec 5, 2017
Commits on Dec 4, 2017
Commits on Nov 29, 2017
  1. atoi(3) -> strtonum(3)

    msantos committed Nov 29, 2017
    Switch to using strtonum(). Fix types to match pcap.
Commits on Nov 23, 2017
  1. Switch eunit -> common test

    msantos committed Nov 23, 2017
    TBD: send test is failing
Commits on Nov 22, 2017
  1. Allow {verbose,0}

    msantos committed Nov 22, 2017
Commits on Nov 21, 2017
  1. demacrofy: remove IS_LTZERO() macro

    msantos committed Nov 21, 2017
    Return from epcap_priv_drop() on error.
Commits on Nov 20, 2017
  1. epcap_return: return on failure

    msantos committed Nov 20, 2017
    If opening the pcap descriptor fails, return and allow the main flow
    control to exit.
    Save the pcap error message to the epcap state. Currently the error
    message is discarded. The plan is to send it to the port process.
Commits on Nov 19, 2017
  1. demacrofy: return errno

    msantos committed Nov 19, 2017
    Begin removing macros. Error messages written to stderr are not
    structured and difficult to capture by the caller of the function.
    Exit with ENOMEM on allocation failures. A future change could return an
    error tuple to the caller: {error, enomem}.
Commits on Nov 14, 2017
Commits on Nov 13, 2017
Commits on Jul 15, 2017
Commits on Oct 19, 2016
  1. Add dialyzer warnings

    msantos committed Oct 19, 2016
Commits on Sep 26, 2016
Commits on Sep 1, 2016
  1. rebar3: update gitignore

    msantos committed Sep 1, 2016
Commits on Jul 31, 2016
  1. test: use EPCAP_TEST_EXEC for privs

    msantos committed Jul 31, 2016
    For example, on OpenBSD:
        EPCAP_TEST_EXEC="doas" rebar3 eunit
Commits on Jul 23, 2016
Commits on Jul 22, 2016
  1. Build epcap with fortify

    msantos committed Jul 22, 2016
Commits on Jul 21, 2016
  1. rebar3.config.script: remove duplicate flags

    msantos committed Jul 21, 2016
    Avoid appending redundant compiler flags.
    Use a port to spawn cc to retrieve the exit status. Store the test code
    for the pcap_create test in /tmp by default (set the TMPDIR environment
    variable to change this).
Commits on Jul 20, 2016
  1. Switch to rebar3

    msantos committed Jul 20, 2016
    Use rebar3 and a makefile to generate the port binary. The makefile
    introduces some changes for the compiler flags which may need cleaning up.
    Linker and compiler flags are passed to the makefile using environment
    Some things left to do:
    * remove duplication of flags generated by rebar.config.script
    * add gcc hardening flags to makefile
    * move to common test
Commits on Aug 14, 2015
  1. Add spec for epcap:timeout/0

    ates committed Aug 14, 2015