coffin

secure lan file storage on a device
git clone git://parazyd.org/coffin.git
Log | Files | Refs | Submodules | README | LICENSE

commit 615218bf368c2e23978755e87c18807639b4a7d9
parent 657b0aa0f70688b5fc29c5f3139a2c3635c74326
Author: parazyd <parazyd@dyne.org>
Date:   Wed, 30 Mar 2016 03:06:43 +0200

doc update

Diffstat:
MREADME.md | 9+++------
Msrc/benchmark.c | 4++--
Msrc/gen_salt.c | 12++++++------
Msrc/hexencode.c | 2+-
4 files changed, 12 insertions(+), 15 deletions(-)

diff --git a/README.md b/README.md @@ -27,14 +27,11 @@ Run `make install` as root in order to install and configure your device. ## Notes -* The initscript is not yet finished, so you will have to start coffin manually, - by entering the `src/` directory and running (as root) `./mourner` ## Usage -After installation, you will end up with an initscript in -/etc/init.d/coffin -You can start coffin by issuing `/etc/init.d/coffin start` and the watch -script will begin to watch your /dev for new devices. +After installation, you will end up with an initscript in /etc/init.d/coffin +You can start coffin by issuing `/etc/init.d/coffin start` as root and the +watch script will begin to watch your /dev for new devices. ### Hooks Hooks are oneliners written on your USB key which will trigger actions diff --git a/src/benchmark.c b/src/benchmark.c @@ -45,14 +45,14 @@ int main(int argc, char *argv[]) microtime = bench(ic); - while( abs(desired_time-microtime) > (desired_time/10) /*little difference */ + while( abs(desired_time-microtime) > (desired_time/10) /*little difference */ && tries++ <= 5) { float ratio = (float)desired_time/microtime; if(ratio > 1000) ratio=1000.0; ic*=ratio; if(ic<1) ic=1; microtime = bench(ic); - } + } printf("%d\n", ic); return 0; diff --git a/src/gen_salt.c b/src/gen_salt.c @@ -2,13 +2,13 @@ #include <stdlib.h> #include <string.h> -void print_hex(unsigned char *buf, int len) -{ - int i; +void +print_hex(unsigned char *buf, int len) { + int i; - for(i=0;i<len;i++){ - printf("%02x", buf[i]); - } + for(i=0;i<len;i++){ + printf("%02x", buf[i]); + } } int main(int argc, char **argv) { diff --git a/src/hexencode.c b/src/hexencode.c @@ -41,7 +41,7 @@ int main(int argc, char *argv[]) { } else { while( (read_bytes=fread(buf, sizeof(char), 2, stdin)) != 0) { if(read_bytes == 1) buf[1]='\0'; - sscanf(buf, "%x", &c); + sscanf(buf, "%c", &c); printf("%c", c); } return 0;