From: Ivan Gyurdiev <ivg2@cornell.edu>
To: SELinux List <SELinux@tycho.nsa.gov>
Cc: Stephen Smalley <sds@tycho.nsa.gov>
Subject: [ SEMANAGE 3 ] Common database code
Date: Mon, 31 Oct 2005 03:43:33 -0500 [thread overview]
Message-ID: <4365D935.1070601@cornell.edu> (raw)
[-- Attachment #1: Type: text/plain, Size: 1181 bytes --]
This patch merges the handling of the default database with transaction
management (enter_ro/exit_ro/exit_rw), and cache management, and puts
that in common (polymorphed) code - database.c. It changes relay
functions and internal invocation to use this code. In order to do that,
the cache() function was exposed in the database interface, and now it
must be called before other functionality dealing with records is used
(called internally, of course).
Also, cleans up includes for relay functions (and removes unnecessary
and obsolete defines of database backend - those relays should be
backend independent).
Benefits:
- transaction enter/exit code is now shared for all databases, and can
be easily changed
- this also removes duplicate code, and makes the per-backend database
code simpler
- no need to write things like get_rtable/flush/drop_cache in the
default database, which make no sense
- Note that the per-backend dbase functions are now reentrant-safe,
which means that I can layer one on top of another if I want to
- this still doesn't let me call other database functions from an
iterate() handler, but I think it might get us closer to this goal.
[-- Attachment #2: libsemanage.dbase_common.diff.bz2 --]
[-- Type: application/x-bzip, Size: 5175 bytes --]
next reply other threads:[~2005-10-31 8:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-31 8:43 Ivan Gyurdiev [this message]
2005-10-31 8:48 ` [ SEMANAGE 3 ] Common database code Ivan Gyurdiev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4365D935.1070601@cornell.edu \
--to=ivg2@cornell.edu \
--cc=SELinux@tycho.nsa.gov \
--cc=sds@tycho.nsa.gov \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.