Changeset - c8caf99f43b5
[Not reviewed]
default
0 1 0
ethanzonca - 16 years ago 2009-10-10 17:45:08

Added keygrab for registration
1 file changed with 3 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/server/slavefuncs.c
Show inline comments
 
@@ -260,12 +260,14 @@ return 0;
 
/** Registers the user on the DistRen server */
 
int register_user(char *username, char *email)
 
{
 

	
 
/* Note: this code moved here from after the useradd code, so useradd doesn't happen if there is an existing key, etc */
 

	
 
  curlget("http://protofusion.org/distren/keys/setup_rsa", SYSCONFDIR "/setup_rsa"); // Grabs key to use for setup login
 

	
 
  /* puts the person's username in the conf */
 
  if(conf_replace(username) == 0){
 
    fprintf(stderr, "Failed!\n");
 
    return 0;
 
  }
 

	
 
@@ -284,13 +286,13 @@ int register_user(char *username, char *
 
  struct execio *testrem;
 
  char *execargv[] =
 
    {
 
      "ssh",
 
      "distren_setup@protofusion.org",
 
      "-i",
 
      SYSCONFDIR "/setup_rsa", // @TODO: How will we distribute this key?
 
      SYSCONFDIR "/setup_rsa",
 
      "-p",
 
      "23",
 
      "newuser",
 
      "-M",
 
      "-c",
 
      email,
0 comments (0 inline, 0 general)