# HG changeset patch # User root # Date 1291428600 0 # Node ID 5be1ecb80cc9dcf6f4748941d6db35b733c44b72 # Parent 1e4ba8d8ffc2d0a59b1f3069907cd3f2b4bcfafe Fixed build script for debian systems without packaging tools, removed packet logging from nacltai diff -r 1e4ba8d8ffc2 -r 5be1ecb80cc9 build.sh --- a/build.sh Sat Dec 04 03:01:46 2010 +0100 +++ b/build.sh Sat Dec 04 02:10:00 2010 +0000 @@ -48,12 +48,14 @@ ##echo Building frontends... ##gcc -o out/quicktun.debian src/run.debian.c -ldl -if [ -x /usr/bin/dpkg-deb -a -x /usr/bin/fakeroot ]; then +if [ -f /etc/network/interfaces ]; then echo Building debian binary... gcc -c -DCOMBINED_BINARY -DDEBIAN_BINARY src/run.combined.c -o obj/run.debian.o gcc -o out/quicktun.debian obj/common.o obj/run.debian.o obj/proto.raw.o obj/proto.nacl0.o obj/proto.nacltai.o obj/crypto_scalarmult_curve25519.o -lnacl - echo -n Building debian package... - cd debian - ./build.sh - cd .. + if [ -x /usr/bin/dpkg-deb -a -x /usr/bin/fakeroot ]; then + echo -n Building debian package... + cd debian + ./build.sh + cd .. + fi fi diff -r 1e4ba8d8ffc2 -r 5be1ecb80cc9 src/proto.nacltai.c --- a/src/proto.nacltai.c Sat Dec 04 03:01:46 2010 +0100 +++ b/src/proto.nacltai.c Sat Dec 04 02:10:00 2010 +0000 @@ -119,7 +119,7 @@ extern crypto_scalarmult_curve25519_base(unsigned char *pk, unsigned char *sk); static int encode(struct qtsession* sess, char* raw, char* enc, int len) { - fprintf(stderr, "Encoding packet of %d bytes from %d to %d\n", len, raw, enc); +// fprintf(stderr, "Encoding packet of %d bytes from %d to %d\n", len, raw, enc); struct qt_proto_data_nacltai* d = (struct qt_proto_data_nacltai*)sess->protocol_data; memset(raw, 0, crypto_box_ZEROBYTES); taia_now(&d->cdtaic); @@ -127,12 +127,12 @@ if (crypto_box_afternm(enc, raw, len + crypto_box_ZEROBYTES, d->cenonce, d->cbefore)) return errorexit("Crypto failed"); memcpy((void*)(enc + crypto_box_BOXZEROBYTES - noncelength), d->cenonce + nonceoffset, noncelength); len += overhead; - fprintf(stderr, "Encoded packet of %d bytes from %d to %d\n", len, raw, enc); +// fprintf(stderr, "Encoded packet of %d bytes from %d to %d\n", len, raw, enc); return len; } static int decode(struct qtsession* sess, char* enc, char* raw, int len) { - fprintf(stderr, "Decoding packet of %d bytes from %d to %d\n", len, enc, raw); +// fprintf(stderr, "Decoding packet of %d bytes from %d to %d\n", len, enc, raw); struct qt_proto_data_nacltai* d = (struct qt_proto_data_nacltai*)sess->protocol_data; int i; if (len < overhead) { @@ -152,7 +152,7 @@ return 0; } d->cdtaip = d->cdtaic; - fprintf(stderr, "Decoded packet of %d bytes from %d to %d\n", len, enc, raw); +// fprintf(stderr, "Decoded packet of %d bytes from %d to %d\n", len, enc, raw); return len; }