BSD 4_4 development
[unix-history] / usr / share / man / cat1 / cap_mkdb.0
CAP_MKDB(1) BSD Reference Manual CAP_MKDB(1)
N\bNA\bAM\bME\bE
c\bca\bap\bp_\b_m\bmk\bkd\bdb\bb - create capability database
S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
c\bca\bap\bp_\b_m\bmk\bkd\bdb\bb [-\b-v\bv] [-\b-f\bf _\bo_\bu_\bt_\bf_\bi_\bl_\be] _\bf_\bi_\bl_\be_\b1 [_\bf_\bi_\bl_\be_\b2 _\b._\b._\b.]
D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
C\bCa\bap\bp_\b_m\bmk\bkd\bdb\bb builds a hashed database out of the getcap(3) logical database
constructed by the concatenation of the specified files .
The database is named by the basename of the first file argument and the
string ``.db''. The getcap(3) routines can access the database in this
form much more quickly than they can the original text file(s).
The ``tc'' capabilities of the records are expanded before the record is
stored into the database.
The options as as follows:
-\b-f\bf _\bo_\bu_\bt_\bf_\bi_\bl_\be
Specify a different database basename.
-\b-v\bv Print out the number of capability records in the database.
F\bFO\bOR\bRM\bMA\bAT\bT
Each record is stored in the database using two different types of keys.
The first type is a key which consists of the first capability of the
record (not including the trailing colon (``:'')) with a data field con-
sisting of a special byte followed by the rest of the record. The spe-
cial byte is either a 0 or 1, where a 0 means that the record is okay,
and a 1 means that there was a ``tc'' capability in the record that
couldn't be expanded.
The second type is a key which consists of one of the names from the
first capability of the record with a data field consisting a special
byte followed by the the first capability of the record. The special
byte is a 2.
In normal operation names are looked up in the database, resulting in a
key/data pair of the second type. The data field of this key/data pair
is used to look up a key/data pair of the first type which has the real
data associated with the name.
R\bRE\bET\bTU\bUR\bRN\bN V\bVA\bAL\bLU\bUE\bE
The c\bca\bap\bp_\b_m\bmk\bkd\bdb\bb utility exits 0 on success and >0 if an error occurs.
S\bSE\bEE\bE A\bAL\bLS\bSO\bO
dbopen(3), getcap(3), termcap(5)
4.4BSD June 6, 1993 1