Version 1202 changes reverted.

This commit is contained in:
Cameron (Kamran) Mashayekhi 2007-02-27 19:56:05 +00:00
parent 35d315a78b
commit a24e1e6a66
2 changed files with 1 additions and 36 deletions

View File

@ -51,27 +51,6 @@
#include <sys/syslog.h>
#include <security/pam_modules.h>
#include <security/_pam_macros.h>
#include <setjmp.h>
static jmp_buf tout;
/* timeout signal hander */
void sig_timeout(int signum)
{
if(signum == SIGALRM )
pam_sscs_log(LOG_ERR, "micasad is not responding\n");
signal( SIGALRM, SIG_IGN );
alarm(0);
longjmp(tout, 1);
}
/* set timeout */
void set_timeout(int timeout)
{
signal(SIGALRM, (void *)sig_timeout);
alarm( timeout );
}
/*
* Running (micasad_status = 1)
@ -162,7 +141,6 @@ void set_micasa_password(const char *user, const char *password)
SSCS_CRED_TYPE_BASIC_F,
&basicCredential,
NULL);
if( retval != 0) {
pam_sscs_log( LOG_ERR,"Setting the default credential failed.Errcode = %d\n",retval);
break;
@ -171,6 +149,7 @@ void set_micasa_password(const char *user, const char *password)
} while (0);
seteuid(saved_uid);
}
return;
}
@ -211,15 +190,9 @@ PAM_EXTERN int pam_sm_authenticate(pam_handle_t *pamh,int flags,int argc,const c
return (retval);
}
if(setjmp(tout)) {
goto clean_exit;
}
set_timeout (TIMEOUT);
/* Set the password in micasad*/
set_micasa_password(user, wkstnPasswd);
clean_exit:
return PAM_SUCCESS;
}
@ -277,11 +250,6 @@ int pam_sm_chauthtok(pam_handle_t *pamh, int flags, int argc, const char **argv)
return (retval);
}
if(setjmp(tout)) {
goto clean_exit;
}
set_timeout (TIMEOUT);
/* Set the new password in micasad*/
set_micasa_password(user, new_passwd);
@ -291,7 +259,6 @@ int pam_sm_chauthtok(pam_handle_t *pamh, int flags, int argc, const char **argv)
return (PAM_AUTH_ERR);
} /* End of some other flag (Other than PAM_PRELIM_CHECK or PAM_UPDATE_AUTHTOK */
clean_exit:
return PAM_SUCCESS;
}

View File

@ -49,8 +49,6 @@ extern void pam_sscs_log(int priority, const char *format,...);
#define MICASAD_PID_SIZE 32
#define MICASAD_PID_FILE "/var/run/micasad.pid"
#define TIMEOUT 5
#ifdef DEBUG
#define PRINT_FN_NAME pam_sscs_log(LOG_DEBUG,"In function : %s\n",__func__);
#else