initial illumos port

This commit is contained in:
Peter Tribble
2014-03-21 16:37:00 -07:00
committed by Jon Trulson
parent 3c14b8b5ce
commit 468d576030
48 changed files with 117 additions and 71 deletions

View File

@@ -59,7 +59,14 @@ SOLARIS_OBJS =
#endif
#if defined(SunArchitecture) && !UsePamLibrary
/* Unsure when libauth went away */
# if (OSMajorVersion == 5) && (OSMinorVersion < 5)
PAM_LIB = -lauth
# else
PAM_SRCS = pam_svc.c
PAM_OBJS = pam_svc.o
PAM_LIB = -lpam
# endif
#endif
XDMDIR = $(CDE_LOGFILES_TOP)
@@ -99,13 +106,12 @@ SYS_LIBRARIES = -lsec
* on Solaris 2.4 and run on Solaris 2.5. In Solaris 2.4 some of
* libcmd.a functions are also in libauth.so. But on Solaris 2.5
* these Sun private functions have been removed from libauth.so. */
SYS_LIBRARIES = -lm -ldl -lgen -lresolv -lC -lbsm -lcmd -lauth $(PAM_LIB)
SYS_LIBRARIES = -lm -ldl -lgen -lresolv -lC -lbsm -lcmd $(PAM_LIB)
EXTRA_DEFINES = -DPAM
# if UsePamLibrary
EXTRA_DEFINES = -DPAM
# else
EXTRA_DEFINES = -DSUNAUTH
# endif
#endif

View File

@@ -150,7 +150,7 @@ PamAuthenticate ( char* prog_name,
return(PAM_AUTH_ERR);
}
#ifdef sun
#ifdef legacysun
/* Solaris BSM Audit trail */
audit_login_save_host(display_name);
@@ -167,7 +167,7 @@ PamAuthenticate ( char* prog_name,
status = pam_authenticate( pamh, 0 );
pam_auth_trys++;
#ifdef sun
#ifdef legacysun
pwd = getpwnam(user);
audit_login_save_pw(pwd);
@@ -262,7 +262,7 @@ PamAccounting( char* prog_name,
Debug("PamAccounting: USER_PROCESS open_session error=%d\n",
status);
}
#ifdef sun
#ifdef legacysun
if (status == PAM_SUCCESS) audit_login_success();
#endif
session_type = SOLARIS_LOGIN;
@@ -450,7 +450,7 @@ login_conv(int num_msg, struct pam_message **msg,
if (saved_user_passwd != NULL) {
r->resp = (char *) malloc(strlen(saved_user_passwd)+1);
if (r->resp == NULL) {
__pam_free_resp(num_msg, *response);
/* __pam_free_resp(num_msg, *response); */
*response = NULL;
return (PAM_CONV_ERR);
}

View File

@@ -1430,7 +1430,7 @@ Authenticate( struct display *d, char *name, char *passwd, char **msg )
case PAM_SUCCESS:
return(VF_OK);
case PAM_AUTHTOKEN_REQD:
case PAM_NEW_AUTHTOK_REQD:
return(VF_PASSWD_AGED);
default: