main/autologin: new aport (MR 1659)
This commit is contained in:
parent
df51b94658
commit
da4c0a731b
3 changed files with 85 additions and 0 deletions
|
@ -0,0 +1,25 @@
|
|||
From 9f101dfd8a271fe05a4cad45c795453a2afcd696 Mon Sep 17 00:00:00 2001
|
||||
From: Clayton Craft <clayton@craftyguy.net>
|
||||
Date: Tue, 3 Nov 2020 02:08:30 -0800
|
||||
Subject: [PATCH] Fix uninitialized error on newer gcc
|
||||
|
||||
---
|
||||
main.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/main.c b/main.c
|
||||
index 9c31f45..3f03275 100644
|
||||
--- a/main.c
|
||||
+++ b/main.c
|
||||
@@ -76,7 +76,7 @@ void child_main(struct passwd *pwd, char* user_cmd, char** env) {
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
struct pam_conv conv = { pam_null_conv, NULL };
|
||||
- struct pam_handle* handle;
|
||||
+ struct pam_handle* handle = NULL;
|
||||
|
||||
check_pam(handle, "pam_start", pam_start("autologin", argv[1], &conv, &handle));
|
||||
check_pam(handle, "pam_acct_mgmt", pam_acct_mgmt(handle, PAM_SILENT));
|
||||
--
|
||||
2.29.2
|
||||
|
30
main/autologin/APKBUILD
Normal file
30
main/autologin/APKBUILD
Normal file
|
@ -0,0 +1,30 @@
|
|||
# Maintainer: Oliver Smith <ollieparanoid@postmarketos.org>
|
||||
pkgname=autologin
|
||||
pkgver=0_git20200406
|
||||
pkgrel=0
|
||||
_commit="feecd542c380e2147c7c7666237c917f88464a81"
|
||||
pkgdesc="Daemon for automatic login on TTY"
|
||||
url="https://git.sr.ht/~kennylevinsen/autologin"
|
||||
arch="all"
|
||||
license="GPL-3.0-only"
|
||||
makedepends="meson linux-pam-dev linux-headers"
|
||||
options="!check"
|
||||
source="https://git.sr.ht/~kennylevinsen/autologin/archive/$_commit.tar.gz
|
||||
autologin.pamd
|
||||
0001-Fix-uninitialized-error-on-newer-gcc.patch
|
||||
"
|
||||
builddir="$srcdir/autologin-$_commit"
|
||||
|
||||
build() {
|
||||
abuild-meson . output
|
||||
meson compile ${JOBS:+-j ${JOBS}} -C output
|
||||
}
|
||||
|
||||
package() {
|
||||
DESTDIR="$pkgdir" meson install -C output
|
||||
install -Dm644 "$srcdir"/autologin.pamd "$pkgdir"/etc/pam.d/autologin
|
||||
}
|
||||
|
||||
sha512sums="555070d2c8240b448f18f0198f68ef1ff6ac159ab9fe09a380dd7cf4ea97c2bb263707953c7946f6d89f1a557d45954c904f08c8964ea3ac3b46acc209035752 feecd542c380e2147c7c7666237c917f88464a81.tar.gz
|
||||
889c568bdbf407d730a68e648d03e17aaaed3e29da31b14a429277971eda34ddbf33e0f196213ebb36ee4714f6b743a18dfc1949dd3a40d5f50f29e5af226942 autologin.pamd
|
||||
3261f9a9bdee59b93ce277b7ab06c2a6064ab05664fa9cee5e74d11640e57e30f3ddbf986c6aa3536d4a8fd369653999a107a8b4f17ed3c2080808ed7306e039 0001-Fix-uninitialized-error-on-newer-gcc.patch"
|
30
main/autologin/autologin.pamd
Normal file
30
main/autologin/autologin.pamd
Normal file
|
@ -0,0 +1,30 @@
|
|||
#%PAM-1.0
|
||||
|
||||
# Block login if they are globally disabled
|
||||
auth required pam_nologin.so
|
||||
|
||||
# Load environment from /etc/environment and ~/.pam_environment
|
||||
auth required pam_env.so
|
||||
|
||||
# Allow access without authentication
|
||||
auth required pam_permit.so
|
||||
|
||||
# Stop autologin if account requires action
|
||||
account required pam_unix.so
|
||||
|
||||
# Can't change password
|
||||
password required pam_deny.so
|
||||
|
||||
# Setup session
|
||||
session required pam_unix.so
|
||||
session optional pam_elogind.so
|
||||
|
||||
# Unlock GNOME Keyring if available
|
||||
-auth optional pam_gnome_keyring.so
|
||||
-session optional pam_gnome_keyring.so auto_start
|
||||
|
||||
# Unlock KWallet if available
|
||||
-auth optional pam_kwallet.so
|
||||
-auth optional pam_kwallet5.so
|
||||
-session optional pam_kwallet.so auto_start
|
||||
-session optional pam_kwallet5.so auto_start
|
Loading…
Reference in a new issue