summaryrefslogtreecommitdiffstats
path: root/abuild-sudo.c
Commit message (Collapse)AuthorAgeFilesLines
* abuild-sudo: dont require root to be member of abuild groupNatanael Copa2020-03-231-3/+4
| | | | fixes #9984
* abuild-sudo: don't allow --keys-dirMax Rees2019-06-201-3/+15
| | | | | | | | | | | | | | | | | | | | | | 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
* abuild-sudo: remove unused variableRobert Hencke2019-03-141-1/+1
| | | | This prevents clang from issuing a warning here.
* abuild-sudo: prevent forging of user nameKaarle Ritvanen2017-07-201-10/+7
|
* abuild-sudo: fix segfault when there are no controlling termv3.0.0_rc4Natanael Copa2017-07-171-1/+13
| | | | | | if there are no controlling reminal getlogin() may return NULL. We use getpwuid() to try figure out the username and verify that we actually have a username before we set environment USER.
* abuild: build in chrootKaarle Ritvanen2017-06-271-0/+1
| | | | This patch is based on earlier work by Timo Teräs.
* abuild-sudo: enforce correct value for USERKaarle Ritvanen2017-06-271-1/+2
|
* abuild-sudo: allow commands with '-' in the nameKaarle Ritvanen2017-06-271-1/+6
|
* abuild-sudo.c: setgid as wellHenrik Riomar2017-06-211-0/+2
| | | | | set our gid to root so apk commit hooks run with the same gid as when running "sudo apk add ..." from command line.
* abuild-sudo: error check getlogin()Natanael Copa2016-04-141-1/+2
|
* abuild-sudo: make error msg "Not a member of group abuild" more clearJakub Jirutka2016-04-141-2/+4
| | | | | | | | | | | Few days ago some user on IRC pointed out that the current error message: abuild-apk: Not a member of group abuild is confusing. He was trying to build a package using abuild -r and didn't know what this message means. fixes #5408
* abuild-sudo: forbid use of --allow-untrustedNatanael Copa2013-12-161-0/+6
| | | | | It means that home built packages cannot be installed with abuild-apk unless the key is installed system-wide.
* various: add descriptions, attribution, licenseDubiousjim2013-07-081-0/+9
|
* abuild-sudo, abuild-tar: cosmetic changesDubiousjim2013-07-081-2/+2
|
* abuild-sudo: also look for adduser/group in /usr/sbinNatanael Copa2013-05-291-0/+4
| | | | seems like it moved in recent busybox. we need to support both variants
* abuild-sudo: print error message if execv failsNatanael Copa2013-05-291-1/+1
|
* abuild-sudo: new toolNatanael Copa2012-02-171-0/+81
mini sudo that checks if user is in "abuild" group and allows it to run apk, adduser adn addgroup as root ref #951