summaryrefslogtreecommitdiff
path: root/user/physlock/utmps.patch
diff options
context:
space:
mode:
authorMax Rees <maxcrees@me.com>2019-04-18 03:20:26 -0400
committerMax Rees <maxcrees@me.com>2019-04-18 05:45:35 -0400
commit8d02783d1df53a4d4b636e0c6abc48eff75d3a29 (patch)
treef63c8b11cce0a65a3e154da28a81b497abfaf7fa /user/physlock/utmps.patch
parent0ff89d78c6fa7d5905e5674e6825d22dca4043fa (diff)
downloadpackages-8d02783d1df53a4d4b636e0c6abc48eff75d3a29.tar.gz
packages-8d02783d1df53a4d4b636e0c6abc48eff75d3a29.tar.bz2
packages-8d02783d1df53a4d4b636e0c6abc48eff75d3a29.tar.xz
packages-8d02783d1df53a4d4b636e0c6abc48eff75d3a29.zip
user/physlock: bump to 13
Diffstat (limited to 'user/physlock/utmps.patch')
-rw-r--r--user/physlock/utmps.patch30
1 files changed, 11 insertions, 19 deletions
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);