version 1.8, 1999/09/29 12:16:35 |
version 1.9, 1999/09/29 18:16:20 |
|
|
fprintf(stderr, " -l user Log in using this user name.\n"); |
fprintf(stderr, " -l user Log in using this user name.\n"); |
fprintf(stderr, " -n Redirect input from /dev/null.\n"); |
fprintf(stderr, " -n Redirect input from /dev/null.\n"); |
fprintf(stderr, " -a Disable authentication agent forwarding.\n"); |
fprintf(stderr, " -a Disable authentication agent forwarding.\n"); |
#if defined(KERBEROS_TGT_PASSING) || defined(AFS) |
#ifdef AFS |
fprintf(stderr, " This also disables passing of AFS tokens/Kerberos tickets.\n"); |
fprintf(stderr, " -k Disable Kerberos ticket and AFS token forwarding.\n"); |
#endif /* KERBEROS_TGT_PASSING || AFS */ |
#endif /* AFS */ |
fprintf(stderr, " -x Disable X11 connection forwarding.\n"); |
fprintf(stderr, " -x Disable X11 connection forwarding.\n"); |
fprintf(stderr, " -i file Identity for RSA authentication (default: ~/.ssh/identity).\n"); |
fprintf(stderr, " -i file Identity for RSA authentication (default: ~/.ssh/identity).\n"); |
fprintf(stderr, " -t Tty; allocate a tty even if command is given.\n"); |
fprintf(stderr, " -t Tty; allocate a tty even if command is given.\n"); |
|
|
struct stat st; |
struct stat st; |
struct passwd *pw, pwcopy; |
struct passwd *pw, pwcopy; |
int interactive = 0, dummy; |
int interactive = 0, dummy; |
uid_t original_real_uid; |
static uid_t original_real_uid; |
uid_t original_effective_uid; |
uid_t original_effective_uid; |
int plen; |
int plen; |
|
|
|
|
|
|
case 'a': |
case 'a': |
options.forward_agent = 0; |
options.forward_agent = 0; |
#ifdef KERBEROS_TGT_PASSING |
break; |
options.kerberos_tgt_passing = 0; |
|
#endif |
|
#ifdef AFS |
#ifdef AFS |
|
case 'k': |
|
options.kerberos_tgt_passing = 0; |
options.afs_token_passing = 0; |
options.afs_token_passing = 0; |
#endif |
|
break; |
break; |
|
#endif |
case 'i': |
case 'i': |
if (stat(optarg, &st) < 0) |
if (stat(optarg, &st) < 0) |
{ |
{ |
|
|
otherwise for the local connection. */ |
otherwise for the local connection. */ |
if (!got_data) |
if (!got_data) |
{ |
{ |
u_int32_t rand; |
u_int32_t rand = 0; |
|
|
strcpy(proto, "MIT-MAGIC-COOKIE-1"); |
strcpy(proto, "MIT-MAGIC-COOKIE-1"); |
for (i = 0; i < 16; i++) { |
for (i = 0; i < 16; i++) { |