All of lore.kernel.org
 help / color / mirror / Atom feed
* [ SEMANAGE 3 ] Common database code
@ 2005-10-31  8:43 Ivan Gyurdiev
  2005-10-31  8:48 ` Ivan Gyurdiev
  0 siblings, 1 reply; 2+ messages in thread
From: Ivan Gyurdiev @ 2005-10-31  8:43 UTC (permalink / raw)
  To: SELinux List; +Cc: Stephen Smalley

[-- 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 --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [ SEMANAGE 3 ] Common database code
  2005-10-31  8:43 [ SEMANAGE 3 ] Common database code Ivan Gyurdiev
@ 2005-10-31  8:48 ` Ivan Gyurdiev
  0 siblings, 0 replies; 2+ messages in thread
From: Ivan Gyurdiev @ 2005-10-31  8:48 UTC (permalink / raw)
  To: SELinux List; +Cc: Stephen Smalley


>
> - 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.
>
I mean outside a transaction...inside a transaction this will work just 
fine as is..


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-10-31  8:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-31  8:43 [ SEMANAGE 3 ] Common database code Ivan Gyurdiev
2005-10-31  8:48 ` Ivan Gyurdiev

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.