version 1.1.1.2, 2012/05/29 12:26:49
|
version 1.1.1.4, 2014/06/15 16:12:54
|
Line 1
|
Line 1
|
/* |
/* |
* Copyright (c) 1999-2005, 2007, 2010-2011 | * Copyright (c) 1999-2005, 2007, 2010-2012 |
* Todd C. Miller <Todd.Miller@courtesan.com> |
* Todd C. Miller <Todd.Miller@courtesan.com> |
* Copyright (c) 2002 Michael Stroucken <michael@stroucken.org> |
* Copyright (c) 2002 Michael Stroucken <michael@stroucken.org> |
* |
* |
Line 26
|
Line 26
|
#include <config.h> |
#include <config.h> |
|
|
#include <sys/types.h> |
#include <sys/types.h> |
#include <sys/param.h> |
|
#include <stdio.h> |
#include <stdio.h> |
#ifdef STDC_HEADERS |
#ifdef STDC_HEADERS |
# include <stdlib.h> |
# include <stdlib.h> |
Line 78 sudo_securid_init(struct passwd *pw, sudo_auth *auth)
|
Line 77 sudo_securid_init(struct passwd *pw, sudo_auth *auth)
|
if (AceInitialize() != SD_FALSE) |
if (AceInitialize() != SD_FALSE) |
debug_return_int(AUTH_SUCCESS); |
debug_return_int(AUTH_SUCCESS); |
|
|
warningx(_("failed to initialise the ACE API library")); | warningx(U_("failed to initialise the ACE API library")); |
debug_return_int(AUTH_FATAL); |
debug_return_int(AUTH_FATAL); |
} |
} |
|
|
Line 104 sudo_securid_setup(struct passwd *pw, char **promptp,
|
Line 103 sudo_securid_setup(struct passwd *pw, char **promptp,
|
|
|
/* Re-initialize SecurID every time. */ |
/* Re-initialize SecurID every time. */ |
if (SD_Init(sd) != ACM_OK) { |
if (SD_Init(sd) != ACM_OK) { |
warningx(_("unable to contact the SecurID server")); | warningx(U_("unable to contact the SecurID server")); |
debug_return_int(AUTH_FATAL); |
debug_return_int(AUTH_FATAL); |
} |
} |
|
|
Line 113 sudo_securid_setup(struct passwd *pw, char **promptp,
|
Line 112 sudo_securid_setup(struct passwd *pw, char **promptp,
|
|
|
switch (retval) { |
switch (retval) { |
case ACM_OK: |
case ACM_OK: |
warningx(_("User ID locked for SecurID Authentication")); | warningx(U_("User ID locked for SecurID Authentication")); |
debug_return_int(AUTH_SUCCESS); |
debug_return_int(AUTH_SUCCESS); |
|
|
case ACE_UNDEFINED_USERNAME: |
case ACE_UNDEFINED_USERNAME: |
warningx(_("invalid username length for SecurID")); | warningx(U_("invalid username length for SecurID")); |
debug_return_int(AUTH_FATAL); |
debug_return_int(AUTH_FATAL); |
|
|
case ACE_ERR_INVALID_HANDLE: |
case ACE_ERR_INVALID_HANDLE: |
warningx(_("invalid Authentication Handle for SecurID")); | warningx(U_("invalid Authentication Handle for SecurID")); |
debug_return_int(AUTH_FATAL); |
debug_return_int(AUTH_FATAL); |
|
|
case ACM_ACCESS_DENIED: |
case ACM_ACCESS_DENIED: |
warningx(_("SecurID communication failed")); | warningx(U_("SecurID communication failed")); |
debug_return_int(AUTH_FATAL); |
debug_return_int(AUTH_FATAL); |
|
|
default: |
default: |
warningx(_("unknown SecurID error")); | warningx(U_("unknown SecurID error")); |
debug_return_int(AUTH_FATAL); |
debug_return_int(AUTH_FATAL); |
} |
} |
} |
} |
Line 163 sudo_securid_verify(struct passwd *pw, char *pass, sud
|
Line 162 sudo_securid_verify(struct passwd *pw, char *pass, sud
|
break; |
break; |
|
|
case ACE_UNDEFINED_PASSCODE: |
case ACE_UNDEFINED_PASSCODE: |
warningx(_("invalid passcode length for SecurID")); | warningx(U_("invalid passcode length for SecurID")); |
rval = AUTH_FATAL; |
rval = AUTH_FATAL; |
break; |
break; |
|
|
case ACE_UNDEFINED_USERNAME: |
case ACE_UNDEFINED_USERNAME: |
warningx(_("invalid username length for SecurID")); | warningx(U_("invalid username length for SecurID")); |
rval = AUTH_FATAL; |
rval = AUTH_FATAL; |
break; |
break; |
|
|
case ACE_ERR_INVALID_HANDLE: |
case ACE_ERR_INVALID_HANDLE: |
warningx(_("invalid Authentication Handle for SecurID")); | warningx(U_("invalid Authentication Handle for SecurID")); |
rval = AUTH_FATAL; |
rval = AUTH_FATAL; |
break; |
break; |
|
|
Line 212 then enter the new token code.\n", \
|
Line 211 then enter the new token code.\n", \
|
break; |
break; |
|
|
default: |
default: |
warningx(_("unknown SecurID error")); | warningx(U_("unknown SecurID error")); |
rval = AUTH_FATAL; |
rval = AUTH_FATAL; |
break; |
break; |
} |
} |