Bug 161383 - security/snortsam version 2.7.0 returns bad code from system()
Summary: security/snortsam version 2.7.0 returns bad code from system()
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Michael Scheidell
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-07 22:20 UTC by Michael Scheidell
Modified: 2011-11-29 12:50 UTC (History)
0 users

See Also:


Attachments
file.diff (1.04 KB, patch)
2011-10-07 22:20 UTC, Michael Scheidell
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Scheidell 2011-10-07 22:20:01 UTC
not sure if its amd64, 7.4, or what.
other system() calls seem fine, but this one seem to fail when it should not.
(i checked, manually injecting ip's, taking them out, etc)

where the cli would return a 0x00 from a certain system() call, this one seems to return a 0x4700

(when it should be 0)

attached patch against 2.7.0 masks all but last 0xff.

Fix: change this:
if (system(ipfw2cmd) )

to this

if ((system(ipfw2cmd) && 0xff) ) 

see attached patch.
portversion bumped.  




Patch attached with submission follows:
How-To-Repeat: tail the log. look for this:

2011/10/07, 15:09:07, -, 2, snortsam, Removing 86400 sec complete block for host 221.231.140.206.
2011/10/07, 15:09:07, -, 1, ipfw2, Error: Command "/sbin/ipfw table 3 delete 221.231.140.206/32;/sbin/ipfw table 4 delete 221.231.140.206/32" Failed

added debug code and verified that its returning 0x4700, when command actually succeeded.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2011-10-07 22:20:15 UTC
Responsible Changed
From-To: freebsd-ports-bugs->gabor

gabor@ wants his PRs (via the GNATS Auto Assign Tool)
Comment 2 Edwin Groothuis freebsd_committer freebsd_triage 2011-10-07 22:20:21 UTC
Maintainer of security/snortsam,

Please note that PR ports/161383 has just been submitted.

If it contains a patch for an upgrade, an enhancement or a bug fix
you agree on, reply to this email stating that you approve the patch
and a committer will take care of it.

The full text of the PR can be found at:
    http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/161383

-- 
Edwin Groothuis via the GNATS Auto Assign Tool
edwin@FreeBSD.org
Comment 3 Edwin Groothuis freebsd_committer freebsd_triage 2011-10-07 22:20:26 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 4 Michael Scheidell freebsd_committer freebsd_triage 2011-11-28 19:57:15 UTC
Responsible Changed
From-To: gabor->scheidell

taking my own ports.
Comment 5 Michael Scheidell freebsd_committer freebsd_triage 2011-11-29 12:30:42 UTC
Are you still interested in maintaining snortsam or would you prefer 
that I take over responsibility for this port?
<http://www.freebsd.org/cgi/query-pr.cgi?pr=161383>

-- 
Michael Scheidell, CTO
o: 561-999-5000
d: 561-948-2259
 >*| *SECNAP Network Security Corporation

    * Best Mobile Solutions Product of 2011
    * Best Intrusion Prevention Product
    * Hot Company Finalist 2011
    * Best Email Security Product
    * Certified SNORT Integrator
Comment 6 dfilter service freebsd_committer freebsd_triage 2011-11-29 12:47:21 UTC
scheidell    2011-11-29 12:47:07 UTC

  FreeBSD ports repository

  Modified files:
    security/snortsam    Makefile 
  Added files:
    security/snortsam/files patch-ssp_ipfw2.c 
  Log:
  - on some (amd64, 7.4 at least), return from successful system call
  - was generating a 0x4700.  system calls sb short (0xff)
  - this patch masks the 0xff bits only, and is safe for all disto
  - Also sent upstream to author
  - Maintainer Timeout
  
  PR:             161383
  Approved by:    urisso@bsd.com.br (maintainer timeout) gabor (mentor)
  Feature safe:   yes
  
  Revision  Changes    Path
  1.5       +1 -0      ports/security/snortsam/Makefile
  1.1       +13 -0     ports/security/snortsam/files/patch-ssp_ipfw2.c (new)
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 7 Michael Scheidell freebsd_committer freebsd_triage 2011-11-29 12:47:52 UTC
State Changed
From-To: feedback->closed

Committed, Maintainer Timeout