coffin

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

commit bc1262457bdb09a8736897b14521e83aa920e3cf
parent 98b7e05f1be532853986cb2c8822d85228e07b1e
Author: parazyd <parazyd@dyne.org>
Date:   Mon, 16 May 2016 21:21:20 +0200

makefile fixes

Diffstat:
Msrc/Makefile | 19++++++-------------
Msrc/extra/conf.sh | 7+++----
2 files changed, 9 insertions(+), 17 deletions(-)

diff --git a/src/Makefile b/src/Makefile @@ -1,10 +1,11 @@ PREFIX = /usr/local/coffin/bin +CFLAGS = -O2 all: - $(CC) -O2 -o tomb-kdb-pbkdf2 pbkdf2.c -lgcrypt - $(CC) -O2 -o tomb-kdb-pbkdf2-getiter benchmark.c -lgcrypt - $(CC) -O2 -o tomb-kdb-pbkdf2-gensalt gen_salt.c -lgcrypt - $(CC) -O2 -o tomb-kdb-hexencode hexencode.c + $(CC) $(CFLAGS) -o tomb-kdb-pbkdf2 pbkdf2.c -lgcrypt + $(CC) $(CFLAGS) -o tomb-kdb-pbkdf2-getiter benchmark.c -lgcrypt + $(CC) $(CFLAGS) -o tomb-kdb-pbkdf2-gensalt gen_salt.c -lgcrypt + $(CC) $(CFLAGS) -o tomb-kdb-hexencode hexencode.c make -C extra clean: @@ -30,19 +31,14 @@ install: install -Dm755 tomb-kdb-pbkdf2-gensalt ${PREFIX}/tomb-kdb-pbkdf2-gensalt install -Dm755 tomb-kdb-hexencode ${PREFIX}/tomb-kdb-hexencode install -Dm770 -g coffin -d /home/graveyard - # init install -Dm755 extra/coffin.init /etc/init.d/coffin - # apache install -Dm775 -g www-data -d /etc/apache2/DAV install -Dm600 extra/davpasswd /etc/apache2/DAV/davpasswd install -Dm640 extra/apachedav /etc/apache2/sites-available/coffindav.conf - # ssl install -Dm700 -d /etc/ssl/coffin - install -Dm440 extra/coffin.pem /etc/ssl/coffin/coffin.pem + install -Dm400 extra/coffin.pem /etc/ssl/coffin/coffin.pem install -Dm400 extra/coffin.key /etc/ssl/coffin/coffin.key - # extras make -C extra install - # fin @echo "To enable WebDAV, run: 'a2ensite coffindav.conf' as root." uninstall: @@ -61,12 +57,9 @@ uninstall: rm -f ${PREFIX}/tomb-kdb-pbkdf2-getiter rm -f ${PREFIX}/tomb-kdb-pbkdf2-gensalt rm -f ${PREFIX}/tomb-kdb-hexencode - # init rm -f /etc/init.d/coffin - # apache rm -rf /etc/apache2/DAV rm -f /etc/apache2/sites-available/coffindav.conf rm -f /etc/apache2/sites-enabled/coffindav.conf - # ssl rm -rf /etc/ssl/coffin @echo "To disable WebDAV, run: 'a2dissite coffindav.conf' as root." diff --git a/src/extra/conf.sh b/src/extra/conf.sh @@ -30,13 +30,12 @@ apachemods() { a2dismod $i done fi - return 0 } edit-sudoers() { if [[ $1 == "add" ]]; then print "%coffin `hostname`=(ALL) NOPASSWD: ALL" | (EDITOR="tee -a" visudo) - [[ $? = 0 ]] && print "Added coffin group to sudoers" + [[ $? = 0 ]] && print "####################\nAdded coffin group to sudoers" elif [[ $1 == "del" ]]; then tmp=`sed '/^%coffin / d' /etc/sudoers` print $tmp | (EDITOR="tee" visudo) @@ -47,8 +46,7 @@ edit-sudoers() { # because all cool software has snowmen in them: ☃ [[ $1 == "snowman" ]] && { [[ `grep 'coffin' /etc/group` ]] || groupadd coffin - gpasswd -a www-data coffin && \ - print "Added www-data to coffin group!" + gpasswd -a www-data coffin [[ `grep '^DAVLockDB ' /etc/apache2/apache2.conf` ]] || { cat << EOF >> /etc/apache2/apache2.conf @@ -63,6 +61,7 @@ EOF edit-sudoers add apachemods on + return 0 } [[ $1 == "unsnowman" ]] && {