Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F152626857
D9783.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
4 KB
Referenced Files
None
Subscribers
None
D9783.id.diff
View Options
Index: head/x11/slock/Makefile
===================================================================
--- head/x11/slock/Makefile
+++ head/x11/slock/Makefile
@@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= slock
-PORTVERSION= 1.3
+PORTVERSION= 1.4
CATEGORIES= x11
MASTER_SITES= http://dl.suckless.org/tools/
Index: head/x11/slock/distinfo
===================================================================
--- head/x11/slock/distinfo
+++ head/x11/slock/distinfo
@@ -1,2 +1,3 @@
-SHA256 (slock-1.3.tar.gz) = bab4a3aea4046aa0fd0361c3649b79b90ca531bc5dfae3c4a6c0fe436152bd18
-SIZE (slock-1.3.tar.gz) = 5943
+TIMESTAMP = 1487670784
+SHA256 (slock-1.4.tar.gz) = b53849dbc60109a987d7a49b8da197305c29307fd74c12dc18af0d3044392e6a
+SIZE (slock-1.4.tar.gz) = 6889
Index: head/x11/slock/files/patch-config.mk
===================================================================
--- head/x11/slock/files/patch-config.mk
+++ head/x11/slock/files/patch-config.mk
@@ -1,11 +1,13 @@
---- config.mk.orig 2013-10-09 16:23:24.000000000 +0200
-+++ config.mk 2013-10-09 16:25:18.000000000 +0200
-@@ -18,6 +18,9 @@
- CFLAGS = -std=c99 -pedantic -Wall -Os ${INCS} ${CPPFLAGS}
- LDFLAGS = -s ${LIBS}
+--- config.mk.orig 2016-11-20 00:31:23 UTC
++++ config.mk
+@@ -22,6 +22,10 @@ COMPATSRC = explicit_bzero.c
+ # On OpenBSD and Darwin remove -lcrypt from LIBS
+ #LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 -lXext -lXrandr
++
+# To enable PAM-based authentication, remove -DHAVE_SHADOW_H from CPPFLAGS
+# and add -DHAVE_PAM instead. Also, add -lpam to LDFLAGS.
+#
- # On *BSD remove -DHAVE_SHADOW_H from CPPFLAGS and add -DHAVE_BSD_AUTH
- # On OpenBSD and Darwin remove -lcrypt from LIBS
+ # On *BSD remove -DHAVE_SHADOW_H from CPPFLAGS
+ # On NetBSD add -D_NETBSD_SOURCE to CPPFLAGS
+ #CPPFLAGS = -DVERSION=\"${VERSION}\" -D_BSD_SOURCE -D_NETBSD_SOURCE
Index: head/x11/slock/files/patch-slock.c
===================================================================
--- head/x11/slock/files/patch-slock.c
+++ head/x11/slock/files/patch-slock.c
@@ -1,104 +0,0 @@
---- slock.c.orig 2016-02-17 12:36:44.640577000 -0800
-+++ slock.c 2016-02-17 12:48:20.966625000 -0800
-@@ -23,6 +23,10 @@
- #include <bsd_auth.h>
- #endif
-
-+#if HAVE_PAM
-+#include <security/pam_appl.h>
-+#endif
-+
- enum {
- INIT,
- INPUT,
-@@ -85,7 +89,7 @@
- }
- #endif
-
--#ifndef HAVE_BSD_AUTH
-+#if !defined(HAVE_BSD_AUTH) && !defined(HAVE_PAM)
- /* only run as root */
- static const char *
- getpw(void)
-@@ -119,8 +123,41 @@
- }
- #endif
-
-+#ifdef HAVE_PAM
-+static int
-+slock_conv (int nof_msg, const struct pam_message **msg, struct pam_response **resp, void *data) {
-+ struct pam_response *r = calloc (nof_msg, sizeof **resp);
-+ if (r == NULL) {
-+ die("slock: malloc: %s", strerror(errno));
-+ }
-+
-+ while (nof_msg--) {
-+ r[nof_msg].resp_retcode = 0;
-+ r[nof_msg].resp = strdup (data);
-+ }
-+
-+ *resp = r;
-+
-+ return PAM_SUCCESS;
-+}
-+
-+static int
-+auth_pam (const char *user, char *pass) {
-+ static struct pam_conv conv = {slock_conv, NULL};
-+ pam_handle_t *ph;
-+
-+ conv.appdata_ptr = pass;
-+
-+ if (pam_start("slock", user, &conv, &ph) != PAM_SUCCESS) {
-+ die("slock: pam_start");
-+ }
-+
-+ return (pam_authenticate(ph, 0) == PAM_SUCCESS);
-+}
-+#endif
-+
- static void
--#ifdef HAVE_BSD_AUTH
-+#if defined(HAVE_BSD_AUTH) || defined(HAVE_PAM)
- readpw(Display *dpy)
- #else
- readpw(Display *dpy, const char *pws)
-@@ -159,8 +196,10 @@
- switch (ksym) {
- case XK_Return:
- passwd[len] = 0;
--#ifdef HAVE_BSD_AUTH
-+#if defined (HAVE_BSD_AUTH)
- running = !auth_userokay(getlogin(), NULL, "auth-xlock", passwd);
-+#elif defined (HAVE_PAM)
-+ running = !auth_pam(getlogin(), passwd);
- #else
- running = !!strcmp(crypt(passwd, pws), pws);
- #endif
-@@ -289,7 +328,7 @@
-
- int
- main(int argc, char **argv) {
--#ifndef HAVE_BSD_AUTH
-+#if !defined(HAVE_BSD_AUTH) && !defined(HAVE_PAM)
- const char *pws;
- #endif
- Display *dpy;
-@@ -308,7 +347,7 @@
- if (!getpwuid(getuid()))
- die("slock: no passwd entry for you\n");
-
--#ifndef HAVE_BSD_AUTH
-+#if !defined(HAVE_BSD_AUTH) && !defined(HAVE_PAM)
- pws = getpw();
- #endif
-
-@@ -341,7 +380,7 @@
- }
-
- /* Everything is now blank. Now wait for the correct password. */
--#ifdef HAVE_BSD_AUTH
-+#if defined(HAVE_BSD_AUTH) || defined(HAVE_PAM)
- readpw(dpy);
- #else
- readpw(dpy, pws);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Apr 17, 2:45 AM (21 h, 31 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31635082
Default Alt Text
D9783.id.diff (4 KB)
Attached To
Mode
D9783: Update x11/slock to 1.4
Attached
Detach File
Event Timeline
Log In to Comment