simplify memory management
safely: initialize sigaction.sa_flags
gpg: fix possible out-of-bound write
gpg: fix empty password check
security: fix fd type
db: use a better file copy algorithm

Instead of the brain-dead "read whole file to memory" algorithm.
security: remove disabled ptrace check
security: remove disabled stdin/out/err check