30 lines
821 B
Bash
30 lines
821 B
Bash
# Maintainer: Zeev <zeev@example.com>
|
|
pkgname=z-auth
|
|
pkgver=0.1.4
|
|
pkgrel=1
|
|
pkgdesc="Secure Z-Authentication Script (Hidden Source)"
|
|
arch=('any')
|
|
url="local"
|
|
license=('custom')
|
|
depends=('bash' 'zenity' 'sudo')
|
|
makedepends=('gcc')
|
|
install=z-auth.install
|
|
source=("z-auth.sh" "z-auth-wrapper.c")
|
|
md5sums=('SKIP' 'SKIP')
|
|
|
|
build() {
|
|
# Compile the setuid wrapper
|
|
gcc -o z-auth-wrapper z-auth-wrapper.c
|
|
}
|
|
|
|
package() {
|
|
# 1. Install the wrapper binary as /usr/bin/z-auth
|
|
# -D creates directories
|
|
# -m4755 sets permissions to rwsr-xr-x (Setuid Root)
|
|
install -Dm4755 z-auth-wrapper "$pkgdir/usr/bin/z-auth"
|
|
|
|
# 2. Install the actual script to a protected location
|
|
# /usr/lib/z-auth/core.sh
|
|
# -m0700 sets permissions to rwx------ (Root only)
|
|
install -Dm0700 z-auth.sh "$pkgdir/usr/lib/z-auth/core.sh"
|
|
}
|