diff --git a/src/server/slavefuncs.c b/src/server/slavefuncs.c --- a/src/server/slavefuncs.c +++ b/src/server/slavefuncs.c @@ -174,18 +174,24 @@ int register_user(char *username, char * /** Logs the user into the server with a nice ssh session */ int login_user(char *username) { + char *userhost; + userhost = malloc(strlen(username) + strlen("@protofusion.org") + 1); + if(!userhost) + return 43; + strcpy(userhost, username); + strcat(userhost, "@protofusion.org"); // Throws @protofusion.org after the username + char buf[10]; struct execio *testrem; char *execargv[] = { "ssh", - + userhost,// username and hostname "-i", SYSCONFDIR "/distren.id_rsa", "-p", "23", - (char *)NULL,// username and hostname "echo", "hello", // This should eventually open a non-terminating connection to the server for communication, @@ -193,15 +199,6 @@ int login_user(char *username) }; size_t readlen; - /*< @TODO remove being tied to protofusion.org for no reason */ - userhost = malloc(strlen(username) + strlen("@protofusion.org") + 1); - if(!userhost) - return 43; - - strcpy(userhost, username); - strcat(userhost, "@protofusion.org"); // Throws @protofusion.org after the username - - fprintf(stderr, "Logging you in to %s\n", userhost); int status;