# HG changeset patch # User ethanzonca # Date 2009-07-30 16:15:29 # Node ID b8c48b48a032b8089735f3b9027ae33071e8b8fc # Parent 79cc67f57f6f8aa0501071f1f4099b0c64eeabd3 Generates key in conf directory. diff --git a/src/server/slavefuncs.c b/src/server/slavefuncs.c --- a/src/server/slavefuncs.c +++ b/src/server/slavefuncs.c @@ -29,12 +29,13 @@ #include /*< malloc(), free() */ int ssh_keygen(){ - // Interesting issue, if they try to register twice, it will be interactive. + // Interesting issue, if they try to register twice, it will be interactive, asking whether or not to overwrite the current one. + // distren.id_rsa and distren.id_rsa.pub are now generated in SYSCONFDIR (etc) fprintf(stderr, "We're generating your SSH key. Please be patient.\n"); char *command = "ssh-keygen"; // append .exe if win32? char *path_to_command = "/usr/bin/ssh-keygen"; int ret; - char *cmd[] = { command, "-f", "username.rsa", "-N", "", (char *)0 }; // TODO: Give me the correct args! + char *cmd[] = { command, "-f", SYSCONFDIR "/distren.id_rsa", "-N", "", (char *)0 }; // TODO: Give me the correct args! 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...