forked from openzfs/zfs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
currently the pam module does: * load a zfs key and mounts the dataset when a session opens * unmounts the dataset and unloads the key when the session closes * when the user is logged on and changes the password, the modules changes the encryption key. Signed-off-by: Felix Dörre <felix@dogcraft.de> Closes openzfs#9886
- Loading branch information
1 parent
50ff632
commit 23abde6
Showing
15 changed files
with
954 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
AC_DEFUN([ZFS_AC_CONFIG_USER_PAM], [ | ||
AC_ARG_ENABLE([pam], | ||
AS_HELP_STRING([--enable-pam], | ||
[install pam_zfs_key module [[default: check]]]), | ||
[enable_pam=$enableval], | ||
[enable_pam=check]) | ||
AC_ARG_WITH(pammoduledir, | ||
AS_HELP_STRING([--with-pammoduledir=DIR], | ||
[install pam module in dir [[/lib/security]]]), | ||
[pammoduledir="$withval"],[pammoduledir=/lib/security]) | ||
AC_ARG_WITH(pamconfigsdir, | ||
AS_HELP_STRING([--with-pamconfigsdir=DIR], | ||
[install pam-config files in dir [[/usr/share/pamconfigs]]]), | ||
[pamconfigsdir="$withval"],[pamconfigsdir=/usr/share/pam-configs]) | ||
AS_IF([test "x$enable_pam" != "xno"], [ | ||
AC_CHECK_HEADERS([security/pam_modules.h], [ | ||
enable_pam=yes | ||
], [ | ||
AS_IF([test "x$enable_pam" == "xyes"], [ | ||
AC_MSG_FAILURE([ | ||
*** security/pam_modules.h missing, libpam0g-dev package required | ||
]) | ||
],[ | ||
enable_pam=no | ||
]) | ||
]) | ||
]) | ||
AS_IF([test "x$enable_pam" == "xyes"], [ | ||
DEFINE_PAM='--define "_pam 1" --define "_pammoduledir $(pammoduledir)" --define "_pamconfigsdir $(pamconfigsdir)"' | ||
]) | ||
AC_SUBST(DEFINE_PAM) | ||
AC_SUBST(pammoduledir) | ||
AC_SUBST(pamconfigsdir) | ||
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
include $(top_srcdir)/config/Rules.am | ||
|
||
VPATH = \ | ||
$(top_srcdir)/module/icp \ | ||
$(top_srcdir)/module/zcommon \ | ||
$(top_srcdir)/lib/libzfs | ||
|
||
pammodule_LTLIBRARIES=pam_zfs_key.la | ||
|
||
pam_zfs_key_la_SOURCES = pam_zfs_key.c | ||
|
||
pam_zfs_key_la_LIBADD = \ | ||
$(top_builddir)/lib/libnvpair/libnvpair.la \ | ||
$(top_builddir)/lib/libuutil/libuutil.la \ | ||
$(top_builddir)/lib/libzfs/libzfs.la \ | ||
$(top_builddir)/lib/libzfs_core/libzfs_core.la | ||
|
||
pam_zfs_key_la_LDFLAGS = -version-info 1:0:0 -avoid-version -module -shared | ||
|
||
pam_zfs_key_la_LIBADD += -lpam $(LIBSSL) | ||
|
||
pamconfigs_DATA = zfs_key | ||
EXTRA_DIST = $(pamconfigs_DATA) |
Oops, something went wrong.