dtlogin: use sessreg to manage utmp/wtmp.

This commit is contained in:
hyousatsu
2023-03-27 08:48:27 +00:00
parent 28277ce88e
commit 760d36bfe9
23 changed files with 452 additions and 1177 deletions
+8 -4
View File
@@ -79,7 +79,11 @@
#if defined(PAM) || defined(HAS_PAM_LIBRARY)
#include <security/pam_appl.h>
#ifdef PAM
#include "pam_svc.h"
#else
#include <Dt/SvcPam.h>
#endif
#endif
#ifdef _AIX
@@ -175,6 +179,8 @@ Audit( struct passwd *p, char *msg, int errnum )
int
Authenticate( struct display *d, char *name, char *passwd, char **msg )
{
extern char *progName;
int status;
char* ttyLine = d->gettyLine;
@@ -208,13 +214,11 @@ Authenticate( struct display *d, char *name, char *passwd, char **msg )
*/
#if defined(PAM) || defined(HAS_PAM_LIBRARY)
status =
#ifdef PAM
PamAuthenticate
status = PamAuthenticate("dtlogin", d->name, passwd, name, ttyLine);
#else
_DtAuthentication
status = _DtSvcPamAuthenticate(progName, name, d->name, passwd);
#endif
("dtlogin", d->name, passwd, name, ttyLine);
switch(status) {
case PAM_SUCCESS: