/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <crypt.h>
#include <pwd.h>
#include <shadow.h>
#include <string.h>
#include <stdlib.h>
#include <syslog.h>
#include <security/pam_appl.h>
#include <security/pam_modules.h>
#include "../../libpam/pam_impl.h"
#include <libintl.h>
/*
* Various useful files and string constants
*/
/*
* pam_sm_authenticate - This is the top level function in the
* module called by pam_auth_port in the framework
* Returns: PAM_AUTH_ERR on failure, 0 on success
*/
/*ARGSUSED*/
int
{
int retcode;
int i;
int debug = 0;
int res;
for (i = 0; i < argc; i++) {
debug = 1;
else
}
!= PAM_SUCCESS ||
!= PAM_SUCCESS)
return (retcode);
if (debug) {
"Dialpass authenticate user = %s, ttyn = %s",
}
char *service;
"by %s, returning %s.", service,
return (PAM_SERVICE_ERR);
}
return (PAM_USER_UNKNOWN);
return (PAM_IGNORE);
p1++;
*p1 = '\0';
break;
}
return (PAM_SYSTEM_ERR);
}
return (PAM_IGNORE);
}
defpass[0] = '\0';
p1++;
*p1++ = '\0';
p1++;
*p1 = '\0';
break;
}
if (*p2 != '\0') {
if (res != PAM_SUCCESS) {
return (res);
}
return (PAM_AUTH_ERR);
}
}
return (PAM_SUCCESS);
}
/*
* dummy pam_sm_setcred - does nothing
*/
/*ARGSUSED*/
int
{
return (PAM_IGNORE);
}