It only starts with no sksconf present. Otherwise:
strace /usr/bin/sks help
execve("/usr/bin/sks", ["/usr/bin/sks", "help"], [/* 30 vars */]) = 0
brk(0) = 0xad6000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x7fbc43e97000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or
directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=57093, ...}) = 0
mmap(NULL, 57093, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fbc43e89000
close(3) = 0
open("/lib64/libz.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p!\0\0\0\0\0\0"...,
832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=90632, ...}) = 0
mmap(NULL, 2183688, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0x7fbc43a61000
mprotect(0x7fbc43a76000, 2093056, PROT_NONE) = 0
mmap(0x7fbc43c75000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x14000) = 0x7fbc43c75000
close(3) = 0
open("/lib64/libdb-5.3.so", O_RDONLY|O_CLOEXEC) = 3
read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0000\363\2\0\0\0\0\0"...,
832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1846280, ...}) = 0
mmap(NULL, 3923240, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0x7fbc436a3000
mprotect(0x7fbc43857000, 2097152, PROT_NONE) = 0
mmap(0x7fbc43a57000, 40960, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b4000) = 0x7fbc43a57000
close(3) = 0
open("/lib64/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3,
"\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\260T\0\0\0\0\0\0"...,
832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1141560, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x7fbc43e88000
mmap(NULL, 3150168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0x7fbc433a1000
mprotect(0x7fbc434a2000, 2093056, PROT_NONE) = 0
mmap(0x7fbc436a1000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x100000) = 0x7fbc436a1000
close(3) = 0
open("/lib64/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320\16\0\0\0\0\0\0"...,
832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=19520, ...}) = 0
mmap(NULL, 2109744, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0x7fbc4319d000
mprotect(0x7fbc431a0000, 2093056, PROT_NONE) = 0
mmap(0x7fbc4339f000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7fbc4339f000
close(3) = 0
open("/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0
\34\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=2112384, ...}) = 0
mmap(NULL, 3936832, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0x7fbc42ddb000
mprotect(0x7fbc42f92000, 2097152, PROT_NONE) = 0
mmap(0x7fbc43192000, 24576, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7fbc43192000
mmap(0x7fbc43198000, 16960, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fbc43198000
close(3) = 0
open("/lib64/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\240l\0\0\0\0\0\0"...,
832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=142304, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x7fbc43e87000
mmap(NULL, 2208864, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0x7fbc42bbf000
mprotect(0x7fbc42bd5000, 2097152, PROT_NONE) = 0
mmap(0x7fbc42dd5000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x16000) = 0x7fbc42dd5000
mmap(0x7fbc42dd7000, 13408, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fbc42dd7000
close(3) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x7fbc43e86000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x7fbc43e84000
arch_prctl(ARCH_SET_FS, 0x7fbc43e84740) = 0
mprotect(0x7fbc43192000, 16384, PROT_READ) = 0
mprotect(0x7fbc42dd5000, 4096, PROT_READ) = 0
mprotect(0x7fbc4339f000, 4096, PROT_READ) = 0
mprotect(0x7fbc436a1000, 4096, PROT_READ) = 0
mprotect(0x7fbc43a57000, 28672, PROT_READ) = 0
mprotect(0x7fbc43c75000, 4096, PROT_READ) = 0
mprotect(0x771000, 4096, PROT_READ) = 0
mprotect(0x7fbc43e98000, 4096, PROT_READ) = 0
munmap(0x7fbc43e89000, 57093) = 0
set_tid_address(0x7fbc43e84a10) = 10996
set_robust_list(0x7fbc43e84a20, 24) = 0
rt_sigaction(SIGRTMIN, {0x7fbc42bc5780, [], SA_RESTORER|SA_SIGINFO,
0x7fbc42bce100}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0x7fbc42bc5810, [],
SA_RESTORER|SA_RESTART|SA_SIGINFO, 0x7fbc42bce100}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY})
= 0
brk(0) = 0xad6000
brk(0xaf7000) = 0xaf7000
brk(0) = 0xaf7000
mmap(NULL, 2105344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0x7fbc429bd000
mmap(NULL, 1024000, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0x7fbc43d8a000
sigaltstack({ss_sp=0x80ca60, ss_flags=0, ss_size=8192}, NULL) = 0
rt_sigaction(SIGSEGV, {0x51f570, [],
SA_RESTORER|SA_STACK|SA_NODEFER|SA_SIGINFO, 0x7fbc42e10670}, NULL, 8)
= 0
readlink("/proc/self/exe", "/usr/bin/sks", 256) = 12
stat("/usr/bin/sks", {st_mode=S_IFREG|0755, st_size=2201760, ...}) = 0
lseek(0, 0, SEEK_CUR) = -1 ESPIPE (Illegal seek)
brk(0) = 0xaf7000
brk(0xb1f000) = 0xb1f000
lseek(1, 0, SEEK_CUR) = -1 ESPIPE (Illegal seek)
lseek(2, 0, SEEK_CUR) = -1 ESPIPE (Illegal seek)
open("/dev/random", O_RDONLY) = 3
uname({sys="Linux", node="mail.garbage-juice.com", ...}) = 0
uname({sys="Linux", node="mail.garbage-juice.com", ...}) = 0
stat("./sksconf", {st_mode=S_IFREG|0644, st_size=2557, ...}) = 0
open("./sksconf", O_RDONLY) = 4
fcntl(4, F_SETFD, FD_CLOEXEC) = 0
lseek(4, 0, SEEK_CUR) = 0
read(4, "#*******************************"..., 65536) = 2557
close(4) = 0
write(2, "Fatal error: exception Not_found"..., 33Fatal error:
exception Not_found
) = 33
exit_group(2) = ?
+++ exited with 2 +++
address@hidden sks]#
???
- Fabian S.
On June 13, 2016 8:41:07 PM EDT, Phil Pennock
<address@hidden> wrote:
On 2016-06-10 at 18:45 -0400, Fabian Santiago wrote:
You're right, it does work that way and I have it up now as such. I
was hung up I guess on why it doesn't work as advertised.
See attached strace. This is above my head.
This strace'd systemd but did not strace sks itself.
SKS by default loads the configuration file as `./sksconf`, so
whatever
the working directory of the `sks db` and `sks recon` processes is,
that's where the configuration file should be. The configuration file
is best, because otherwise you're looking at some intricate balancing
of
configuration for "recon" and "db" to make sure things work.
You can just run `strace sks help` to not do anything but show the
help
text, but after SKS has loaded its configuration. I use FreeBSD, so
am
using ktrace/kdump, but below is a highlight of what I see in the
output, after searching forward with my text viewer ("less") for the
name of the configuration file, "sksconf". This is how you find what
files a process was trying to access.
What you _probably_ want to do is use:
sks db -basedir /path/to/runtime/directory
and in your runtime directory have symlinks pointing to the real
configuration files somewhere under /etc/.
And hey, I just discovered that my `server_contact` field is
out-of-date, by reading my own trace output. :)
-Phil
-------------------------8< ktrace sks help
8--------------------------
32366 sks CALL stat(0x801dc9f40,0x7fffffffe8d8)
32366 sks NAMI "./sksconf"
32366 sks STRU struct stat {dev=293016077, ino=15, mode=0100644,
nlink=1, uid=0, gid=0, rdev=4294967295, atime=1399850869.655568857,
stime=1426291686.685482306, ctime=1426291686.685482306,
birthtime=1399850869.655568857, size=437, blksize=4096, blocks=9,
flags=0x800 }
32366 sks RET stat 0
32366 sks CALL open(0x801c170f0,0<O_RDONLY>,<unused>0)
32366 sks NAMI "./sksconf"
32366 sks RET open 4
32366 sks CALL fcntl(0x4,F_SETFD,FD_CLOEXEC)
32366 sks RET fcntl 0
32366 sks CALL lseek(0x4,0,SEEK_CUR)
32366 sks RET lseek 0
32366 sks CALL read(0x4,0x801f52050,0x10000)
32366 sks GIO fd 4 read 437 bytes
"basedir: /var/sks/
hostname: sks.spodhuis.org
nodename: sks.spodhuis.org
server_contact: 0x403043153903637F
from_addr: address@hidden
membership_reload_interval: 1
initial_stat:
recon_address: 94.142.242.225 2a02:898:31:0:48:4558:73:6b73
hkp_address: 127.0.0.3
pagesize: 16
ptree_pagesize: 8
# With BDB 5.x, pagesize to 128, ptree_pagesize to 16
#
# Cache size limit (in MB) can limit the damage of misbehaving peers
cache: 80
"
32366 sks RET read 437/0x1b5
-------------------------8< ktrace sks help
8--------------------------
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.