root/patches/openssh-3.6.1p1+SecurID_v1.patch
| Revision 1, 43.1 kB (checked in by jesus, 5 years ago) |
|---|
-
openssh-3.6.1p1/Makefile.in
old new 81 81 monitor_mm.o monitor.o monitor_wrap.o monitor_fdpass.o \ 82 82 kexdhs.o kexgexs.o \ 83 83 auth-krb5.o auth-krb4.o \ 84 loginrec.o auth-pam.o auth2-pam.o auth-sia.o md5crypt.o84 loginrec.o auth-pam.o auth2-pam.o auth-sia.o auth-securid.o md5crypt.o 85 85 86 86 MANPAGES = scp.1.out ssh-add.1.out ssh-agent.1.out ssh-keygen.1.out ssh-keyscan.1.out ssh.1.out sshd.8.out sftp-server.8.out sftp.1.out ssh-rand-helper.8.out ssh-keysign.8.out sshd_config.5.out ssh_config.5.out 87 87 MANPAGES_IN = scp.1 ssh-add.1 ssh-agent.1 ssh-keygen.1 ssh-keyscan.1 ssh.1 sshd.8 sftp-server.8 sftp.1 ssh-rand-helper.8 ssh-keysign.8 sshd_config.5 ssh_config.5 -
openssh-3.6.1p1/README.SecurID
old new 1 /* 2 * Author: Theo Schlossnagle <jesus@omniti.com> 3 * Copyright (c) 2000-2002 Theo Schlossnagle <jesus@omniti.com> 4 * All rights reserved 5 * 6 * Created: September 21, 2000 7 * License: OpenSSH License. See the license for OpenSSH for more details. 8 * 9 * Update for ACE 5.X by Jim Matthews -- j.w.matthews@cox.net 10 * Patch works only for OpenSSH version 3.6.1p1 11 * 12 * April 5th, 2003: -- j.w.matthews@cox.net 13 * Updated to support openssh v3.6.1p1. 14 * Modified to support both new (5.X+) and old (<= 4.X) securid client API libraries. 15 * Added --with-securid-old for <= 4.X support, --with-securid is for new API support. 16 * Added sd_close for ACE server disconnect at the end of authentication for old API support. 17 * 18 * March 3rd, 2003: -- j.w.matthews@cox.net 19 * Changed "user not in [securid] allow", "user in [securid] deny" SecurID messages from 20 * type "error" to type "log" in auth-securid.c. 21 * 22 * March 1st, 2003: -- j.w.matthews@cox.net 23 * Rewrote functions in auth-securid.c to support the ACE server version 5.X API. 24 * Modified configure script to check for new libaceclnt.a and acexport.h. 25 * Fixed AllowNonSecurid option in monitor.c and servconf.c so it actually works now. 26 * Fixed potential memory leak in auth-securid.c for SecurID shell assignment variable. 27 * 28 * October 22nd, 2002: 29 * Updated to 3.5p1 -- jesus@omniti.com 30 * incorporated a few minor fixes for the auth phase. 31 * 32 * June 26th, 2002: 33 * Updated to 3.4p1 -- jesus@omniti.com 34 * Revamped the auth mechanism to use the new privilege separation code. 35 * Updated man pages in their new locations. 36 * 37 * March 15th, 2002: 38 * Updated to 3.1p1 -- jesus@omniti.com 39 * Added beeter support for auth2-pam. Added NegateSecurIDUsers option to 40 * negate the meaning of the SecureIDUsersFile option. 41 * 42 * December 11th, 2001: 43 * Updated to 3.0.2p1 -- jesus@omniti.com 44 * no new features 45 * 46 * December 3rd, 2001: 47 * Updated to 3.0.1p1 -- jesus@omniti.com 48 * no new features 49 * 50 * November 8th, 2001: 51 * Updated to 3.0p1 -- jesus@omniti.com 52 * no new features 53 * 54 * September 30th, 2001: 55 * Updated to 2.9.9p2 -- jesus@omniti.com 56 * no new features 57 * 58 * June 28, 2001: 59 * Updated to 2.9p2 -- jesus@omniti.com 60 * no new features 61 * 62 * April 24, 2001: 63 * Updated to 2.9p1 -- jesus@omniti.com 64 * added autoconf clauses to fault if sdiclient.a and headers aren't there. 65 * 66 * April 21, 2001: 67 * Updated to 2.5.2p2 -- jesus@omniti.com 68 * Incorporated some bug fixes from Anders Olsen to fix next-token code. 69 * 70 * March 19, 2001: 71 * Updated to 2.5.2p1 -- jesus@omniti.com 72 * 73 * December 20, 2000: 74 * Updated to 2.3.0p1 -- jesus@omniti.com 75 * 76 * Jan 9th, 2001: 77 * Added SecurIDUsersFile, SecurIDIgnoreShell, AllowNonSecurID directives 78 * to the sshd_config file. These parameters are documented in the man page. 79 * This provides a more logical seperationg between fail-through due to system 80 * failure and fall-through by configuration. (fall-through vs. fail-through) 81 * -- jesus@omniti.com 82 */ 83 84 Seems like a few people are interested. So here is the patch. 85 86 This has only been tested on UNICIES that support PAM. There is untested 87 (only 5 lines) code in auth-passwd.c that should provide the same 88 functionality for normal (non-PAM) password verifications. 89 90 The patch is logical quite small, the physical patch bulky because it contains 91 all the line number changes in "configure" after running autoconf on the 92 modified configure.in file (in which I changed maybe 10 lines -- Yuk.) 93 94 The sshd man page has been patched too :-) Read it for the two new options 95 relating to SecurID. 96 97 How it works: 98 99 0) apply patch ;-) You must use GNU patch (get it from ftp.gnu.org, it free.) 100 1) copy ACE headers (in SecurID inc directory) into either a standard 101 include place (like /usr/local/include) or into the openssh source tree or add 102 the --with-cflags=-I/path/to/ace/inc (where the include files are located) 103 2) copy the libaceclnt.a (for ACE 5.X) or sdiclient.a (for ACE <= 4.X) for your 104 OS (from /path/to/ace/lib/<arch>) into the openssh source tree. 105 106 Make sure that /var/ace contains your sdconf.rec, etc. If you installed 107 SecurID client or server on a machine it should be this way already. If you 108 used a non-standard install location do a "ln -s /path/to/ace/data /var/ace" 109 110 3) add --with-securid to the configure flags for new ACE 5.X support. Use 111 --with-securid-old for ACE API version 4.X and older. 112 113 It will trigger if a user has a shell in /etc/passwd that ends with "sdshell" 114 and it snags your shell the same way sdshell does. Users with other shells 115 will log in as if SecurID didn't exist. 116 117 Done: 118 o Normal passcode verification 119 o Enter next token for verification 120 (use ssh -v to see the *useful* debgging messages) 121 122 ssh -v will let you know if: 123 o your code was accepted. 124 o your code was rejected. 125 o you are required to wait for the next token and enter that. 126 127 TODO: 128 o Handle PIN creation and changing (as their are by default three log in 129 attempts, it should be straight forward to integrate in these additions -- 130 both of these operations require exactly three user inputs.) 131 o Add sshd_config parameter to specify the VAR_ACE location (forced to 132 /var/ace OR VAR_ACE environment variable now.) 133 134 DISCLAIMER: 135 I works for me (yes, in production). If you get locked out of a production 136 system becuase you replaced your sshd with this one, feeling really dumb is 137 YOUR responsibility NOT mine. It is not my fault :-D 138 139 Hope this is useful! scp (and all other tools that can use ssh like rsync and 140 cvs) will work now!!!! Hooray! 141 -
openssh-3.6.1p1/acconfig.h
old new 216 216 /* Define if you want S/Key support */ 217 217 #undef SKEY 218 218 219 /* Define if you want SecurID support */ 220 #undef SECURID 221 #undef SECURID_NEW 222 219 223 /* Define if you want TCP Wrappers support */ 220 224 #undef LIBWRAP 221 225 -
openssh-3.6.1p1/auth-pam.c
old new 210 210 211 211 do_pam_set_conv(&conv); 212 212 213 #ifdef SECURID 214 if (options.securid_authentication == 1) { 215 int ret; 216 debug("Attempting SecurID authentication user \"%.100s\"", pw->pw_name); 217 ret = auth_securid(authctxt, password); 218 if (ret >= 0) 219 return ret; 220 /* Only returns < 0 if the account is not a SecurID account */ 221 /* Fall back to ordinary passwd authentication. */ 222 } else { 223 debug("SecurID disabled in server config. Using PAM."); 224 } 225 #endif 213 226 __pampasswd = password; 214 227 215 228 pamstate = INITIAL_LOGIN; -
openssh-3.6.1p1/auth-passwd.c
old new 146 146 return 1; 147 147 } 148 148 # endif 149 #ifdef SECURID 150 if (options.securid_authentication == 1) { 151 int ret = auth_securid(authctxt, password); 152 if (ret >= 0) 153 return ret; 154 /* Only returns < 0 if the account is not a SecurID account */ 155 /* Fall back to ordinary passwd authentication. */ 156 if(ret<0 && !options.allow_nonsecurid) { 157 return 0; 158 } 159 } 160 #endif 149 161 # ifdef WITH_AIXAUTHENTICATE 150 162 authsuccess = (authenticate(pw->pw_name,password,&reenter,&authmsg) == 0); 151 163 -
openssh-3.6.1p1/auth-securid.c
old new 1 /* 2 * Author: Theo Schlossnagle <jesus@omniti.com> 3 * Copyright (c) 2000 Theo Schlossnagle <jesus@omniti.com> 4 * All rights reserved 5 * Created: September 21, 2000 6 * This file contains the code to process a SecurID authentication 7 * including the "next token" request. 8 */ 9 10 /* 11 * Added ACE Server API version 5.X Support 12 * Jim Matthews (JWM) 13 * 14 */ 15 16 #include "includes.h" 17 18 RCSID("$OpenBSD: auth-securid.c,v 1.0 2000/09/21 01:39:38 jesus Exp $"); 19 /* $Id: auth-securid.c,v 1.3 2003/04/08 21:32:31 jmatthew Exp jmatthew $ */ 20 21 #include "packet.h" 22 #include "ssh.h" 23 #include "log.h" 24 #include "servconf.h" 25 #include "xmalloc.h" 26 #include "auth.h" 27 28 #ifdef WITH_AIXAUTHENTICATE 29 # include <login.h> 30 #endif 31 #ifdef HAVE_HPUX_TRUSTED_SYSTEM_PW 32 # include <hpsecurity.h> 33 # include <prot.h> 34 #endif 35 #ifdef HAVE_SHADOW_H 36 # include <shadow.h> 37 #endif 38 #ifdef HAVE_GETPWANAM 39 # include <sys/label.h> 40 # include <sys/audit.h> 41 # include <pwdadj.h> 42 #endif 43 #if defined(HAVE_MD5_PASSWORDS) && !defined(HAVE_MD5_CRYPT) 44 # include "md5crypt.h" 45 #endif /* defined(HAVE_MD5_PASSWORDS) && !defined(HAVE_MD5_CRYPT) */ 46 47 #ifdef SECURID 48 #ifdef SECURID_NEW 49 /* Only need acexport.h for 5.0 API JWM */ 50 # include "acexport.h" 51 52 #else 53 54 # include "sdi_athd.h" 55 # include "sdconf.h" 56 # include "sdacmvls.h" 57 58 union config_record configure; 59 #endif 60 #endif 61 62 /* 63 * Tries to authenticate the user using password. Returns true if 64 * authentication succeeds. 65 */ 66 #define INBUFFLEN 256 67 68 int 69 securid_usersfile_find(const char *pw_name) 70 { 71 extern ServerOptions options; 72 FILE *inf; 73 char inbuff[INBUFFLEN]; 74 struct stat fileinfo; 75 int retval = 0; 76 77 if(!options.securid_usersfile) { 78 error("In securid_usersfile_find() with NULL filename!"); 79 return -1; 80 } 81 if(lstat(options.securid_usersfile, &fileinfo)) { 82 error("Cannot open %s: %s", 83 options.securid_usersfile, strerror(errno)); 84 return -1; 85 } 86 if(fileinfo.st_mode & (S_IWOTH|S_IWGRP)) { 87 error("SecurIDUsersFile is writeable by group and other"); 88 return -1; 89 } 90 if(!(inf = fopen(options.securid_usersfile, "r"))) { 91 error("Cannot open %s: %s", 92 options.securid_usersfile, strerror(errno)); 93 return -1; 94 } 95 while(fgets(inbuff,INBUFFLEN-1,inf) != NULL) { 96 if(inbuff[strlen(inbuff) - 1] == '\n') 97 inbuff[strlen(inbuff) - 1] = '\0'; 98 retval = !strcmp(inbuff,pw_name); 99 if(retval) break; 100 } 101 fclose(inf); 102 if(retval) return 1; 103 debug2("Failed to find %s in %s", 104 pw_name, options.securid_usersfile); 105 return 0; 106 } 107 int 108 auth_securid(Authctxt *authctxt, const char *password) 109 { 110 static int state = 0; /* This tells us where we expect a 111 0 "PIN" 112 1 "Next Token" 113 */ 114 int doauth; 115 char *ecp; 116 /* Changed this to static, since pw->shell does not get redefined, prevents mem leak JWM */ 117 /* Allocate 256 chars for shell JWM */ 118 static char shell[256]; 119 extern ServerOptions options; 120 struct passwd *pw; 121 #ifndef SECURID 122 return -1; 123 #else 124 /* Add static for the nexttoken case -- Anders Olsen 20010409 */ 125 /* API Change for ACE version 5.03 JWM */ 126 #ifdef SECURID_NEW 127 static SDI_HANDLE sd_dat; 128 #else 129 static struct SD_CLIENT sd_dat, *sd; 130 #endif 131 132 pw = authctxt->pw; 133 /* Check for users with no sdshell and pass them by. */ 134 if(options.securid_usersfile) { 135 doauth = securid_usersfile_find(pw->pw_name); 136 if(!options.negate_securid_users && doauth == 0) { 137 /* file is there, user is not, option respected */ 138 /* log instead of error JWM */ 139 log("User Not In SecurID Users Allow File"); 140 if(options.allow_nonsecurid) return -1; 141 return 0; 142 } else if(options.negate_securid_users && doauth == 1) { 143 /* file is there, user is, option negated */ 144 /* log instead of error JWM */ 145 log("User In SecurID Users Deny File"); 146 if(options.allow_nonsecurid) return -1; 147 return 0; 148 } else if(doauth < 0) { /* File not there or bad perms! */ 149 error("Failing SecurID login attempt"); 150 return 0; /* Fail */ 151 } 152 } else { 153 /* No users securid_usersfile 154 so use shells that end in sdshell */ 155 if (!((ecp = strstr(pw->pw_shell, "sdshell")) && 156 (*(ecp+7)=='\0'))) { 157 if(options.allow_nonsecurid) { 158 return -1; 159 } else { 160 return 0; 161 } 162 } 163 } 164 /* sd_check on with an empty password causes segfault against some 165 versions of sdiclient -- Anders Olsen 20010409 */ 166 if (*password == '\0') { 167 debug2("auth_securid: empty password, skipping"); 168 return 0; 169 } 170 /* Don't reopen session to securid-server is nexttoken 171 -- Adres Olsen 20010410 */ 172 if (state == 0) { 173 int ret; 174 #ifdef SECURID_NEW 175 /* API Change for ACE version 5.03 JWM */ 176 /* Initialize the ace client, test for sdconf.rec and other setup */ 177 if(AceInitialize() == SD_FALSE) { 178 error("SecurID: Failed to initialize ACE API library."); 179 if(options.securid_fallback) return -1; 180 return 0; 181 } 182 /* API Change for ACE version 5.03 JWM */ 183 /* Initialize communication, check connection to server, etc */ 184 ret = SD_Init(&sd_dat); 185 if(ret != ACM_OK) { 186 if(ret == ACE_INIT_NO_RESOURCE) { 187 error("SecurID: Couldn't allocate memory."); 188 } 189 if(ret == ACE_INIT_SOCKET_FAIL) { 190 error("SecurID: Couldn't create socket."); 191 } 192 error("SecurID: Couldn't establish client/server communications."); 193 if(options.securid_fallback) return -1; 194 return 0; 195 } 196 /* API addition for ACE version 5.03 JWM */ 197 /* Lock Server */ 198 if(SD_Lock(sd_dat,pw->pw_name) == ACM_OK) { 199 debug("SecurID: Locked Server"); 200 } else { 201 error("SecurID: Failed to lock server."); 202 return 0; 203 } 204 /* API Change for version 5.03 JWM */ 205 /* Check for valid authentication */ 206 ret = SD_Check(sd_dat, (char *)password, pw->pw_name); 207 if(ret == ACM_OK) { 208 goto success; 209 } else { 210 if(ret == ACM_ACCESS_DENIED) { 211 error("SecurID: authentication failed."); 212 } 213 if(ret == ACM_NEXT_CODE_REQUIRED) { 214 error("SecurID: needs next token."); 215 state = 1; /* Process next try as sd_next */ 216 } 217 if(ret == ACE_UNDEFINED_PASSCODE) { 218 error("SecurID: passcode invalid length or null"); 219 } 220 if(ret == ACE_UNDEFINED_USERNAME) { 221 error("SecurID: username invalid length or null"); 222 } 223 if(ret == ACE_ERR_INVALID_HANDLE) { 224 error("SecurID: handle value invalid"); 225 } 226 if(ret == ACM_NEW_PIN_REQUIRED) { 227 error("SecurID: new pin required"); 228 } 229 return 0; /* Failed! */ 230 } 231 #else /* else old securid */ 232 memset(&sd_dat, 0, sizeof(sd_dat)); /* clear struct */ 233 sd = &sd_dat; 234 235 if(creadcfg()) { 236 /* Can't read sdconf.rec! Gotta bail */ 237 error("SecurID: Couldn't read sdconf.rec."); 238 if(options.securid_fallback) return -1; 239 return 0; 240 } 241 if(sd_init(sd)) { 242 /* Can't establish client/server comms! Gotta bail */ 243 error("SecurID: Couldn't establish client/server communications."); 244 if(options.securid_fallback) return -1; 245 return 0; 246 } 247 /* Auth PIN... */ 248 ret = sd_check((char *)password, pw->pw_name, sd); 249 if(ret == ACM_OK) { 250 goto success; 251 } 252 if(ret == ACM_ACCESS_DENIED) { 253 error("SecurID: passcode rejected."); 254 return 0; /* Failed! */ 255 } 256 if(ret == ACM_NEXT_CODE_REQUIRED) { 257 error("SecurID: needs next token."); 258 state = 1; /* Process next try as sd_next */ 259 return 0; /* Fail, so ssh will prmpt again */ 260 } 261 #endif 262 } else { 263 /* Auth next token... */ 264 int ret; 265 state = 0; /* Set back to PIN mode */ 266 #ifdef SECURID_NEW 267 /* API Change for version 5.03 JWM */ 268 ret = SD_Next(sd_dat, (char *)password); 269 #else 270 ret = sd_next((char *)password, sd); 271 #endif 272 if(ret == ACM_OK) { 273 goto success; 274 } 275 error("SecurID: passcode rejected."); 276 return 0; /* Failed */ 277 } 278 error("SecurID: unhandled sdcheck() return code."); 279 return 0; /* Failed! */ 280 281 success: 282 #ifdef SECURID_NEW 283 /* Clear mem for shell */ 284 memset(shell, 0, sizeof(shell)); 285 #endif 286 if(!options.securid_ignore_shell) { 287 #ifdef SECURID_NEW 288 /* Changed for ACE 5.0 API JWM */ 289 if(!AceGetShell(sd_dat,shell)) { 290 error("SecurID: Failed to get user's shell from server."); 291 return 0; 292 } 293 #else 294 strcpy(shell,sd->shell); 295 #endif 296 pw->pw_shell = shell; 297 } 298 #ifdef SECURID_NEW 299 if(SD_Close(sd_dat) != ACM_OK) { 300 error("SecurID: SD_Close - Handle invalid."); 301 } 302 #else 303 if(!sd_close()) { 304 error("SecurID: sd_close failed."); 305 } 306 #endif 307 return 1; /* Success */ 308 #endif 309 } -
openssh-3.6.1p1/auth.h
old new 100 100 auth_rhosts2(struct passwd *, const char *, const char *, const char *); 101 101 102 102 int auth_rhosts_rsa(struct passwd *, char *, Key *); 103 #ifdef SECURID 104 int auth_securid(Authctxt *, const char *); 105 #endif 103 106 int auth_password(Authctxt *, const char *); 104 107 int auth_rsa(struct passwd *, BIGNUM *); 105 108 int auth_rsa_challenge_dialog(Key *); -
openssh-3.6.1p1/auth2-passwd.c
old new 47 47 log("password change not supported"); 48 48 password = packet_get_string(&len); 49 49 packet_check_eom(); 50 #ifdef SECURID 51 /* Try SecurID regardless */ 52 if (authctxt->valid && options.securid_authentication == 1) { 53 authenticated = PRIVSEP(auth_securid(authctxt, password)); 54 /* Only returns < 0 if the account is not a SecurID account */ 55 /* Fall back to ordinary passwd authentication. */ 56 if(authenticated < 0) 57 authenticated = 0; 58 else 59 goto passreturn; 60 } 61 /* No... continue */ 62 #endif 50 63 if (authctxt->valid && 51 64 #ifdef HAVE_CYGWIN 52 65 check_nt_auth(1, authctxt->pw) && 53 66 #endif 54 67 PRIVSEP(auth_password(authctxt, password)) == 1) 55 68 authenticated = 1; 69 passreturn: 56 70 memset(password, 0, len); 57 71 xfree(password); 58 72 return authenticated; -
openssh-3.6.1p1/config.h.in
old new 216 216 /* Define if you want S/Key support */ 217 217 #undef SKEY 218 218 219 /* Define if you want SecurID support */ 220 #undef SECURID 221 #undef SECURID_NEW 222 219 223 /* Define if you want TCP Wrappers support */ 220 224 #undef LIBWRAP 221 225 -
openssh-3.6.1p1/configure
old new 849 849 --with-zlib=PATH Use zlib in PATH 850 850 --with-skey[=PATH] Enable S/Key support 851 851 (optionally in PATH) 852 --with-securid Enable ACE 5.X+ SecurID support 853 --with-securid-old Enable SecurID 4.X and earlier SecurID support 852 854 --with-tcp-wrappers[=PATH] Enable tcpwrappers support 853 855 (optionally in PATH) 854 856 --with-pam Enable PAM support … … 6647 6649 6648 6650 6649 6651 fi; 6652 SECURID_MSG="no" 6650 6653 6654 # Check whether --with-securid or --without-securid was given. 6655 if test "${with_securid+set}" = set; then 6656 withval="$with_securid" 6657 6658 if test "x$withval" != "xno" ; then 6659 saved_LIBS="$LIBS" 6660 LIBS="$LIBS libaceclnt.a -lpthread" 6661 echo "$as_me:$LINENO: checking for libaceclnt.a and includes" >&5 6662 echo $ECHO_N "checking for libaceclnt.a and includes... $ECHO_C" >&6 6663 cat >conftest.$ac_ext <<_ACEOF 6664 #line $LINENO "configure" 6665 #include "confdefs.h" 6666 6667 #include "acexport.h" 6668 SDI_HANDLE sd_dat; 6669 6670 #ifdef F77_DUMMY_MAIN 6671 # ifdef __cplusplus 6672 extern "C" 6673 # endif 6674 int F77_DUMMY_MAIN() { return 1; } 6675 #endif 6676 int 6677 main () 6678 { 6679 AceInitialize(); SD_Init(&sd_dat); 6680 ; 6681 return 0; 6682 } 6683 _ACEOF 6684 rm -f conftest.$ac_objext conftest$ac_exeext 6685 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 6686 (eval $ac_link) 2>&5 6687 ac_status=$? 6688 echo "$as_me:$LINENO: \$? = $ac_status" >&5 6689 (exit $ac_status); } && 6690 { ac_try='test -s conftest$ac_exeext' 6691 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 6692 (eval $ac_try) 2>&5 6693 ac_status=$? 6694 echo "$as_me:$LINENO: \$? = $ac_status" >&5 6695 (exit $ac_status); }; }; then 6696 6697 echo "$as_me:$LINENO: result: yes" >&5 6698 echo "${ECHO_T}yes" >&6 6699 cat >>confdefs.h <<\_ACEOF 6700 #define SECURID 1 6701 _ACEOF 6702 6703 cat >>confdefs.h <<\_ACEOF 6704 #define SECURID_NEW 1 6705 _ACEOF 6706 6707 SECURID_MSG="yes: 5.X+" 6708 6709 else 6710 echo "$as_me: failed program was:" >&5 6711 cat conftest.$ac_ext >&5 6712 6713 { { echo "$as_me:$LINENO: error: *** libaceclnt.a or includes missing" >&5 6714 echo "$as_me: error: *** libaceclnt.a or includes missing" >&2;} 6715 { (exit 1); exit 1; }; } 6716 6717 6718 fi 6719 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 6720 fi 6721 6722 6723 fi; 6724 6725 # Check whether --with-securid-old or --without-securid-old was given. 6726 if test "${with_securid_old+set}" = set; then 6727 withval="$with_securid_old" 6728 6729 if test "x$withval" != "xno" ; then 6730 saved_LIBS="$LIBS" 6731 LIBS="$LIBS sdiclient.a" 6732 echo "$as_me:$LINENO: checking for sdiclient.a and includes" >&5 6733 echo $ECHO_N "checking for sdiclient.a and includes... $ECHO_C" >&6 6734 cat >conftest.$ac_ext <<_ACEOF 6735 #line $LINENO "configure" 6736 #include "confdefs.h" 6737 6738 #include "sdi_athd.h" 6739 #include "sdconf.h" 6740 #include "sdacmvls.h" 6741 struct SD_CLIENT sd_dat, *sd; 6742 union config_record configure; 6743 6744 #ifdef F77_DUMMY_MAIN 6745 # ifdef __cplusplus 6746 extern "C" 6747 # endif 6748 int F77_DUMMY_MAIN() { return 1; } 6749 #endif 6750 int 6751 main () 6752 { 6753 sd = &sd_dat; creadcfg(); sd_init(sd); 6754 ; 6755 return 0; 6756 } 6757 _ACEOF 6758 rm -f conftest.$ac_objext conftest$ac_exeext 6759 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 6760 (eval $ac_link) 2>&5 6761 ac_status=$? 6762 echo "$as_me:$LINENO: \$? = $ac_status" >&5 6763 (exit $ac_status); } && 6764 { ac_try='test -s conftest$ac_exeext' 6765 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 6766 (eval $ac_try) 2>&5 6767 ac_status=$? 6768 echo "$as_me:$LINENO: \$? = $ac_status" >&5 6769 (exit $ac_status); }; }; then 6770 6771 echo "$as_me:$LINENO: result: yes" >&5 6772 echo "${ECHO_T}yes" >&6 6773 cat >>confdefs.h <<\_ACEOF 6774 #define SECURID 1 6775 _ACEOF 6776 6777 SECURID_MSG="yes: <= 4.X" 6778 6779 else 6780 echo "$as_me: failed program was:" >&5 6781 cat conftest.$ac_ext >&5 6782 6783 { { echo "$as_me:$LINENO: error: *** sdiclient.a or includes missing" >&5 6784 echo "$as_me: error: *** sdiclient.a or includes missing" >&2;} 6785 { (exit 1); exit 1; }; } 6786 6787 6788 fi 6789 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 6790 fi 6791 6792 6793 fi; 6794 6651 6795 # Check whether user wants TCP wrappers support 6652 6796 TCPW_MSG="no" 6653 6797 … … 18319 18463 echo " Smartcard support: $SCARD_MSG" 18320 18464 echo " AFS support: $AFS_MSG" 18321 18465 echo " S/KEY support: $SKEY_MSG" 18466 echo " SecurID support: $SECURID_MSG" 18322 18467 echo " TCP Wrappers support: $TCPW_MSG" 18323 18468 echo " MD5 password support: $MD5_MSG" 18324 echo " IP address in \$DISPLAY hack: $DISPLAY_HACK_MSG"18469 echo " IP address in \$DISPLAY hack: $DISPLAY_HACK_MSG" 18325 18470 echo " Use IPv4 by default hack: $IPV4_HACK_MSG" 18326 18471 echo " Translate v4 in v6 hack: $IPV4_IN6_HACK_MSG" 18327 18472 echo " BSD Auth support: $BSD_AUTH_MSG" -
openssh-3.6.1p1/configure.ac
old new 547 547 fi 548 548 ] 549 549 ) 550 SECURID_MSG="no" 551 AC_ARG_WITH(securid, 552 [ --with-securid Enable ACE 5.X+ SecurID support], 553 [ 554 if test "x$withval" != "xno" ; then 555 saved_LIBS="$LIBS" 556 LIBS="$LIBS libaceclnt.a -lpthread" 557 AC_MSG_CHECKING(for libaceclnt.a and includes) 558 AC_TRY_LINK( 559 [ 560 #include "acexport.h" 561 SDI_HANDLE sd_dat; 562 ], 563 [AceInitialize(); SD_Init(&sd_dat);], 564 [ 565 AC_MSG_RESULT(yes) 566 AC_DEFINE(SECURID) 567 AC_DEFINE(SECURID_NEW) 568 SECURID_MSG="yes: 5.X+" 569 ], 570 [ 571 AC_MSG_ERROR([*** libaceclnt.a or includes missing]) 572 ] 573 ) 574 fi 575 ] 576 ) 577 AC_ARG_WITH(securid-old, 578 [ --with-securid-old Enable SecurID 4.X and earlier SecurID support], 579 [ 580 if test "x$withval" != "xno" ; then 581 saved_LIBS="$LIBS" 582 LIBS="$LIBS sdiclient.a" 583 AC_MSG_CHECKING(for sdiclient.a and includes) 584 AC_TRY_LINK( 585 [ 586 #include "sdi_athd.h" 587 #include "sdconf.h" 588 #include "sdacmvls.h" 589 struct SD_CLIENT sd_dat, *sd; 590 union config_record configure; 591 ], 592 [sd = &sd_dat; creadcfg(); sd_init(sd);], 593 [ 594 AC_MSG_RESULT(yes) 595 AC_DEFINE(SECURID) 596 SECURID_MSG="yes: <= 4.X" 597 ], 598 [ 599 AC_MSG_ERROR([*** sdiclient.a or includes missing]) 600 ] 601 ) 602 fi 603 ] 604 ) 550 605 551 606 # Check whether user wants TCP wrappers support 552 607 TCPW_MSG="no" … … 2527 2582 echo " Smartcard support: $SCARD_MSG" 2528 2583 echo " AFS support: $AFS_MSG" 2529 2584 echo " S/KEY support: $SKEY_MSG" 2585 echo " SecurID support: $SECURID_MSG" 2530 2586 echo " TCP Wrappers support: $TCPW_MSG" 2531 2587 echo " MD5 password support: $MD5_MSG" 2532 echo " IP address in \$DISPLAY hack: $DISPLAY_HACK_MSG"2588 echo " IP address in \$DISPLAY hack: $DISPLAY_HACK_MSG" 2533 2589 echo " Use IPv4 by default hack: $IPV4_HACK_MSG" 2534 2590 echo " Translate v4 in v6 hack: $IPV4_IN6_HACK_MSG" 2535 2591 echo " BSD Auth support: $BSD_AUTH_MSG" -
openssh-3.6.1p1/monitor.c
old new 100 100 int mm_answer_pwnamallow(int, Buffer *); 101 101 int mm_answer_auth2_read_banner(int, Buffer *); 102 102 int mm_answer_authserv(int, Buffer *); 103 int mm_answer_authsecurid(int, Buffer *); 103 104 int mm_answer_authpassword(int, Buffer *); 104 105 int mm_answer_bsdauthquery(int, Buffer *); 105 106 int mm_answer_bsdauthrespond(int, Buffer *); … … 161 162 {MONITOR_REQ_AUTHSERV, MON_ONCE, mm_answer_authserv}, 162 163 {MONITOR_REQ_AUTH2_READ_BANNER, MON_ONCE, mm_answer_auth2_read_banner}, 163 164 {MONITOR_REQ_AUTHPASSWORD, MON_AUTH, mm_answer_authpassword}, 165 #ifdef SECURID 166 {MONITOR_REQ_AUTHSECURID, MON_AUTH, mm_answer_authsecurid}, 167 #endif 164 168 #ifdef USE_PAM 165 169 {MONITOR_REQ_PAM_START, MON_ONCE, mm_answer_pam_start}, 166 170 #endif … … 595 599 return (0); 596 600 } 597 601 602 #ifdef SECURID 603 int 604 mm_answer_authsecurid(int socket, Buffer *m) 605 { 606 static int call_count; 607 char *passwd; 608 int authenticated, plen; 609 610 passwd = buffer_get_string(m, &plen); 611 /* Only authenticate if the context is valid */ 612 authenticated = 0; 613 if(options.securid_authentication && authctxt->valid) { 614 authenticated = auth_securid(authctxt, passwd); 615 /* Fixed fallback/nonsecurid JWM */ 616 if(authenticated < 0) { 617 if(options.password_authentication) { 618 if(options.allow_nonsecurid || options.securid_fallback) { 619 debug2("Falling to password authentication."); 620 authenticated = auth_password(authctxt, passwd); 621 } else { 622 authenticated = 0; 623 } 624 } else { 625 authenticated = 0; 626 } 627 } 628 } 629 memset(passwd, 0, strlen(passwd)); 630 xfree(passwd); 631 632 buffer_clear(m); 633 buffer_put_int(m, authenticated); 634 635 debug3("%s: sending result %d", __func__, authenticated); 636 mm_request_send(socket, MONITOR_ANS_AUTHSECURID, m); 637 638 call_count++; 639 if (plen == 0 && call_count == 1) 640 auth_method = "none"; 641 else 642 auth_method = "password"; 643 644 /* Causes monitor loop to terminate if authenticated */ 645 return (authenticated); 646 } 647 #endif 648 598 649 int 599 650 mm_answer_authpassword(int socket, Buffer *m) 600 651 { -
openssh-3.6.1p1/monitor.h
old new 34 34 MONITOR_REQ_SIGN, MONITOR_ANS_SIGN, 35 35 MONITOR_REQ_PWNAM, MONITOR_ANS_PWNAM, 36 36 MONITOR_REQ_AUTH2_READ_BANNER, MONITOR_ANS_AUTH2_READ_BANNER, 37 MONITOR_REQ_AUTHSECURID, MONITOR_ANS_AUTHSECURID, 37 38 MONITOR_REQ_AUTHPASSWORD, MONITOR_ANS_AUTHPASSWORD, 38 39 MONITOR_REQ_BSDAUTHQUERY, MONITOR_ANS_BSDAUTHQUERY, 39 40 MONITOR_REQ_BSDAUTHRESPOND, MONITOR_ANS_BSDAUTHRESPOND, -
openssh-3.6.1p1/monitor_wrap.c
old new 244 244 buffer_free(&m); 245 245 } 246 246 247 #ifdef SECURID 248 /* Do the securid authentication */ 249 int 250 mm_auth_securid(Authctxt *authctxt, char *password) 251 { 252 Buffer m; 253 int authenticated = 0; 254 255 debug3("%s entering", __func__); 256 257 buffer_init(&m); 258 buffer_put_cstring(&m, password); 259 mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_AUTHSECURID, &m); 260 261 debug3("%s: waiting for MONITOR_ANS_AUTHSECURID", __func__); 262 mm_request_receive_expect(pmonitor->m_recvfd, MONITOR_ANS_AUTHSECURID, &m); 263 264 authenticated = buffer_get_int(&m); 265 266 buffer_free(&m); 267 268 debug3("%s: user %sauthenticated", 269 __func__, authenticated ? "" : "not "); 270 return (authenticated); 271 } 272 #endif 273 247 274 /* Do the password authentication */ 248 275 int 249 276 mm_auth_password(Authctxt *authctxt, char *password) -
openssh-3.6.1p1/monitor_wrap.h
old new 45 45 void mm_inform_authserv(char *, char *); 46 46 struct passwd *mm_getpwnamallow(const char *); 47 47 char *mm_auth2_read_banner(void); 48 #ifdef SECURID 49 int mm_auth_securid(struct Authctxt *, char *); 50 #endif 48 51 int mm_auth_password(struct Authctxt *, char *); 49 52 int mm_key_allowed(enum mm_keytype, char *, char *, Key *); 50 53 int mm_user_key_allowed(struct passwd *, Key *); -
openssh-3.6.1p1/servconf.c
old new 86 86 options->hostbased_uses_name_from_packet_only = -1; 87 87 options->rsa_authentication = -1; 88 88 options->pubkey_authentication = -1; 89 #ifdef SECURID 90 options->securid_authentication = -1; 91 options->securid_fallback = -1; 92 options->allow_nonsecurid = -1; 93 options->negate_securid_users = -1; 94 options->securid_usersfile = NULL; 95 options->securid_ignore_shell = -1; 96 #endif 89 97 #if defined(KRB4) || defined(KRB5) 90 98 options->kerberos_authentication = -1; 91 99 options->kerberos_or_local_passwd = -1; … … 200 208 options->rsa_authentication = 1; 201 209 if (options->pubkey_authentication == -1) 202 210 options->pubkey_authentication = 1; 211 #ifdef SECURID 212 if (options->securid_authentication == -1) 213 options->securid_authentication = 1; 214 /* Fixed fallback and non-securid JWM */ 215 if (options->securid_fallback == -1) 216 options->securid_fallback = 1; 217 if (options->allow_nonsecurid == -1) 218 options->allow_nonsecurid = 1; 219 if (options->negate_securid_users == -1) 220 options->negate_securid_users = 0; 221 if (options->securid_ignore_shell == -1) 222 options->securid_ignore_shell = 0; 223 #endif 203 224 #if defined(KRB4) || defined(KRB5) 204 225 if (options->kerberos_authentication == -1) 205 226 options->kerberos_authentication = 0; … … 280 301 sPort, sHostKeyFile, sServerKeyBits, sLoginGraceTime, sKeyRegenerationTime, 281 302 sPermitRootLogin, sLogFacility, sLogLevel, 282 303 sRhostsAuthentication, sRhostsRSAAuthentication, sRSAAuthentication, 304 #ifdef SECURID 305 sSecurIDAuthentication, sSecurIDFallBack, sAllowNonSecurID, 306 sNegateSecurIDUsers, sSecurIDUsersFile, sSecurIDIgnoreShell, 307 #endif 283 308 #if defined(KRB4) || defined(KRB5) 284 309 sKerberosAuthentication, sKerberosOrLocalPasswd, sKerberosTicketCleanup, 285 310 #endif … … 322 347 { "keyregenerationinterval", sKeyRegenerationTime }, 323 348 { "permitrootlogin", sPermitRootLogin }, 324 349 { "syslogfacility", sLogFacility }, 350 #ifdef SECURID 351 { "securidauthentication", sSecurIDAuthentication }, 352 { "securidfallback", sSecurIDFallBack }, 353 { "allownonsecurid", sAllowNonSecurID }, 354 { "negatesecuridusers", sNegateSecurIDUsers }, 355 { "securidusersfile", sSecurIDUsersFile }, 356 { "securidignoreshell", sSecurIDIgnoreShell }, 357 #endif 325 358 { "loglevel", sLogLevel }, 326 359 { "rhostsauthentication", sRhostsAuthentication }, 327 360 { "rhostsrsaauthentication", sRhostsRSAAuthentication }, … … 663 696 intptr = &options->kerberos_tgt_passing; 664 697 goto parse_flag; 665 698 #endif 699 #ifdef SECURID 700 case sSecurIDAuthentication: 701 intptr = &options->securid_authentication; 702 goto parse_flag; 703 case sSecurIDFallBack: 704 intptr = &options->securid_fallback; 705 goto parse_flag; 706 case sAllowNonSecurID: 707 intptr = &options->allow_nonsecurid; 708 goto parse_flag; 709 case sNegateSecurIDUsers: 710 intptr = &options->negate_securid_users; 711 goto parse_flag; 712 case sSecurIDUsersFile: 713 charptr = &options->securid_usersfile; 714 goto parse_filename; 715 case sSecurIDIgnoreShell: 716 intptr = &options->securid_ignore_shell; 717 goto parse_flag; 718 #endif 666 719 #ifdef AFS 667 720 case sAFSTokenPassing: 668 721 intptr = &options->afs_token_passing; -
openssh-3.6.1p1/servconf.h
old new 88 88 int kerberos_tgt_passing; /* If true, permit Kerberos TGT 89 89 * passing. */ 90 90 #endif 91 #ifdef SECURID 92 int securid_authentication; /* If set, use securid */ 93 int securid_fallback; /* If set, allow normal passwords 94 is master/slave are not accessible */ 95 int allow_nonsecurid; /* If set, allow nonsecurid users 96 logins via other means (e.g. PAM) */ 97 int negate_securid_users; /* If set, securid_usersfile is used 98 to determine who _doesn't_ get 99 authed via SecurID */ 100 char *securid_usersfile; /* If set, only users in the file 101 will authenticate via SecurID 102 The shell need not be .../sdshell */ 103 int securid_ignore_shell; /* If true, use the shell in /etc/passwd 104 instead of the shell proposed by 105 the ACE server. */ 106 #endif 91 107 #ifdef AFS 92 108 int afs_token_passing; /* If true, permit AFS token passing. */ 93 109 #endif -
openssh-3.6.1p1/sshd_config.0
old new 27 27 patterns. Only group names are valid; a numerical group ID is 28 28 not recognized. By default, login is allowed for all groups. 29 29 30 ^[[1mAllowNonSecurID^[[0m 31 This will allow users that do not meet the SecurID login activaM-bM-^@M-^P 32 tion requirements (not in the SecurIDUsersFile or do not have a 33 shell ending with sdshell, if the SecurIDUsersFile option is used 34 or is omitted, respectively) to still log in using another auM-bM-^@M-^P 35 thentication method (e.g. PAM or passwd.) 36 30 37 ^[[1mAllowTcpForwarding^[[0m 31 38 Specifies whether TCP forwarding is permitted. The default is 32 39 M-bM-^@M-^\yesM-bM-^@M-^]. Note that disabling TCP forwarding does not improve secuM-bM-^@M-^P … … 249 256 and all connection attempts are refused if the number of unauM-bM-^@M-^P 250 257 thenticated connections reaches M-bM-^@M-^\fullM-bM-^@M-^] (60). 251 258 259 ^[[1mNegateSecurIDUsers^[[0m 260 Negates the meaning of the SecurIDUsers file. Users in this file 261 Will not require SecurID auth, but all others will. The 262 default is M-bM-^@M-^\noM-bM-^@M-^]. 263 252 264 ^[[1mPAMAuthenticationViaKbdInt^[[0m 253 265 Specifies whether PAM challenge response authentication is 254 266 allowed. This allows the use of most PAM challenge response … … 336 348 default is M-bM-^@M-^\yesM-bM-^@M-^]. This option applies to protocol version 1 337 349 only. 338 350 351 ^[[1mSecurIDAuthentication^[[0m 352 Specifies whether SecurID authentication is allowed. The default 353 is yes. SecurID authentication is enabled in both PAM and 354 PasswordAuthentication modes. 355 356 NOTES: After you enter you SecurID passcode, SecurID may choose 357 to ask for the next code on your token. To handle this event 358 without modifying the SSH client, the actual information that 359 sshd is asing for is passed in the debugging messages. If your 360 login attempts fail, try sshing with -v and you can see if it is 361 asking for your passcode or for the next token. 362 363 ^[[1mSecurIDFallBack^[[0m 364 Specifies whether SecurID user logins will fallback to their 365 to an underlying form (PAM/PaswordAuthentication) if the SecurID 366 server is unavailable or the machine is not configured correctly. 367 368 ^[[1mSecurIDIgnoreShell^[[0m 369 Specifies whether sshd will respect the ACE server's propsed user 370 shell. The default is M-bM-^@M-^\noM-bM-^@M-^]. If yes, then the shell in 371 /etc/passwd will be used instead, eliminating the need for a 372 /path/to/ace/prog/sdshell style shell. This option only makes 373 sense when using the SecurIDUsersFile option. 374 375 ^[[1mSecurIDUsersFile^[[0m 376 The argument a filename that contains usernames that are to be 377 authenticated via SecurID. By default this option is unset and 378 users will only be authenticated if their shell ends with sdshell 379 380 If the SecurIDIgnoreShell option is set to M-bM-^@M-^\yesM-bM-^@M-^], then the 381 shell in /etc/passwd will be used in place of the shell proposed 382 by the ACE server -- allowing a user to have different shells on 383 different machines. In conjunction wth SecurIDIgnoreShell, this 384 can force sshd to use SecurID while other system authentications 385 use alternative methods without the complication of having sdshell 386 as the user's default shell. 387 339 388 ^[[1mServerKeyBits^[[0m 340 389 Defines the number of bits in the ephemeral protocol version 1 341 390 server key. The minimum value is 512, and the default is 768. -
openssh-3.6.1p1/sshd_config.5
old new 78 78 Only group names are valid; a numerical group ID is not recognized. 79 79 By default, login is allowed for all groups. 80 80 .Pp 81 .It Cm AllowNonSecurID 82 This will allow users that do not meet the SecurID login 83 activation requirements (not in the SecurIDUsersFile or do not 84 have a shell ending with sdshell, if the SecurIDUsersFile option 85 is used or is omitted, respectively) to still log in using another 86 authentication method (e.g. PAM or passwd.) 87 .Pp 81 88 .It Cm AllowTcpForwarding 82 89 Specifies whether TCP forwarding is permitted. 83 90 The default is … … 422 429 are refused if the number of unauthenticated connections reaches 423 430 .Dq full 424 431 (60). 432 .It Cm NegateSecurIDUsers 433 Negates the meaning of the SecurIDUsers file. Users in this file 434 Will not require SecurID auth, but all others will. 435 The default is 436 .Dq no . 425 437 .It Cm PAMAuthenticationViaKbdInt 426 438 Specifies whether PAM challenge response authentication is allowed. This 427 439 allows the use of most PAM challenge response authentication modules, but … … 556 568 The default is 557 569 .Dq yes . 558 570 This option applies to protocol version 1 only. 571 .It Cm SecurIDAuthentication 572 Specifies whether SecurID authentication is allowed. The default 573 is yes. SecurID authentication si enabled in both PAM and 574 PasswordAuthentication modes. 575 .Dq yes . 576 Note that after you enter you SecurID passcode, SecurID may choose 577 to ask for the next code on your token. To handle this event 578 without modifying the SSH client, the actual information that 579 sshd is asing for is passed in the debugging messages. If your 580 login attempts fail, try sshing with -v and you can see if it is 581 asking for your passcode or for the next token. 582 .It Cm SecurIDFallBack 583 Specifies whether SecurID user logins will fallback to their 584 to an underlying form (PAM/PaswordAuthentication) is the SecurID 585 server is unavailable or the machine is not configured correctly. 586 .It Cm SecurIDIgnoreShell 587 Specifies whether sshd will respect the ACE server's propsed user 588 shell. The default is ``no''. If yes, then the shell in 589 /etc/passwd will be used instead, eliminating the need for a 590 /path/to/ace/prog/sdshell style shell. This option only makes 591 sense when using the SecurIDUsersFile option. 592 .It Cm SecurIDUsersFile 593 The argument a filename that contains usernames that are to be 594 authenticated via SecurID. By default this option is unset and 595 users will only be authenticated if their shell ends with sdshell. 596 If the SecurIDIgnoreShell option is set to ``yes'', then the 597 shell in /etc/passwd will be used in place of the shell proposed 598 by the ACE server -- allowing a user to have different shells on 599 different machines. In conjunction wth SecurIDIgnoreShell, this 600 can force sshd to use SecurID while other system authentications 601 use alternative methods without the complication of having sdshell 602 as the user's default shell. 559 603 .It Cm ServerKeyBits 560 604 Defines the number of bits in the ephemeral protocol version 1 server key. 561 605 The minimum value is 512, and the default is 768.
Note: See TracBrowser for help on using the browser.
