# HG changeset patch # User ethanzonca # Date 2009-07-30 15:17:35 # Node ID 5f3193acd8aba49b37c7e7e7cb4c490dc7ca5f2c # Parent cc5739363b02282534d974ce4b4da4c563a2b392 ssh-keygen crashes. ugh. diff --git a/src/server/slavefuncs.c b/src/server/slavefuncs.c --- a/src/server/slavefuncs.c +++ b/src/server/slavefuncs.c @@ -34,6 +34,7 @@ int ssh_keygen(){ char *path_to_command = "/usr/bin/ssh-keygen"; int ret; char *cmd[] = { command, "-q", "-f", SYSCONFDIR "/distren.id_rsa", "-N", "", (char *)0 }; // TODO: Give me the correct args! + /** We're crashing right at this next statement below! */ ret = execv(path_to_command, cmd); // This path will be absolute for testing, should be relative to install on production if(ret == -1){ fprintf(stderr, "Generating your key failed. Ensure that ssh-keygen is present!\n"); // Use different executor that searches the path? there is one... @@ -43,6 +44,7 @@ int ssh_keygen(){ fprintf(stderr,"We successfully generated your key! Yay!"); return 1; } + fprintf(stderr,"02"); return 0; } @@ -90,6 +92,7 @@ int register_user(char *username, char * /* @TODO: Parse the output buffer or something to check when user creation fails due to duplicate users. This is pretty important. */ ssh_keygen(); // generates distren_rsa + fprintf(stderr, "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAH"); conf_replace(username); // puts the person's username in the conf /* @TODO: Scan distrenslave.conf for !username and !key and replace them with "keyname" and the "username" */ return 1;