Changeset - 0ca0ea57f7a2
[Not reviewed]
default
0 1 0
ethanzonca - 16 years ago 2009-07-31 19:34:16

inverted file existance checker :D
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/server/slavefuncs.c
Show inline comments
 
@@ -30,25 +30,25 @@
 
#include <stdlib.h> /*< malloc(), free() */
 
#include <sys/stat.h>
 
#include <fcntl.h>
 

	
 
/** Generates a SSH key with ssh-keygen */
 
int ssh_keygen(){
 
	// distren.id_rsa and distren.id_rsa.pub are now generated in SYSCONFDIR (etc)
 

	
 
	// Checks to see if the keys are already present.
 
	int status;
 
	struct stat buffer;
 
	status = stat(SYSCONFDIR "/distren.id_rsa", &buffer);
 
	if(status == -1){
 
	if(status != -1){
 
		fprintf(stderr, "Please delete etc/distren.id_rsa and etc/distren.id_rsa.pub to register.");
 
	}
 

	
 
/* start execio code */
 
	char *command = "ssh-keygen"; // @TODO: append .exe if win32?
 
	int ret;
 
	char *cmd[] = { command, "-q", "-f", SYSCONFDIR "/distren.id_rsa", "-N", "", (char *)NULL }; // TODO: Give me the correct args!
 

	
 
	char buf[10];
 
	struct execio *testrem;
 
	size_t readlen;
 
	ret = execio_open(&testrem, command, cmd); // This path will be absolute for testing, should be relative to install on production
0 comments (0 inline, 0 general)