summaryrefslogtreecommitdiff
path: root/user
diff options
context:
space:
mode:
Diffstat (limited to 'user')
-rw-r--r--user/physlock/APKBUILD12
-rw-r--r--user/physlock/makefile.patch14
-rw-r--r--user/physlock/utmps.patch30
3 files changed, 31 insertions, 25 deletions
diff --git a/user/physlock/APKBUILD b/user/physlock/APKBUILD
index a2c4e471f..f9a5f9574 100644
--- a/user/physlock/APKBUILD
+++ b/user/physlock/APKBUILD
@@ -1,7 +1,7 @@
# Contributor: Max Rees <maxcrees@me.com>
# Maintainer: Max Rees <maxcrees@me.com>
pkgname=physlock
-pkgver=11
+pkgver=13
pkgrel=0
pkgdesc="Lightweight Linux console-locking tool"
url="https://github.com/muennich/physlock"
@@ -12,17 +12,17 @@ depends=""
makedepends="linux-headers linux-pam-dev utmps-dev"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/muennich/physlock/archive/v$pkgver.tar.gz
- utmps.patch"
+ utmps.patch
+ makefile.patch"
build() {
- cd "$builddir"
make
}
package() {
- cd "$builddir"
make PREFIX="/usr" DESTDIR="$pkgdir" install
}
-sha512sums="d3badf5c99e4e3e16f4e7ec5c59ee8320c845f1b180463900d816206362ce1aa8652f2489453ad5e190cceee2ed61a90acc52e25bb6b4c4a9dc8c4ebd3054938 physlock-11.tar.gz
-d461b462dedfb7505f506ce1050d5140b8729f50a383157157e4f65465f63174cc11dc0a46cc1eed57cec0293006c5ec6cc6e96af9acab009ab3c9fe5e2381d5 utmps.patch"
+sha512sums="85c291fb7b146fbd81aacbf94d8af07e727dd9b37b458988eaee5f7a51f9923871f9b19fd9438428635963864de67d3f2a72f938d99ffe6dc3015c3a1b99ea1c physlock-13.tar.gz
+69367872c48985db31f2d84b038089da71e48ca79db0b0089f4a94f0cd853409bf9253fd5ee0b0729c01d9252072be1998141fad675baee97e93af1100ce71e6 utmps.patch
+54119c1059231f15ab5ea5543583e12f7e3f9907e9c71b3ec76b10ee5df64a0303d6caf88be9c768d7b679cfcaf0a374c924a3232f221329bc54d22b31c771ce makefile.patch"
diff --git a/user/physlock/makefile.patch b/user/physlock/makefile.patch
new file mode 100644
index 000000000..9cae82168
--- /dev/null
+++ b/user/physlock/makefile.patch
@@ -0,0 +1,14 @@
+--- physlock-13/Makefile 2019-01-28 18:46:20.000000000 +0000
++++ physlock-13/Makefile 2019-04-18 07:17:28.779909174 +0000
+@@ -7,9 +7,9 @@
+ MANPREFIX = $(PREFIX)/share/man
+
+ # enable user detection using libsystemd
+-HAVE_SYSTEMD = 1
++HAVE_SYSTEMD = 0
+
+-cflags = -Wall -pedantic $(CFLAGS)
++cflags = -D_GNU_SOURCE -Wall -pedantic $(CFLAGS)
+ cppflags = -I. $(CPPFLAGS) -D_XOPEN_SOURCE=500
+
+ lib_systemd_0 =
diff --git a/user/physlock/utmps.patch b/user/physlock/utmps.patch
index efae166a9..f3ba5e575 100644
--- a/user/physlock/utmps.patch
+++ b/user/physlock/utmps.patch
@@ -1,31 +1,23 @@
---- physlock-11/auth.c 2017-07-13 07:23:52.000000000 +0000
-+++ physlock-11/auth.c 2018-09-21 21:21:36.240024566 +0000
-@@ -16,13 +16,14 @@
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-+#define _GNU_SOURCE
- #include <paths.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
+--- physlock-13/session.c 2019-01-28 18:46:20.000000000 +0000
++++ physlock-13/session.c 2019-04-18 07:11:54.749911535 +0000
+@@ -6,7 +7,7 @@
#include <pwd.h>
#include <unistd.h>
+ #include <errno.h>
-#include <utmp.h>
+#include <utmpx.h>
- #include <errno.h>
- #include <security/pam_misc.h>
-
-@@ -41,12 +42,12 @@ static void get_pam(userinfo_t *uinfo) {
- void get_user(userinfo_t *uinfo, int vt, uid_t owner) {
+ #if HAVE_SYSTEMD
+ #include <systemd/sd-login.h>
+@@ -50,11 +51,11 @@
+ int get_user_utmp(userinfo_t *uinfo, int vt) {
+ int ret = -1;
FILE *uf;
- struct utmp r;
+ struct utmpx r;
- struct passwd *pw;
- char tty[16], name[UT_NAMESIZE+1];
+ char tty[UT_LINESIZE+1], name[UT_NAMESIZE+1];
- uinfo->name = NULL;
+ name[0] = '\0';
- while ((uf = fopen(_PATH_UTMP, "r")) == NULL && errno == EINTR);
+ while ((uf = fopen(UTMPX_FILE, "r")) == NULL && errno == EINTR);