[dovecot-cvs] dovecot/src/auth Makefile.am, 1.49.2.1, 1.49.2.2 passdb-sia.c, NONE, 1.1.2.1 passdb.c, 1.42, 1.42.2.1

tss at dovecot.org tss at dovecot.org
Sun Oct 8 22:25:17 UTC 2006


Update of /var/lib/cvs/dovecot/src/auth
In directory talvi:/tmp/cvs-serv27793/src/auth

Modified Files:
      Tag: branch_1_0
	Makefile.am passdb.c 
Added Files:
      Tag: branch_1_0
	passdb-sia.c 
Log Message:
Tru64 SIA authentication support. Patch by Simon L Jackson
(simon jackson carringbush net)



Index: Makefile.am
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/Makefile.am,v
retrieving revision 1.49.2.1
retrieving revision 1.49.2.2
diff -u -d -r1.49.2.1 -r1.49.2.2
--- Makefile.am	18 Jun 2006 09:49:21 -0000	1.49.2.1
+++ Makefile.am	8 Oct 2006 21:25:14 -0000	1.49.2.2
@@ -69,6 +69,7 @@
 	passdb-pam.c \
 	passdb-checkpassword.c \
 	passdb-shadow.c \
+	passdb-sia.c \
 	passdb-vpopmail.c \
 	passdb-sql.c \
 	userdb.c \

--- NEW FILE: passdb-sia.c ---
/* Copyright (C) 2006 Simon L Jackson */

/* Tru64 SIA support */

#include "common.h"

#ifdef PASSDB_SIA

#include "safe-memset.h"
#include "passdb.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";

	/* 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
};

#endif

Index: passdb.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/passdb.c,v
retrieving revision 1.42
retrieving revision 1.42.2.1
diff -u -d -r1.42 -r1.42.2.1
--- passdb.c	20 Feb 2006 13:14:58 -0000	1.42
+++ passdb.c	8 Oct 2006 21:25:14 -0000	1.42.2.1
@@ -17,6 +17,7 @@
 extern struct passdb_module_interface passdb_vpopmail;
 extern struct passdb_module_interface passdb_ldap;
 extern struct passdb_module_interface passdb_sql;
+extern struct passdb_module_interface passdb_sia;
 
 struct passdb_module_interface *passdb_interfaces[] = {
 #ifdef PASSDB_PASSWD
@@ -46,6 +47,9 @@
 #ifdef PASSDB_SQL
 	&passdb_sql,
 #endif
+#ifdef PASSDB_SIA
+	&passdb_sia,
+#endif
 	NULL
 };
 



More information about the dovecot-cvs mailing list