Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Commit [3c19d8] Maximize Restore History

api: remove the internal state and make the API context-aware

IMPORTANT: WILL CAUSE BREAKAGE WITH v0.1.x API

The current API relies on the library storing internal state about
the filter context. While this is okay in several cases, it may
cause problems in others, e.g. threaded applications.

Since the bulk of the library already operates on a filter context,
known as "struct db_filter", this patch simply adds an additional
parameter to the public API, exporting this context as an opaque
context/handle.

Signed-off-by: Paul Moore <pmoore@redhat.com>

Paul Moore Paul Moore 2012-07-23

changed include
changed include/seccomp.h
changed src
changed src/api.c
changed src/db.c
changed src/db.h
changed tests
changed tests/01-allow.c
changed tests/02-basic.c
changed tests/03-basic-chains.c
changed tests/04-multilevel-chains.c
changed tests/05-long-jumps.c
changed tests/06-actions.c
changed tests/07-db-bug-looping.c
changed tests/08-subtree-checks.c
changed tests/09-syscall-priority-pre.c
changed tests/10-syscall-priority-post.c
changed tests/11-basic-errors.c
changed tests/12-basic-masked-ops.c
changed tests/13-attrs.c
changed tests/util.c
changed tests/util.h
include
Directory.
include/seccomp.h Diff Switch to side-by-side view
Loading...
src
Directory.
src/api.c Diff Switch to side-by-side view
Loading...
src/db.c Diff Switch to side-by-side view
Loading...
src/db.h Diff Switch to side-by-side view
Loading...
tests
Directory.
tests/01-allow.c Diff Switch to side-by-side view
Loading...
tests/02-basic.c Diff Switch to side-by-side view
Loading...
tests/03-basic-chains.c Diff Switch to side-by-side view
Loading...
tests/04-multilevel-chains.c Diff Switch to side-by-side view
Loading...
tests/05-long-jumps.c Diff Switch to side-by-side view
Loading...
tests/06-actions.c Diff Switch to side-by-side view
Loading...
tests/07-db-bug-looping.c Diff Switch to side-by-side view
Loading...
tests/08-subtree-checks.c Diff Switch to side-by-side view
Loading...
tests/09-syscall-priority-pre.c Diff Switch to side-by-side view
Loading...
tests/10-syscall-priority-post.c Diff Switch to side-by-side view
Loading...
tests/11-basic-errors.c Diff Switch to side-by-side view
Loading...
tests/12-basic-masked-ops.c Diff Switch to side-by-side view
Loading...
tests/13-attrs.c Diff Switch to side-by-side view
Loading...
tests/util.c Diff Switch to side-by-side view
Loading...
tests/util.h Diff Switch to side-by-side view
Loading...