X-Git-Url: http://git.vrable.net/?a=blobdiff_plain;f=nfs3%2Fnfsd.c;h=8ba3ef04193d22129fb6799c0b049146f62a0c23;hb=d597213735df20ef18381970c46e71dd0679972a;hp=ab7b749595775905a9a50f543840319eaa085980;hpb=3ebe1efb5570c4a678774ebdf33b36be6dc49bbc;p=bluesky.git diff --git a/nfs3/nfsd.c b/nfs3/nfsd.c index ab7b749..8ba3ef0 100644 --- a/nfs3/nfsd.c +++ b/nfs3/nfsd.c @@ -25,15 +25,23 @@ void register_rpc(); BlueSkyFS *fs; +static uint8_t filesystem_key[16]; int main(int argc, char *argv[]) { - g_thread_init(NULL); + int i; + bluesky_init(); register_rpc(); - S3_initialize(NULL, S3_INIT_ALL); + bluesky_crypt_random_bytes(filesystem_key, sizeof(filesystem_key)); + printf("Filesystem key: "); + for (i = 0; i < sizeof(filesystem_key); i++) { + printf("%02x", filesystem_key[i]); + } + printf("\n"); fs = bluesky_new_fs("export"); + fs->encryption_key = filesystem_key; BlueSkyInode *root; root = bluesky_new_inode(BLUESKY_ROOT_INUM, fs, BLUESKY_DIRECTORY);