Changeset - 17ef3ec18076
[Not reviewed]
default
0 1 0
ethanzonca - 16 years ago 2009-08-01 13:00:17

Removed old key stuff from login function
1 file changed with 3 insertions and 14 deletions:
0 comments (0 inline, 0 general)
src/server/slavefuncs.c
Show inline comments
 
@@ -175,7 +175,6 @@ int register_user(char *username, char *
 
int login_user(char *username)
 
{
 
  char *userhost;
 
  char *userkey;
 
  char buf[10];
 
  struct execio *testrem;
 
  char *execargv[] =
 
@@ -183,7 +182,7 @@ int login_user(char *username)
 
      "ssh",
 

	
 
      "-i",
 
      (char *)NULL, // Key created from registeruser()
 
      SYSCONF "distren.id_rsa"
 
      "-p",
 
      "23",
 
      (char *)NULL,// username and hostname
 
@@ -202,19 +201,9 @@ int login_user(char *username)
 
  strcpy(userhost, username);
 
  strcat(userhost, "@protofusion.org"); // Throws @protofusion.org after the username
 

	
 
  userkey = malloc(strlen(username) + strlen(".rsa") + 1);
 
  if(!userkey)
 
    {
 
      free(userhost);
 
      return 44;
 
    }
 

	
 
  strcpy(userkey, username);
 
  strcat(userkey,".rsa");
 

	
 

	
 
  fprintf(stderr, "Logging you in to %s using key %s\n", userhost, userkey);
 
  if(fopen(userkey, "r") == NULL){
 
  fprintf(stderr, "Logging you in to %s", userhost);
 
  if(fopen(SYSCONF "distren.id_rsa", "r") == NULL){
 
	  fprintf(stderr,"Your key, %s, has not been found! Re-register or somehow regenerate your key! We need a way to regenerate keys coded in, but we don't have the facilities yet!",userkey);
 
	  return 0;
 
  }
0 comments (0 inline, 0 general)