Changeset - 32109b7e973a
[Not reviewed]
default
0 1 0
ethanzonca - 16 years ago 2009-07-25 16:27:58

Slavefuncts fixes, minor
1 file changed with 4 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/server/slavefuncs.c
Show inline comments
 
@@ -18,19 +18,21 @@
 
*/
 

	
 
 /*
 
  * Registration on server. Needs attention. Prevent account spamming.
 
  * distrenslave -c username email@example.com
 
 */
 
#include <stdio.h>
 

	
 
void registeruser(char *username, char *email){
 
  /*
 
   * Logs into sandboxed user on zserver2 and registers a user. Should eventually generate a key on the server and return it to the user.
 
   * All created user accounts should be sandboxed accordingly, requiring a different skel, and the default shell to be rbash. Also,
 
   * a custom path defined in the .bash_profile of the skel is needed.
 
  */
 
  char *keyurl; // Url to the key
 
  char *keyname; // Url to the key
 
  char buf[10];
 
  struct execio *testrem;
 
  char *execargv[] =
 
    {
 
  "ssh",
 
  "distren_setup@protofusion.org",
 
@@ -59,13 +61,13 @@ void registeruser(char *username, char *
 
      }
 
    buf[readlen] = '\0'; // Null-terminating the end of it again based on how large the data is?
 
    fprintf(stderr, "read \"%s\"\n", buf);
 
    }
 
  execio_close(testrem);
 

	
 
 exec('exec wget http://protofusion.org/distren/keys/%s',keyname); // Download the key
 
 exec('exec wget http://protofusion.org/distren/keys/%s',keyname); // Download the key with cURL!!!
 
 /* TODO: Scan distrenslave.conf for !username and !key and replace them with "keyname" and the "username" */
 

	
 
}
 

	
 

	
 
void loginuser(char *username){
0 comments (0 inline, 0 general)