Mercurial > dovecot > original-hg > dovecot-1.2
view src/auth/passdb-sia.c @ 9415:2a48aa6e2bce HEAD
Added signature for changeset 609fe4268f40
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Mon, 05 Oct 2009 19:52:13 -0400 |
parents | c47b78e843aa |
children |
line wrap: on
line source
/* Copyright (C) 2006 Simon L Jackson */ /* Tru64 SIA support */ #include "common.h" #include "passdb.h" #ifdef PASSDB_SIA #include "safe-memset.h" #include <sia.h> #include <siad.h> #include <sys/security.h> static int checkpw_collect(int timeout ATTR_UNUSED, int rendition, uchar_t *title ATTR_UNUSED, int nprompts ATTR_UNUSED, prompt_t *prompts ATTR_UNUSED) { switch (rendition) { case SIAONELINER: case SIAINFO: case SIAWARNING: return SIACOLSUCCESS; } /* everything else is bogus */ return SIACOLABORT; } static void local_sia_verify_plain(struct auth_request *request, const char *password, verify_plain_callback_t *callback) { char *argutility = "dovecot"; auth_request_log_debug(request, "sia", "lookup"); /* check if the password is valid */ if (sia_validate_user(checkpw_collect, 1, &argutility, NULL, (char *)request->user, NULL, NULL, NULL, (char *)password) != SIASUCCESS) { auth_request_log_info(request, "sia", "password mismatch"); callback(PASSDB_RESULT_PASSWORD_MISMATCH, request); } else { callback(PASSDB_RESULT_OK, request); } } struct passdb_module_interface passdb_sia = { "sia", NULL, NULL, NULL, local_sia_verify_plain, NULL, NULL }; #else struct passdb_module_interface passdb_sia = { MEMBER(name) "sia" }; #endif