1 .TH 0STORE\-SECURE\-ADD 1 "2009" "Thomas Leonard" ""
3 0store\-secure\-add \(em add an implementation to the system cache
12 This command imports the current directory into the system-wide shared Zero
13 Install cache, as /var/cache/0install.net/implementations/DIGEST.
14 This allows a program downloaded by one user to be shared with other users.
17 The current directory must contain a file called '.manifest' listing all the
18 files to be added (in the format required by DIGEST), and this file must have the
19 given digest. If not, the import is refused. Therefore, it is only possible to
20 add a directory to the cache if its name matches its contents.
23 It is intended that it be safe to grant untrusted users permission to call
24 this command with elevated privileges. To set this up, see below.
26 .SH SETTING UP SHARING
28 To enable sharing, the system administrator should follow these steps:
31 Create a new system user to own the cache:
33 .B adduser \-\-system zeroinst
36 Create the shared directory, owned by this new user:
38 .B mkdir /var/cache/0install.net
40 .B chown zeroinst /var/cache/0install.net
43 Use visudo(8) to add these lines to /etc/sudoers:
45 .B Defaults>zeroinst env_reset
47 .B ALL ALL=(zeroinst) NOPASSWD: /usr/bin/0store\-secure\-add
50 Create a script called
51 .B 0store\-secure\-add\-helper
52 in PATH to call it. This script must be executable and contain these two lines:
58 exec sudo \-S \-u zeroinst /usr/bin/0store\-secure\-add "$@" < /dev/null
61 The other Zero Install programs will call this helper script automatically.
65 .IP "/var/cache/0install.net/implementations"
66 System-wide Zero Install cache.
70 Copyright (C) 2009 Thomas Leonard.
73 You may redistribute copies of this program under the terms of the GNU Lesser General Public License.
77 This program is EXPERIMENTAL. It has not been audited. Do not use it yet in
78 security-critial environments.
81 The env_reset line in sudoers may not be required. sudo(1) seems to do it automatically.
84 If sudo let us check whether we could call a command then we could switch to
85 using it automatically, instead of needing to add the helper script. Currently,
86 sudo delays for one second and writes to auth.log if we try to use this system
87 when it hasn't been set up.
90 Please report bugs to the developer mailing list:
92 http://0install.net/support.html
96 Zero Install was created by Thomas Leonard.
102 The Zero Install web-site:
104 .B http://0install.net