From 15973d1f5225ee4fc0114d70a24a695486f482d4 Mon Sep 17 00:00:00 2001 From: Jasper Lievisse Adriaanse Date: Sat, 15 Apr 2017 09:45:51 +0200 Subject: Move all PAM code behind UES_PAM and enable that by default. --- Makefile | 1 + 1 file changed, 1 insertion(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index b3d4dc2..b7eae33 100644 --- a/Makefile +++ b/Makefile @@ -14,6 +14,7 @@ CFLAGS += -std=c99 CFLAGS += -pipe CFLAGS += -Wall CPPFLAGS += -D_GNU_SOURCE +CPPFLAGS += -DUSE_PAM CFLAGS += $(shell $(PKG_CONFIG) --cflags cairo xcb-composite xcb-xinerama xcb-atom xcb-image xcb-xkb xkbcommon xkbcommon-x11) LIBS += $(shell $(PKG_CONFIG) --libs cairo xcb-composite xcb-xinerama xcb-atom xcb-image xcb-xkb xkbcommon xkbcommon-x11) LIBS += -lpam -- cgit v1.1 From 68fc2e8b5f8bcd203598e6da2a98d5aa7359af1e Mon Sep 17 00:00:00 2001 From: Jasper Lievisse Adriaanse Date: Sat, 15 Apr 2017 14:41:32 +0200 Subject: Use bsd_auth(3) instead of PAM on OpenBSD Also apply two security measures for OpenBSD: - use explicit_bzero(3) - mlock(2) works for non-root users too --- Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index b7eae33..3acb272 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,5 @@ TOPDIR=$(shell pwd) +UNAME=$(shell uname) INSTALL=install PREFIX=/usr @@ -14,13 +15,16 @@ CFLAGS += -std=c99 CFLAGS += -pipe CFLAGS += -Wall CPPFLAGS += -D_GNU_SOURCE -CPPFLAGS += -DUSE_PAM CFLAGS += $(shell $(PKG_CONFIG) --cflags cairo xcb-composite xcb-xinerama xcb-atom xcb-image xcb-xkb xkbcommon xkbcommon-x11) LIBS += $(shell $(PKG_CONFIG) --libs cairo xcb-composite xcb-xinerama xcb-atom xcb-image xcb-xkb xkbcommon xkbcommon-x11) -LIBS += -lpam LIBS += -lev LIBS += -lm +# OpenBSD lacks PAM, use bsd_auth(3) instead. +ifneq ($(UNAME),OpenBSD) + LIBS += -lpam +endif + FILES:=$(wildcard *.c) FILES:=$(FILES:.c=.o) -- cgit v1.1