Changeset - 4c61e238ef92
[Not reviewed]
default
0 2 0
ethanzonca - 16 years ago 2009-08-01 13:15:31

Minor fixes
2 files changed with 2 insertions and 3 deletions:
0 comments (0 inline, 0 general)
src/server/slave.c
Show inline comments
 
@@ -99,13 +99,12 @@ options_init(argc,argv,&my_cfg, myopts, 
 

	
 
/* If there's no key or username in the conf, or if they're at the default (!key/!username) let the user know! */
 
	if(username == NULL || strcmp(username, "!username") == 0 ){
 
	  fprintf(stderr, "\nYou didn't register!\nPlease register or edit your config. (see -h)\nIf this error persists, check distrenslave.conf to ensure all items are filled.\n");
 
	}
 
	else if( username != NULL || strcmp(username,"!username") != 0 ){
 
		fprintf(stderr, "Your username is %s\n",username);
 
		// Logs ya in:
 
		if(login_user(username) == 1){
 
			fprintf(stderr,"You should now be logged into distren.\n");
 
		}
 
		else{
 
			fprintf(stderr,"Login failed. I have no clue why. Goodbye.\n");
src/server/slavefuncs.c
Show inline comments
 
@@ -199,15 +199,15 @@ int login_user(char *username)
 
    return 43;
 

	
 
  strcpy(userhost, username);
 
  strcat(userhost, "@protofusion.org"); // Throws @protofusion.org after the username
 

	
 

	
 
  fprintf(stderr, "Logging you in to %s", userhost);
 
  fprintf(stderr, "Logging you in to %s\n", userhost);
 
  if(fopen(SYSCONFDIR "distren.id_rsa", "r") == NULL){
 
	  fprintf(stderr,"Your key 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!");
 
	  fprintf(stderr,"Your key has not been found! Re-register or somehow regenerate your key!\nWe need a way to regenerate keys coded in, but we don't have the facilities yet!");
 
	  return 0;
 
  }
 
  execio_open(&testrem, "ssh", execargv); // TODO: Grab returns from this someday
 
  buf[9] = '\0'; // null-terminating the array...
 
  while(!execio_read(testrem, buf, 9, &readlen))
 
    {
0 comments (0 inline, 0 general)