• Max Rees's avatar
    abuild-sudo: don't allow --keys-dir · 297de93a
    Max Rees authored
    Not allowing --allow-untrusted is obviously a good idea, but it can be
    trivially bypassed if --keys-dir is allowed:
    
    $ abuild-apk add foo-1-r0.apk
    ERROR: foo-1-r0.apk: UNTRUSTED signature
    $ abuild-apk --allow-untrusted add foo-1-r0.apk
    abuild-apk: --allow-untrusted: not allowed option
    $ cp -rp /etc/apk/keys /tmp/keys
    $ cp untrusted.pub /tmp/keys
    $ abuild-apk --keys-dir /tmp/keys add foo-1-r0.apk
    (1/1) Installing foo (1-r0)
    OK: 4319 MiB in 806 packages
    
    If both --allow-untrusted and --keys-dir are not allowed, then it should
    no longer be possible for an unprivileged member of the abuild group to
    add an untrusted package.
    
    $ abuild-apk --keys-dir /tmp/keys add foo-1-r0.apk
    abuild-apk: --keys-dir: not allowed option
    297de93a
Name
Last commit
Last update
.devbuildrc Loading commit data...
.editorconfig Loading commit data...
.gitignore Loading commit data...
APKBUILD.5 Loading commit data...
Makefile Loading commit data...
abuild-fetch.c Loading commit data...
abuild-gzsplit.c Loading commit data...
abuild-keygen.in Loading commit data...
abuild-rmtemp.c Loading commit data...
abuild-sign.in Loading commit data...
abuild-sudo.c Loading commit data...
abuild-tar.c Loading commit data...
abuild.conf Loading commit data...
abuild.in Loading commit data...
abump.in Loading commit data...
apkbuild-cpan.in Loading commit data...
apkbuild-gem-resolver.in Loading commit data...
apkbuild-pypi.in Loading commit data...
apkgrel.in Loading commit data...
bootchartd Loading commit data...
buildlab.in Loading commit data...
checkapk.in Loading commit data...
config.guess Loading commit data...
config.sub Loading commit data...
functions.sh.in Loading commit data...
newapkbuild.1 Loading commit data...
newapkbuild.in Loading commit data...
sample.APKBUILD Loading commit data...
sample.confd Loading commit data...
sample.initd Loading commit data...
sample.post-install Loading commit data...
sample.pre-install Loading commit data...