# HG changeset patch # User ethanzonca # Date 2009-08-01 13:00:17 # Node ID 17ef3ec180763edfda6591487ee1190e10dc5663 # Parent 4293a28d079ea40f087b8048e38015b2cd906150 Removed old key stuff from login function diff --git a/src/server/slavefuncs.c b/src/server/slavefuncs.c --- a/src/server/slavefuncs.c +++ b/src/server/slavefuncs.c @@ -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; }