~ubuntu-branches/ubuntu/maverick/evolution-data-server/maverick-proposed

« back to all changes in this revision

Viewing changes to libdb/docs/ref/env/security.html

  • Committer: Bazaar Package Importer
  • Author(s): Didier Roche
  • Date: 2010-05-17 17:02:06 UTC
  • mfrom: (1.1.79 upstream) (1.6.12 experimental)
  • Revision ID: james.westby@ubuntu.com-20100517170206-4ufr52vwrhh26yh0
Tags: 2.30.1-1ubuntu1
* Merge from debian experimental. Remaining change:
  (LP: #42199, #229669, #173703, #360344, #508494)
  + debian/control:
    - add Vcs-Bzr tag
    - don't use libgnome
    - Use Breaks instead of Conflicts against evolution 2.25 and earlier.
  + debian/evolution-data-server.install,
    debian/patches/45_libcamel_providers_version.patch:
    - use the upstream versioning, not a Debian-specific one 
  + debian/libedata-book1.2-dev.install, debian/libebackend-1.2-dev.install,
    debian/libcamel1.2-dev.install, debian/libedataserverui1.2-dev.install:
    - install html documentation
  + debian/rules:
    - don't build documentation it's shipped with the tarball

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<!--$Id$-->
2
 
<!--Copyright 1997-2002 by Sleepycat Software, Inc.-->
3
 
<!--All rights reserved.-->
4
 
<!--See the file LICENSE for redistribution information.-->
5
 
<html>
6
 
<head>
7
 
<title>Berkeley DB Reference Guide: Security</title>
8
 
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
9
 
<meta name="keywords" content="embedded,database,programmatic,toolkit,b+tree,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,java,C,C++">
10
 
</head>
11
 
<body bgcolor=white>
12
 
<a name="2"><!--meow--></a>
13
 
<table width="100%"><tr valign=top>
14
 
<td><h3><dl><dt>Berkeley DB Reference Guide:<dd>Environment</dl></h3></td>
15
 
<td align=right><a href="../../ref/env/region.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../../reftoc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../../ref/env/encrypt.html"><img src="../../images/next.gif" alt="Next"></a>
16
 
</td></tr></table>
17
 
<p>
18
 
<h1 align=center>Security</h1>
19
 
<p>The following are security issues that should be considered when writing
20
 
Berkeley DB applications:
21
 
<p><dl compact>
22
 
<p><dt>Database environment permissions<dd>The directory used as the Berkeley DB database environment should have its
23
 
permissions set to ensure that files in the environment are not accessible
24
 
to users without appropriate permissions.  Applications that add to the
25
 
user's permissions (for example, UNIX setuid or setgid applications),
26
 
must be carefully checked to not permit illegal use of those permissions
27
 
such as general file access in the environment directory.
28
 
<p><dt>Environment variables<dd>Setting the <a href="../../api_c/env_open.html#DB_USE_ENVIRON">DB_USE_ENVIRON</a> and <a href="../../api_c/env_open.html#DB_USE_ENVIRON_ROOT">DB_USE_ENVIRON_ROOT</a> flags
29
 
and allowing the use of environment variables during file naming can be
30
 
dangerous.  Setting those flags in Berkeley DB applications with additional
31
 
permissions (for example, UNIX setuid or setgid applications) could
32
 
potentially allow users to read and write databases to which they would
33
 
not normally have access.
34
 
<p><dt>File permissions<dd>By default, Berkeley DB always creates files readable and writable by the owner
35
 
and the group (that is, S_IRUSR, S_IWUSR, S_IRGRP and S_IWGRP; or octal mode
36
 
0660 on historic UNIX systems).  The group ownership of created files is
37
 
based on the system and directory defaults, and is not further specified
38
 
by Berkeley DB.
39
 
<p><dt>Temporary backing files<dd>If an unnamed database is created and the cache is too small to hold
40
 
the database in memory, Berkeley DB will create a temporary physical file to
41
 
enable it to page the database to disk as needed.  In this case,
42
 
environment variables such as <b>TMPDIR</b> may be used to specify
43
 
the location of that temporary file.  Although temporary backing files
44
 
are created readable and writable by the owner only (S_IRUSR and
45
 
S_IWUSR, or octal mode 0600 on historic UNIX systems), some filesystems
46
 
may not sufficiently protect temporary files created in random
47
 
directories from improper access.  To be absolutely safe, applications
48
 
storing sensitive data in unnamed databases should use the
49
 
<a href="../../api_c/env_set_tmp_dir.html">DB_ENV-&gt;set_tmp_dir</a> method to specify a temporary directory with
50
 
known permissions.
51
 
</dl>
52
 
<table width="100%"><tr><td><br></td><td align=right><a href="../../ref/env/region.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../../reftoc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../../ref/env/encrypt.html"><img src="../../images/next.gif" alt="Next"></a>
53
 
</td></tr></table>
54
 
<p><font size=1><a href="http://www.sleepycat.com">Copyright Sleepycat Software</a></font>
55
 
</body>
56
 
</html>