0STORE-SECURE-ADD(1)
π 0STORE-SECURE-ADD(1) π
Manual name: 0store-secure-add β¨ (it's the command that adds an implementation to the system cache, obviously π
)
β¨ NAME β¨
0store-secure-add β add an implementation to the system cache π¦
β¨ SYNOPSIS β¨
0store-secure-add DIGEST
β¨ DESCRIPTION β¨
okay so this command takes whatever is in your current directory and imports it into the system-wide shared Zero Install cache πΈ, which lives at /var/cache/0install.net/implementations/DIGEST. the vibe is that a program one user downloaded can be shared with everyone else on the machine π«Ά
the current directory has to contain a file called .manifest that lists every file being added (in the format required by DIGEST), and that file has to match the given digest. if it doesn't, the import gets refused π so you can only add a directory to the cache if its name matches what's inside it. no cap, that's the whole security moment π
it's meant to be safe to let untrusted users run this command with elevated privileges. to set that up, check out the section below π
β¨ SETTING UP SHARING β¨
okay the system admin needs to follow these steps to turn sharing on π
first, create a new system user to own the cache:
adduser --system zeroinst
then make the shared directory, owned by that new user:
mkdir /var/cache/0install.net
chown zeroinst /var/cache/0install.net
next, use visudo(8) to add these lines to /etc/sudoers:
Defaults>zeroinst env_reset,always_set_home
ALL ALL=(zeroinst) NOPASSWD: /usr/bin/0store-secure-add
last step, make a script called 0store-secure-add-helper somewhere in your PATH that calls it π§ the script has to be executable and contain these two lines:
#!/bin/sh
exec sudo -S -u zeroinst /usr/bin/0store-secure-add "$@" < /dev/null
the other Zero Install programs will call this helper script automatically π main character energy for sure β
β¨ FILES β¨
/var/cache/0install.net/implementationsβ the System-wide Zero Install cache π¦
β¨ LICENSE β¨
Copyright (C) 2009 Thomas Leonard π©·
you're allowed to redistribute copies of this program under the terms of the GNU Lesser General Public License π
β¨ BUGS β¨
this program is EXPERIMENTAL π¨ it has NOT been audited, so do not use it yet in security-critical environments. bestie I'm serious π
the env_reset line in sudoers might not even be required, since sudo(1) seems to do it automatically π
if sudo let us check whether we could call a command, we could switch to using it automatically instead of needing the helper script. right now, sudo just sits there for one second and writes to auth.log if we try to use this system before it's been set up. it's giving rude π
please report bugs to the developer mailing list at http://0install.net/support.html π«Ά
β¨ AUTHOR β¨
Zero Install was created by Thomas Leonard π
β¨ SEE ALSO β¨
the Zero Install web-site lives at http://0install.net πΈ
Thomas Leonard Β· 2010 Β· 0STORE-SECURE-ADD(1) π
π¦ where this page comes from
- debian bookworm: 0install-core 2.18-2
- debian trixie: 0install-core 2.18-2.1
- ubuntu jammy: 0install-core 2.16-2
- ubuntu noble: 0install-core 2.18-2ubuntu2
- ubuntu questing: 0install-core 2.18-2.1build2
- ubuntu resolute: 0install-core 2.18-2.2
- ubuntu stonking: 0install-core 2.18-2.3
- π girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms