CryptoManiac/novacoin — pull request #7 by cmonyoupick (2013-12-17 15:45:50+00:00)
Title: fixes scrypt-*.S for grsecurity-enabled kernels, noexecstack

scrypt-*.S are fixed to properly include GNU-stack note to work on grsecurity enabled kernels with TPE feature enabled and restricted for process owner.

application failure log:

EXCEPTION: St13runtime_error
CDB(): error opening database environment IO error: /mnt/ssd/novacoind/.novacoin/txleveldb/MANIFEST-000001: Permission denied
novacoin in AppInit()

terminate called after throwing an instance of 'std::runtime_error'
what(): CDB(): error opening database environment IO error: /mnt/ssd/novacoind/.novacoin/txleveldb/MANIFEST-000001: Permission denied
Aborted

strace:

open("/mnt/ssd/novacoind/.novacoin/txleveldb/MANIFEST-000001", O_RDWR|O_CREAT|O_TRUNC, 0644) = 11
ftruncate(11, 65536) = 0
mmap2(NULL, 65536, PROT_READ|PROT_WRITE, MAP_SHARED, 11, 0) = -1 EACCES (Permission denied)
close(11) = 0
unlink("/mnt/ssd/novacoind/.novacoin/txleveldb/MANIFEST-000001") = 0

dmesg:

[10904476.704052] grsec: From 192.168.1.4: denied untrusted exec of /mnt/ssd/novacoind/.novacoin/txleveldb/MANIFEST-000001 by /usr/bin/novacoind-git-20131217[nvc:26850] uid/euid:1007/1007 gid/egid:1007/1007, parent /bin/bash[sh:20796] uid/euid:1007/1007 gid/egid:1007/1007

src/leveldb/Makefile fixed for same TPE feature, running ./build_detect_platform directly is not allowed under TPE, use shell explicitly.