Debian Codegraph @

cvm-sqlite.html

raw
1 <html>
2 <body>
3
4 <h2><a href="http://untroubled.org/cvm/cvm.html">CVM</a></h2>
5 <h2><a href="http://untroubled.org/cvm/sql.html">CVM SQL Framework</a></h2>
6
7 <h1>The cvm-sqlite Module</h1>
8
9 <h2>Synopsis:</h2> <p>SQLite module</p>
10
11 <h2>Credentials:</h2>
12
13 <ol>
14 <li>Pass phrase
15 </ol>
16
17 <h2>Description:</h2>
18
19 <p>This module queries an
20 <a href="http://www.sqlite.org/">SQLite</a>
21 database for credential validation.
22 </p>
23
24 <h2>Configuration Variables:</h2>
25
26 <p>The following environmental variables are required in the
27 execution environment of <tt>cvm-sqlite</tt>:
28 </p>
29
30 <dl>
31 <dt><tt>$CVM_SQLITE_DB</tt></dt>
32 <dd>The full path to the credential database file.</dd>
33
34 <dt><tt>$CVM_SQLITE_QUERY</tt></dt>
35 <dd>The SQL query statement used to submit for credential validation.</dd>
36
37 <dt><tt>$CVM_SQLITE_PWCMP</tt></dt>
38 <dd>The <a
39 href="http://untroubled.org/pwcmp/pwcmp.html">password comparison module</a> to use.
40 Set to one of two values:
41 <ul>
42 <li>'crypt', for passwords stored encrypted</li>
43 <li>'plain', for passwords stored unencrypted</li>
44 </ul></dd>
45
46 </dl>
47
48 <h2>Sample Schema</h2>
49
50 <p>The following <tt>CREATE TABLE</tt> statement is shown as an example
51 for initializing an SQLite database for use with this CVM:</p>
52
53 <pre>
54 <tt>
55 CREATE TABLE accounts (
56 username TEXT NOT NULL, -- required
57 domain TEXT NOT NULL DEFAULT '',
58 password TEXT NOT NULL, -- required
59 userid TEXT NOT NULL, -- required
60 groupid TEXT NOT NULL, -- required
61 realname TEXT, -- opt
62 directory TEXT NOT NULL, -- required
63 shell TEXT, -- opt
64 groupname TEXT, -- opt
65 sys_username TEXT, -- opt
66 sys_directory TEXT, -- opt
67 mailbox_path TEXT, -- opt
68 UNIQUE (username, domain)
69 );
70 </tt>
71 </pre>
72
73 <h2>Sample Query</h2>
74
75 <p>The following example shows <tt>CVM_SQLITE_QUERY</tt>
76 defined with a query statement for use with the above schema:</p>
77
78 <pre>
79 <tt>
80 CVM_SQLITE_QUERY='
81 SELECT
82 -- required:
83 password, username, userid, groupid, directory,
84 -- optional gecos:
85 realname, shell,
86 -- optional other:
87 groupname, domain, sys_username, sys_directory, mailbox_path
88 FROM accounts
89 WHERE username=$account
90 AND domain=$domain '
91 </tt>
92 </pre>
93
94
95 </body>
96 </html>