dtlogin: use sessreg to manage utmp/wtmp.

This commit is contained in:
hyousatsu
2023-03-27 08:25:29 +00:00
parent 28277ce88e
commit 760d36bfe9
23 changed files with 452 additions and 1177 deletions

View File

@@ -86,7 +86,8 @@
#endif
#ifdef HAS_PAM_LIBRARY
#include <Dt/PamSvc.h>
#include <security/pam_appl.h>
#include <Dt/SvcPam.h>
#endif
#include "Sm.h"
@@ -1622,7 +1623,8 @@ localAuthenticate(
if (!(service = strrchr(smGD.programName, '/'))) return False;
return !_DtAuthentication(service + 1, NULL, passwd, pwent->pw_name, NULL);
return _DtSvcPamAuthenticate(service + 1, pwent->pw_name, NULL, passwd) ==
PAM_SUCCESS;
}
#elif defined(SIA)

View File

@@ -1,7 +1,7 @@
MAINTAINERCLEANFILES = Makefile.in
if HAS_PAM_LIBRARY
CPP_TARGET = pam/dtsession
CPP_TARGET = dtsession
dist_pam_DATA = $(CPP_TARGET)
if FREEBSD
pamdir = /usr/local/etc/pam.d
@@ -19,6 +19,6 @@ endif
BUILT_SOURCES = $(CPP_TARGET)
CLEANFILES = $(CPP_TARGET)
pam/dtsession: pam/dtsession.src
dtsession: dtsession.src
$(RM) $@
$(GENCPP) -P -DXCOMM=# $(AM_CPPFLAGS) $< > $@