Skip to content

Commit ee21ee1

Browse files
Greg VRyan Moeller
authored andcommitted
openzfs: attach pam_zfs_key to build
This PAM module allows unlocking encrypted user home datasets when logging in (and changing passphrase when changing the account password), see openzfs/zfs#9903 Also supposed to unload the key when the last session for the user is done, but there are EBUSY issues: openzfs/zfs#11222 (comment) Submitted by: Greg V <greg_unrelenting.technology> Reviewed by: mm MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D28018
1 parent 99adf23 commit ee21ee1

File tree

2 files changed

+34
-1
lines changed

2 files changed

+34
-1
lines changed

cddl/lib/Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ SUBDIR= drti \
1717
${_libzfs} \
1818
${_libzfsbootenv} \
1919
${_libzpool} \
20-
${_libzutil}
20+
${_libzutil} \
21+
${_pam_zfs_key}
2122

2223
SUBDIR.${MK_TESTS}+= tests
2324

@@ -30,6 +31,9 @@ _libzutil= libzutil
3031
_libzfsbootenv= libzfsbootenv
3132
_libzpool= libzpool
3233
_libtpool= libtpool
34+
.if ${MK_OPENSSL} != "no"
35+
_pam_zfs_key= pam_zfs_key
36+
.endif
3337
.endif
3438

3539
SUBDIR_DEPEND_libctf= libspl
@@ -41,6 +45,7 @@ SUBDIR_DEPEND_libzfs= libavl libnvpair libumem libuutil libzfs_core libzutil
4145
SUBDIR_DEPEND_libzpool= libavl libnvpair libumem libicp
4246
SUBDIR_DEPEND_libzutil= libavl libtpool
4347
SUBDIR_DEPEND_libzfsbootenv= libzfs libnvpair
48+
SUBDIR_DEPEND_pam_zfs_key= libnvpair libuutil libzfs libzfs_core
4449

4550
SUBDIR_PARALLEL=
4651

cddl/lib/pam_zfs_key/Makefile

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
.PATH: ${SRCTOP}/sys/contrib/openzfs/contrib/pam_zfs_key
2+
.PATH: ${SRCTOP}/sys/contrib/openzfs/include
3+
4+
PACKAGE= utilities
5+
LIB= pam_zfs_key
6+
7+
SHLIBDIR?= /usr/lib
8+
9+
LIBADD= zfs zfs_core nvpair uutil crypto
10+
11+
SRCS= pam_zfs_key.c
12+
13+
WARNS?= 2
14+
CSTD= c99
15+
CFLAGS+= -DIN_BASE
16+
CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include
17+
CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/
18+
CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd
19+
CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include
20+
CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/module/icp/include
21+
CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h
22+
CFLAGS+= -DHAVE_ISSETUGID
23+
CFLAGS+= -include ${SRCTOP}/sys/modules/zfs/zfs_config.h
24+
CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/zfs
25+
CFLAGS+= -DRUNSTATEDIR=\"/var/run\"
26+
27+
.include "../../lib/libpam/modules/Makefile.inc"
28+
.include <bsd.lib.mk>

0 commit comments

Comments
 (0)