ssh.h (9ceffc938a0bfb5f64083391bfbf787cbab31382) | ssh.h (fe5fd0173b1983e53ba8dbafb3229b37444e7986) |
---|---|
1/* 2 * 3 * ssh.h 4 * 5 * Author: Tatu Ylonen <ylo@cs.hut.fi> 6 * 7 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 8 * All rights reserved --- 168 unchanged lines hidden (view full) --- 177 * Authentication methods. New types can be added, but old types should not 178 * be removed for compatibility. The maximum allowed value is 31. 179 */ 180#define SSH_AUTH_RHOSTS 1 181#define SSH_AUTH_RSA 2 182#define SSH_AUTH_PASSWORD 3 183#define SSH_AUTH_RHOSTS_RSA 4 184#define SSH_AUTH_TIS 5 | 1/* 2 * 3 * ssh.h 4 * 5 * Author: Tatu Ylonen <ylo@cs.hut.fi> 6 * 7 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 8 * All rights reserved --- 168 unchanged lines hidden (view full) --- 177 * Authentication methods. New types can be added, but old types should not 178 * be removed for compatibility. The maximum allowed value is 31. 179 */ 180#define SSH_AUTH_RHOSTS 1 181#define SSH_AUTH_RSA 2 182#define SSH_AUTH_PASSWORD 3 183#define SSH_AUTH_RHOSTS_RSA 4 184#define SSH_AUTH_TIS 5 |
185#define SSH_AUTH_KERBEROS 6 186#define SSH_PASS_KERBEROS_TGT 7 | 185#define SSH_AUTH_KRB4 6 186#define SSH_PASS_KRB4_TGT 7 |
187 /* 8 to 15 are reserved */ 188#define SSH_PASS_AFS_TOKEN 21 189 | 187 /* 8 to 15 are reserved */ 188#define SSH_PASS_AFS_TOKEN 21 189 |
190#define SSH_AUTH_KRB5 29 191#define SSH_PASS_KRB5_TGT 30 192 |
|
190/* Protocol flags. These are bit masks. */ 191#define SSH_PROTOFLAG_SCREEN_NUMBER 1 /* X11 forwarding includes screen */ 192#define SSH_PROTOFLAG_HOST_IN_FWD_OPEN 2 /* forwarding opens contain host */ 193 194/* 195 * Definition of message types. New values can be added, but old values 196 * should not be removed or without careful consideration of the consequences 197 * for compatibility. The maximum value is 254; value 255 is reserved for --- 37 unchanged lines hidden (view full) --- 235#define SSH_CMSG_X11_REQUEST_FORWARDING 34 /* proto,data (s,s) */ 236#define SSH_CMSG_AUTH_RHOSTS_RSA 35 /* user,mod (s,mpi) */ 237#define SSH_MSG_DEBUG 36 /* string */ 238#define SSH_CMSG_REQUEST_COMPRESSION 37 /* level 1-9 (int) */ 239#define SSH_CMSG_MAX_PACKET_SIZE 38 /* size 4k-1024k (int) */ 240#define SSH_CMSG_AUTH_TIS 39 /* we use this for s/key */ 241#define SSH_SMSG_AUTH_TIS_CHALLENGE 40 /* challenge (string) */ 242#define SSH_CMSG_AUTH_TIS_RESPONSE 41 /* response (string) */ | 193/* Protocol flags. These are bit masks. */ 194#define SSH_PROTOFLAG_SCREEN_NUMBER 1 /* X11 forwarding includes screen */ 195#define SSH_PROTOFLAG_HOST_IN_FWD_OPEN 2 /* forwarding opens contain host */ 196 197/* 198 * Definition of message types. New values can be added, but old values 199 * should not be removed or without careful consideration of the consequences 200 * for compatibility. The maximum value is 254; value 255 is reserved for --- 37 unchanged lines hidden (view full) --- 238#define SSH_CMSG_X11_REQUEST_FORWARDING 34 /* proto,data (s,s) */ 239#define SSH_CMSG_AUTH_RHOSTS_RSA 35 /* user,mod (s,mpi) */ 240#define SSH_MSG_DEBUG 36 /* string */ 241#define SSH_CMSG_REQUEST_COMPRESSION 37 /* level 1-9 (int) */ 242#define SSH_CMSG_MAX_PACKET_SIZE 38 /* size 4k-1024k (int) */ 243#define SSH_CMSG_AUTH_TIS 39 /* we use this for s/key */ 244#define SSH_SMSG_AUTH_TIS_CHALLENGE 40 /* challenge (string) */ 245#define SSH_CMSG_AUTH_TIS_RESPONSE 41 /* response (string) */ |
243#define SSH_CMSG_AUTH_KERBEROS 42 /* (KTEXT) */ 244#define SSH_SMSG_AUTH_KERBEROS_RESPONSE 43 /* (KTEXT) */ 245#define SSH_CMSG_HAVE_KERBEROS_TGT 44 /* credentials (s) */ | 246#define SSH_CMSG_AUTH_KRB4 42 /* (KTEXT) */ 247#define SSH_SMSG_AUTH_KRB4_RESPONSE 43 /* (KTEXT) */ 248#define SSH_CMSG_HAVE_KRB4_TGT 44 /* credentials (s) */ |
246#define SSH_CMSG_HAVE_AFS_TOKEN 65 /* token (s) */ 247 | 249#define SSH_CMSG_HAVE_AFS_TOKEN 65 /* token (s) */ 250 |
251#define SSH_CMSG_AUTH_KRB5 110 252#define SSH_SMSG_AUTH_KRB5_RESPONSE 111 253#define SSH_CMSG_HAVE_KRB5_TGT 112 254 |
|
248/*------------ definitions for login.c -------------*/ 249 250/* 251 * Returns the time when the user last logged in. Returns 0 if the 252 * information is not available. This must be called before record_login. 253 * The host from which the user logged in is stored in buf. 254 */ 255unsigned long --- 429 unchanged lines hidden (view full) --- 685 char *s; 686}; 687 688/* 689 * Ensure all of data on socket comes through. f==read || f==write 690 */ 691ssize_t atomicio(ssize_t (*f)(), int fd, void *s, size_t n); 692 | 255/*------------ definitions for login.c -------------*/ 256 257/* 258 * Returns the time when the user last logged in. Returns 0 if the 259 * information is not available. This must be called before record_login. 260 * The host from which the user logged in is stored in buf. 261 */ 262unsigned long --- 429 unchanged lines hidden (view full) --- 692 char *s; 693}; 694 695/* 696 * Ensure all of data on socket comes through. f==read || f==write 697 */ 698ssize_t atomicio(ssize_t (*f)(), int fd, void *s, size_t n); 699 |
700#ifdef KRB5 701#include <krb5.h> 702int auth_krb5(); /* XXX Doplnit prototypy */ 703int auth_krb5_tgt(); 704int krb5_init(); 705void krb5_cleanup_proc(void *ignore); 706int auth_krb5_password(struct passwd *pw, const char *password); 707#endif /* KRB5 */ 708 |
|
693#ifdef KRB4 694#include <krb.h> 695/* 696 * Performs Kerberos v4 mutual authentication with the client. This returns 0 697 * if the client could not be authenticated, and 1 if authentication was 698 * successful. This may exit if there is a serious protocol violation. 699 */ 700int auth_krb4(const char *server_user, KTEXT auth, char **client); 701int krb4_init(uid_t uid); 702void krb4_cleanup_proc(void *ignore); 703int auth_krb4_password(struct passwd * pw, const char *password); 704 705#ifdef AFS 706#include <kafs.h> 707 708/* Accept passed Kerberos v4 ticket-granting ticket and AFS tokens. */ | 709#ifdef KRB4 710#include <krb.h> 711/* 712 * Performs Kerberos v4 mutual authentication with the client. This returns 0 713 * if the client could not be authenticated, and 1 if authentication was 714 * successful. This may exit if there is a serious protocol violation. 715 */ 716int auth_krb4(const char *server_user, KTEXT auth, char **client); 717int krb4_init(uid_t uid); 718void krb4_cleanup_proc(void *ignore); 719int auth_krb4_password(struct passwd * pw, const char *password); 720 721#ifdef AFS 722#include <kafs.h> 723 724/* Accept passed Kerberos v4 ticket-granting ticket and AFS tokens. */ |
709int auth_kerberos_tgt(struct passwd * pw, const char *string); | 725int auth_krb4_tgt(struct passwd * pw, const char *string); |
710int auth_afs_token(struct passwd * pw, const char *token_string); 711 712int creds_to_radix(CREDENTIALS * creds, unsigned char *buf); 713int radix_to_creds(const char *buf, CREDENTIALS * creds); 714#endif /* AFS */ 715 716#endif /* KRB4 */ 717 718#ifdef SKEY 719#include <skey.h> 720char *skey_fake_keyinfo(char *username); 721int auth_skey_password(struct passwd * pw, const char *password); 722#endif /* SKEY */ 723 724/* AF_UNSPEC or AF_INET or AF_INET6 */ 725extern int IPv4or6; 726 727#endif /* SSH_H */ | 726int auth_afs_token(struct passwd * pw, const char *token_string); 727 728int creds_to_radix(CREDENTIALS * creds, unsigned char *buf); 729int radix_to_creds(const char *buf, CREDENTIALS * creds); 730#endif /* AFS */ 731 732#endif /* KRB4 */ 733 734#ifdef SKEY 735#include <skey.h> 736char *skey_fake_keyinfo(char *username); 737int auth_skey_password(struct passwd * pw, const char *password); 738#endif /* SKEY */ 739 740/* AF_UNSPEC or AF_INET or AF_INET6 */ 741extern int IPv4or6; 742 743#endif /* SSH_H */ |