Changeset - 81246e11146e
[Not reviewed]
default
0 1 0
ethanzonca - 16 years ago 2009-07-30 15:43:48

Todo editing
1 file changed with 2 insertions and 3 deletions:
0 comments (0 inline, 0 general)
src/server/slavefuncs.c
Show inline comments
 
@@ -87,16 +87,15 @@ int register_user(char *username, char *
 
      fprintf(stderr, "read \"%s\"\n", buf);
 
    }
 
  execio_close(testrem);
 

	
 
  /* @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
 
  ssh_keygen(); // generates keys for login, @TODO: pub key must somehow be sent to the server.
 

	
 
  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;
 
}
 

	
 

	
 
int login_user(char *username)
 
{
 
@@ -155,13 +154,13 @@ int login_user(char *username)
 
    fprintf(stderr, "read \"%s\"\n", buf);
 
    }
 
  execio_close(testrem);
 
  return 1; // 1 can be like... error-free login...
 
}
 

	
 
/* Replaces username and key in the slave's conf file, currently pseudo */
 
/* Replaces username and key in the slave's conf file */
 

	
 
void conf_replace(char *username){
 
  /* Note: SYSCONFDIR doesn't include a trailing slash */
 
  int maxlinelen = 120;
 
  char *fileOrig = SYSCONFDIR "/distrenslave.conf";
 
  char *fileRepl = SYSCONFDIR "/distrenslave.conf.edited";
0 comments (0 inline, 0 general)