summaryrefslogtreecommitdiff
path: root/user/physlock/utmps.patch
diff options
context:
space:
mode:
authorMax Rees <maxcrees@me.com>2018-09-21 17:50:27 -0400
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2018-09-21 22:04:52 +0000
commit63266fdc6f2014cc6dfd0f983e13de7c378bc708 (patch)
treeea8d8dfc9293d2acf646e9280e930b9a99e2dd27 /user/physlock/utmps.patch
parent07766c024b48ca237919754cc57623c56c2e6344 (diff)
downloadpackages-63266fdc6f2014cc6dfd0f983e13de7c378bc708.tar.gz
packages-63266fdc6f2014cc6dfd0f983e13de7c378bc708.tar.bz2
packages-63266fdc6f2014cc6dfd0f983e13de7c378bc708.tar.xz
packages-63266fdc6f2014cc6dfd0f983e13de7c378bc708.zip
user/physlock: new package
Diffstat (limited to 'user/physlock/utmps.patch')
-rw-r--r--user/physlock/utmps.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/user/physlock/utmps.patch b/user/physlock/utmps.patch
new file mode 100644
index 000000000..efae166a9
--- /dev/null
+++ b/user/physlock/utmps.patch
@@ -0,0 +1,33 @@
+--- 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>
+ #include <pwd.h>
+ #include <unistd.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) {
+ FILE *uf;
+- struct utmp r;
++ struct utmpx r;
+ struct passwd *pw;
+ char tty[16], name[UT_NAMESIZE+1];
+
+ uinfo->name = NULL;
+- while ((uf = fopen(_PATH_UTMP, "r")) == NULL && errno == EINTR);
++ while ((uf = fopen(UTMPX_FILE, "r")) == NULL && errno == EINTR);
+
+ if (uf != NULL) {
+ snprintf(tty, sizeof(tty), "tty%d", vt);