[BACK]Return to cap_mkdb.1 CVS log [TXT][DIR] Up to [local] / src / usr.bin / cap_mkdb

Annotation of src/usr.bin/cap_mkdb/cap_mkdb.1, Revision 1.7

1.7     ! tholo       1: .\"    $OpenBSD: cap_mkdb.1,v 1.6 1998/09/23 04:32:36 aaron Exp $
1.1       deraadt     2: .\"    $NetBSD: cap_mkdb.1,v 1.4 1995/03/26 03:59:36 glass Exp $
                      3: .\"
                      4: .\" Copyright (c) 1992, 1993
                      5: .\"    The Regents of the University of California.  All rights reserved.
                      6: .\"
                      7: .\" Redistribution and use in source and binary forms, with or without
                      8: .\" modification, are permitted provided that the following conditions
                      9: .\" are met:
                     10: .\" 1. Redistributions of source code must retain the above copyright
                     11: .\"    notice, this list of conditions and the following disclaimer.
                     12: .\" 2. Redistributions in binary form must reproduce the above copyright
                     13: .\"    notice, this list of conditions and the following disclaimer in the
                     14: .\"    documentation and/or other materials provided with the distribution.
                     15: .\" 3. All advertising materials mentioning features or use of this software
                     16: .\"    must display the following acknowledgement:
                     17: .\"    This product includes software developed by the University of
                     18: .\"    California, Berkeley and its contributors.
                     19: .\" 4. Neither the name of the University nor the names of its contributors
                     20: .\"    may be used to endorse or promote products derived from this software
                     21: .\"    without specific prior written permission.
                     22: .\"
                     23: .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
                     24: .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
                     25: .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
                     26: .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
                     27: .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
                     28: .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
                     29: .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
                     30: .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
                     31: .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
                     32: .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
                     33: .\" SUCH DAMAGE.
                     34: .\"
                     35: .\"    @(#)cap_mkdb.1  8.1 (Berkeley) 6/6/93
                     36: .\"
1.4       deraadt    37: .Dd June, 6, 1993
1.1       deraadt    38: .Dt CAP_MKDB 1
                     39: .Os
                     40: .Sh NAME
                     41: .Nm cap_mkdb
                     42: .Nd create capability database
                     43: .Pp
                     44: .Sh SYNOPSIS
                     45: .Nm cap_mkdb
1.7     ! tholo      46: .Op Fl i
1.1       deraadt    47: .Op Fl v
                     48: .Op Fl f Ar outfile
                     49: .Ar file1
                     50: .Op Ar file2 ...
                     51: .Pp
                     52: .Sh DESCRIPTION
1.6       aaron      53: .Nm cap_mkdb
1.1       deraadt    54: builds a hashed database out of the
                     55: .Xr getcap 3
1.7     ! tholo      56: or
        !            57: .Xr terminfo 5
1.1       deraadt    58: logical database constructed by the concatenation of the specified
1.5       aaron      59: files.
1.1       deraadt    60: .Pp
                     61: The database is named by the basename of the first file argument and
                     62: the string
                     63: .Dq .db .
                     64: The
                     65: .Xr getcap 3
                     66: routines can access the database in this form much more quickly
                     67: than they can the original text file(s).
                     68: .Pp
                     69: The ``tc'' capabilities of the records are expanded before the
                     70: record is stored into the database.
                     71: .Pp
1.5       aaron      72: The options are as follows:
1.1       deraadt    73: .Bl -tag -width XXXXXX -indent
                     74: .It Fl f Ar outfile
                     75: Specify a different database basename.
1.7     ! tholo      76: .It Fl i
        !            77: Expect the capability records to be parsed to be in
        !            78: .Xr terminfo 5
        !            79: format.
1.1       deraadt    80: .It Fl v
                     81: Print out the number of capability records in the database.
                     82: .El
                     83: .Pp
                     84: .Sh FORMAT
                     85: Each record is stored in the database using two different types of keys.
                     86: .Pp
                     87: The first type is a key which consists of the first capability of
1.6       aaron      88: the record (not including the trailing colon
                     89: .Pq Sq \&: )
                     90: with a data
1.1       deraadt    91: field consisting of a special byte followed by the rest of the record.
                     92: The special byte is either a 0 or 1, where a 0 means that the record
                     93: is okay, and a 1 means that there was a ``tc'' capability in the record
                     94: that couldn't be expanded.
                     95: .Pp
                     96: The second type is a key which consists of one of the names from the
                     97: first capability of the record with a data field consisting a special
1.3       deraadt    98: byte followed by the first capability of the record.
1.1       deraadt    99: The special byte is a 2.
                    100: .Pp
                    101: In normal operation names are looked up in the database, resulting
                    102: in a key/data pair of the second type.
                    103: The data field of this key/data pair is used to look up a key/data
                    104: pair of the first type which has the real data associated with the
                    105: name.
                    106: .Sh RETURN VALUE
                    107: The
                    108: .Nm cap_mkdb
1.6       aaron     109: utility exits 0 on success or >0 if an error occurred.
1.1       deraadt   110: .Sh SEE ALSO
                    111: .Xr dbopen 3 ,
                    112: .Xr getcap 3 ,
1.7     ! tholo     113: .Xr termcap 5 ,
        !           114: .Xr terminfo 5