Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#574 closed Bug / Defect (fixed)

--daemon option fails on 2.3.7

Reported by: breakfastfish Owned by:
Priority: major Milestone: release 2.3.8
Component: Generic / unclassified Version: OpenVPN 2.3.7 (Community Ed)
Severity: Not set (select this one, unless your'e a OpenVPN developer) Keywords:
Cc: Steffan Karger

Description

When trying to start openvpn (version 2.3.7 or git) with the --daemon option the process fails. The following syslog information is generated. Unfortunately, no extra debug information is created or reported with --verb options set.

Jul 7 10:48:31 rumpuscat openvpn[3548]: OpenVPN 2.3.7 x86_64-slackware-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [MH] [IPv6] built on Jul 7 2015
Jul 7 10:48:31 rumpuscat openvpn[3548]: library versions: OpenSSL 1.0.1o 12 Jun 2015, LZO 2.03
Jul 7 10:48:31 rumpuscat openvpn[3549]: Exiting due to fatal error

command line invocation was:
/usr/sbin/openvpn --cd /etc/openvpn --config /etc/openvpn/client.conf --writepid /var/run/openvpn/client.pid --auth-nocache --daemon

This works for 2.3.6.

Thank you in advance,

Fred

Attachments (2)

passwd_daemon-fail-2.3.7.patch (1.6 KB) - added by breakfastfish 4 years ago.
patch file
init.c (94.4 KB) - added by breakfastfish 4 years ago.

Download all attachments as: .zip

Change History (21)

comment:1 Changed 4 years ago by Gert Döring

Cc: Steffan Karger added
Milestone: release 2.3.7release 2.3.8
Version: git master branch2.3.7

Mmmh. I find this hard to reproduce. I call release/2.3 built (or git master) OpenVPN like this:

sudo src/openvpn/openvpn --cd /tmp --config pwd/../ov-test.ovpn --writepid /tmp/x.pid --auth-nocache --daemon

"and it just works". This is on Gentoo/i386, so should be somewhat comparable.

Can you run "strace -f /usr/sbin/openvpn ..." and look at the last 50-odd lines whether it's trying something that fails (... and which is not properly caught and logged)? The order of things changed quite a bit between 2.3.6 and 2.3.7 regarding --cd and --daemon, so maybe it's exposing a permission problem now that just did not manifest in 2.3.6

comment:2 Changed 4 years ago by breakfastfish

Hi,

I tried the strace command on the 2.3.7 binary. I'm using a locally installed binary as I need the 2.3.6 for production work. Here is the output:

strace -f /tmp/build/package-openvpn/usr/sbin/openvpn --daemon --writepid /var/run/openvpn/ --config /etc/openvpn/client.conf --cd /etc/openvpn
execve("/tmp/build/package-openvpn/usr/sbin/openvpn", ["/tmp/build/package-openvpn/usr/s"..., "--daemon", "--writepid", "/var/run/openvpn/", "--config", "/etc/openvpn/client.conf", "--cd", "/etc/openvpn"], 57 vars */) = 0
brk(0) = 0x180d000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f8828f6e000
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=301279, ...}) = 0
mmap(NULL, 301279, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f8828f24000
close(3) = 0
open("/lib64/libnsl.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\0\20A\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=115871, ...}) = 0
mmap(NULL, 2202328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f8828b32000
mprotect(0x7f8828b49000, 2093056, PROT_NONE) = 0
mmap(0x7f8828d48000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x16000) = 0x7f8828d48000
mmap(0x7f8828d4a000, 6872, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f8828d4a000
close(3) = 0
open("/lib64/libresolv.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@:\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=110237, ...}) = 0
mmap(NULL, 2202264, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f8828918000
mprotect(0x7f882892f000, 2093056, PROT_NONE) = 0
mmap(0x7f8828b2e000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x16000) = 0x7f8828b2e000
mmap(0x7f8828b30000, 6808, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f8828b30000
close(3) = 0
open("/usr/lib64/liblzo2.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@$\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=143216, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f8828f23000
mmap(NULL, 2227624, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f88286f8000
mprotect(0x7f8828718000, 2093056, PROT_NONE) = 0
mmap(0x7f8828917000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1f000) = 0x7f8828917000
close(3) = 0
open("/lib64/libssl.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\0\340t\1\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0555, st_size=447184, ...}) = 0
mmap(NULL, 2542704, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f882848b000
mprotect(0x7f88284ef000, 2093056, PROT_NONE) = 0
mmap(0x7f88286ee000, 40960, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x63000) = 0x7f88286ee000
close(3) = 0
open("/lib64/libcrypto.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\0\200\27\6\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0555, st_size=1945704, ...}) = 0
mmap(NULL, 4056376, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f88280ac000
mprotect(0x7f8828262000, 2097152, PROT_NONE) = 0
mmap(0x7f8828462000, 151552, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b6000) = 0x7f8828462000
mmap(0x7f8828487000, 13624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f8828487000
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\200\16\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=18988, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f8828f22000
mmap(NULL, 2109744, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f8827ea8000
mprotect(0x7f8827eab000, 2093056, PROT_NONE) = 0
mmap(0x7f88280aa000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7f88280aa000
close(3) = 0
open("/lib64/libc.so.6", 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\20\36\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=2102965, ...}) = 0
mmap(NULL, 3969600, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f8827ade000
mprotect(0x7f8827c9d000, 2097152, PROT_NONE) = 0
mmap(0x7f8827e9d000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1bf000) = 0x7f8827e9d000
mmap(0x7f8827ea3000, 16960, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f8827ea3000
close(3) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f8828f21000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f8828f1f000
arch_prctl(ARCH_SET_FS, 0x7f8828f1f740) = 0
mprotect(0x7f8827e9d000, 16384, PROT_READ) = 0
mprotect(0x7f88280aa000, 4096, PROT_READ) = 0
mprotect(0x7f8828b2e000, 4096, PROT_READ) = 0
mprotect(0x7f8828d48000, 4096, PROT_READ) = 0
mprotect(0x7f8828f6f000, 4096, PROT_READ) = 0
munmap(0x7f8828f24000, 301279) = 0
gettimeofday({1436367449, 568142}, NULL) = 0
brk(0) = 0x180d000
brk(0x182e000) = 0x182e000
rt_sigaction(SIGINT, {0x452b00, [INT], SA_RESTORER|SA_RESTART, 0x7f8827b149f0}, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGTERM, {0x452b00, [TERM], SA_RESTORER|SA_RESTART, 0x7f8827b149f0}, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGHUP, {SIG_IGN, [HUP], SA_RESTORER|SA_RESTART, 0x7f8827b149f0}, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGUSR1, {SIG_IGN, [USR1], SA_RESTORER|SA_RESTART, 0x7f8827b149f0}, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGUSR2, {SIG_IGN, [USR2], SA_RESTORER|SA_RESTART, 0x7f8827b149f0}, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGPIPE, {SIG_IGN, [PIPE], SA_RESTORER|SA_RESTART, 0x7f8827b149f0}, {SIG_DFL, [], 0}, 8) = 0
open("/etc/openvpn/client.conf", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=3606, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f8828f6d000
read(3, "################################"..., 4096) = 3606
read(3, "", 4096) = 0
close(3) = 0
munmap(0x7f8828f6d000, 4096) = 0
chdir("/etc/openvpn") = 0
access("certs/RFSC-ca.crt", R_OK) = 0
access("certs/RFSC-client.crt", R_OK) = 0
access("keys/RFSC-client.key", R_OK) = 0
access("/var/run", R_OK|W_OK|X_OK) = 0
access("/var/run/openvpn/", F_OK) = 0
access("/var/run/openvpn/", W_OK) = 0
access("/tmp", R_OK|W_OK|X_OK) = 0
brk(0x1850000) = 0x1850000
open("/etc/localtime", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=3585, ...}) = 0
fstat(3, {st_mode=S_IFREG|0644, st_size=3585, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f8828f6d000
read(3, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\7\0\0\0\7\0\0\0\0"..., 4096) = 3585
lseek(3, -2281, SEEK_CUR) = 1304
read(3, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\7\0\0\0\7\0\0\0\0"..., 4096) = 2281
close(3) = 0
munmap(0x7f8828f6d000, 4096) = 0
getpid() = 23792
socket(PF_LOCAL, SOCK_DGRAM|SOCK_CLOEXEC, 0) = 3
connect(3, {sa_family=AF_LOCAL, sun_path="/dev/log"}, 110) = 0
sendto(3, "<29>Jul 8 09:57:29 openvpn[2379"..., 139, MSG_NOSIGNAL, NULL, 0) = 139
sendto(3, "<29>Jul 8 09:57:29 openvpn[2379"..., 90, MSG_NOSIGNAL, NULL, 0) = 90
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f8828f1fa10) = 23793
exit_group(0) = ?
+++ exited with 0 +++

If I run this binary without the --daemon command it works just like 2.3.6. Here is a partial output of the 2.3.7 binary without the --daemon option using strace:

stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3585, ...}) = 0
write(1, "Wed Jul 8 10:01:57 2015 library"..., 80Wed Jul 8 10:01:57 2015 library versions: OpenSSL 1.0.1o 12 Jun 2015, LZO 2.03
) = 80
getpid() = 23852
rt_sigaction(SIGINT, {0x452b00, [INT], SA_RESTORER|SA_RESTART, 0x7fd82e4d59f0}, {0x452b00, [INT], SA_RESTORER|SA_RESTART, 0x7fd82e4d59f0}, 8) = 0
rt_sigaction(SIGTERM, {0x452b00, [TERM], SA_RESTORER|SA_RESTART, 0x7fd82e4d59f0}, {0x452b00, [TERM], SA_RESTORER|SA_RESTART, 0x7fd82e4d59f0}, 8) = 0
rt_sigaction(SIGHUP, {SIG_IGN, [HUP], SA_RESTORER|SA_RESTART, 0x7fd82e4d59f0}, {SIG_IGN, [HUP], SA_RESTORER|SA_RESTART, 0x7fd82e4d59f0}, 8) = 0
rt_sigaction(SIGUSR1, {SIG_IGN, [USR1], SA_RESTORER|SA_RESTART, 0x7fd82e4d59f0}, {SIG_IGN, [USR1], SA_RESTORER|SA_RESTART, 0x7fd82e4d59f0}, 8) = 0
rt_sigaction(SIGUSR2, {SIG_IGN, [USR2], SA_RESTORER|SA_RESTART, 0x7fd82e4d59f0}, {SIG_IGN, [USR2], SA_RESTORER|SA_RESTART, 0x7fd82e4d59f0}, 8) = 0
rt_sigaction(SIGPIPE, {SIG_IGN, [PIPE], SA_RESTORER|SA_RESTART, 0x7fd82e4d59f0}, {SIG_IGN, [PIPE], SA_RESTORER|SA_RESTART, 0x7fd82e4d59f0}, 8) = 0
open("/dev/urandom", O_RDONLY|O_NOCTTY|O_NONBLOCK) = 3
fstat(3, {st_mode=S_IFCHR|0666, st_rdev=makedev(1, 9), ...}) = 0
poll([{fd=3, events=POLLIN}], 1, 10) = 1 ([{fd=3, revents=POLLIN}])
read(3, "\225\2149\327\212\330\225A\252\324M\357\376\302\3716\32\237\356\361O\v\352\334et&\323\tYtc", 32) = 32
close(3) = 0
getuid() = 0
open("certs/RFSC-client.crt", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=4923, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fd82f92d000
read(3, "Certificate:\n Data:\n V"..., 4096) = 4096
read(3, "2lIHoT/aaKlxlKmdP3YhzF4L\ne3tM4AV"..., 4096) = 827
read(3, "", 4096) = 0
close(3) = 0
munmap(0x7fd82f92d000, 4096) = 0
open("keys/RFSC-client.key", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0600, st_size=1743, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fd82f92d000
read(3, "-----BEGIN RSA PRIVATE KEY-----\n"..., 4096) = 1743
open("/dev/tty", O_RDWR|O_CREAT|O_TRUNC|O_CLOEXEC, 0666) = 5
ioctl(5, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(5, SNDCTL_TMR_CONTINUE or SNDRV_TIMER_IOCTL_GPARAMS or TCSETSF, {B38400 opost -isig icanon -echo ...}) = 0
fstat(5, {st_mode=S_IFCHR|0666, st_rdev=makedev(5, 0), ...}) = 0
ioctl(5, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B38400 opost -isig icanon -echo ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fd82f92c000

Hope this helps.

I also re-built 2.3.6 just to make sure that nothing was awry with things on this machine. It worked as the "factory" 2.3.6 version does.

Cheers,

Fred

comment:3 Changed 4 years ago by breakfastfish

Just remembered that my key file on the client side has a password. This is where things fail when using the --daemon option. I tried a password file and the --askpass option and it still fails.

Cheers,

Fred

comment:4 in reply to:  3 Changed 4 years ago by Gert Döring

Replying to breakfastfish:

Just remembered that my key file on the client side has a password. This is where things fail when using the --daemon option. I tried a password file and the --askpass option and it still fails.

Funny enough, we just received another bug report that pointed to a user/password issue with --daemon today... #576.

This totally makes sense, but I'm not exactly sure how to fix it.

(Thanks, btw, for the strace output - funny enough, it is not following openvpn into the client process created by clone(), so the actual *error* isn't visible. Normally, "-f" should do that, no idea why it does not. But with the "there is a password on the key" info we know where to look)

comment:5 Changed 4 years ago by breakfastfish

Thank you for the reply. I took a look at #576 as you had mentioned it. The description follows what I have been experiencing quite well. The issuer has a better grasp of code details than I do so they were able to report a bit more comprehensively than I can. Many thanks.

Cheers,

Fred

comment:6 Changed 4 years ago by Steffan Karger

I could indeed reproduce the issue with daemon + passphrase-protected cert. I jsut sent the patch that resolves the issue for me to the list:
http://thread.gmane.org/gmane.network.openvpn.devel/9901

If you are in the opportunity to test, I would appreciate to hear if this resolves the issue for you too.

comment:7 Changed 4 years ago by breakfastfish

I tried the patch against 2.3.7 and 2.3_git with the same results as before. Strace output seems to be about the same.

# strace -f /tmp/build/package-openvpn/usr/sbin/openvpn --writepid /var/run/openvpn/client.pid --config /etc/openvpn/client.conf --cd /etc/openvpn --daemon

execve("/tmp/build/package-openvpn/usr/sbin/openvpn", ["/tmp/build/package-openvpn/usr/s"..., "--writepid", "/var/run/openvpn/client.pid", "--config", "/etc/openvpn/client.conf", "--cd", "/etc/openvpn", "--daemon"], 55 vars */) = 0
brk(0) = 0x1a5b000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f9b48314000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/usr/lib64/../lib64/tls/x86_64/libnsl.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/../lib64/tls/x86_64", 0x7ffd7c5f5730) = -1 ENOENT (No such file or directory)
open("/usr/lib64/../lib64/tls/libnsl.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/../lib64/tls", 0x7ffd7c5f5730) = -1 ENOENT (No such file or directory)
open("/usr/lib64/../lib64/x86_64/libnsl.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/../lib64/x86_64", 0x7ffd7c5f5730) = -1 ENOENT (No such file or directory)
open("/usr/lib64/../lib64/libnsl.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/../lib64", {st_mode=S_IFDIR|0755, st_size=221184, ...}) = 0
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=301279, ...}) = 0
mmap(NULL, 301279, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f9b482ca000
close(3) = 0
open("/lib64/libnsl.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\0\20A\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=115871, ...}) = 0
mmap(NULL, 2202328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f9b47ed8000
mprotect(0x7f9b47eef000, 2093056, PROT_NONE) = 0
mmap(0x7f9b480ee000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x16000) = 0x7f9b480ee000
mmap(0x7f9b480f0000, 6872, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f9b480f0000
close(3) = 0
open("/usr/lib64/../lib64/libresolv.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib64/libresolv.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@:\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=110237, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f9b482c9000
mmap(NULL, 2202264, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f9b47cbe000
mprotect(0x7f9b47cd5000, 2093056, PROT_NONE) = 0
mmap(0x7f9b47ed4000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x16000) = 0x7f9b47ed4000
mmap(0x7f9b47ed6000, 6808, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f9b47ed6000
close(3) = 0
open("/usr/lib64/../lib64/liblzo2.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@$\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=143216, ...}) = 0
mmap(NULL, 2227624, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f9b47a9e000
mprotect(0x7f9b47abe000, 2093056, PROT_NONE) = 0
mmap(0x7f9b47cbd000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1f000) = 0x7f9b47cbd000
close(3) = 0
open("/usr/lib64/../lib64/libsnappy.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\0\320$\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=33096, ...}) = 0
mmap(NULL, 2128296, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f9b47896000
mprotect(0x7f9b4789e000, 2093056, PROT_NONE) = 0
mmap(0x7f9b47a9d000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x7000) = 0x7f9b47a9d000
close(3) = 0
open("/usr/lib64/../lib64/libstdc++.so.6", 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 \246\5\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=970768, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f9b482c8000
mmap(NULL, 3150880, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f9b47594000
mprotect(0x7f9b47678000, 2093056, PROT_NONE) = 0
mmap(0x7f9b47877000, 40960, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xe3000) = 0x7f9b47877000
mmap(0x7f9b47881000, 82976, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f9b47881000
close(3) = 0
open("/usr/lib64/../lib64/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib64/libm.so.6", 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\260T\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1125896, ...}) = 0
mmap(NULL, 3150184, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f9b47292000
mprotect(0x7f9b47392000, 2097152, PROT_NONE) = 0
mmap(0x7f9b47592000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x100000) = 0x7f9b47592000
close(3) = 0
open("/usr/lib64/../lib64/libssl.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\0\340t\1\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0555, st_size=447184, ...}) = 0
mmap(NULL, 2542704, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f9b47025000
mprotect(0x7f9b47089000, 2093056, PROT_NONE) = 0
mmap(0x7f9b47288000, 40960, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x63000) = 0x7f9b47288000
close(3) = 0
open("/usr/lib64/../lib64/libcrypto.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\0\200\27\6\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0555, st_size=1945704, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f9b482c7000
mmap(NULL, 4056376, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f9b46c46000
mprotect(0x7f9b46dfc000, 2097152, PROT_NONE) = 0
mmap(0x7f9b46ffc000, 151552, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b6000) = 0x7f9b46ffc000
mmap(0x7f9b47021000, 13624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f9b47021000
close(3) = 0
open("/usr/lib64/../lib64/libdl.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
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\200\16\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=18988, ...}) = 0
mmap(NULL, 2109744, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f9b46a42000
mprotect(0x7f9b46a45000, 2093056, PROT_NONE) = 0
mmap(0x7f9b46c44000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7f9b46c44000
close(3) = 0
open("/usr/lib64/../lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib64/libc.so.6", 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\20\36\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=2102965, ...}) = 0
mmap(NULL, 3969600, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f9b46678000
mprotect(0x7f9b46837000, 2097152, PROT_NONE) = 0
mmap(0x7f9b46a37000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1bf000) = 0x7f9b46a37000
mmap(0x7f9b46a3d000, 16960, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f9b46a3d000
close(3) = 0
open("/usr/lib64/../lib64/libgcc_s.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\0\0*\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=88840, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f9b482c6000
mmap(NULL, 2184736, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f9b46462000
mprotect(0x7f9b46477000, 2097152, PROT_NONE) = 0
mmap(0x7f9b46677000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x15000) = 0x7f9b46677000
close(3) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f9b482c5000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f9b482c3000
arch_prctl(ARCH_SET_FS, 0x7f9b482c3740) = 0
mprotect(0x7f9b46a37000, 16384, PROT_READ) = 0
mprotect(0x7f9b46c44000, 4096, PROT_READ) = 0
mprotect(0x7f9b47592000, 4096, PROT_READ) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f9b482c2000
mprotect(0x7f9b47877000, 32768, PROT_READ) = 0
mprotect(0x7f9b47ed4000, 4096, PROT_READ) = 0
mprotect(0x7f9b480ee000, 4096, PROT_READ) = 0
mprotect(0x7f9b48315000, 4096, PROT_READ) = 0
munmap(0x7f9b482ca000, 301279) = 0
gettimeofday({1436487775, 569989}, NULL) = 0
brk(0) = 0x1a5b000
brk(0x1a7c000) = 0x1a7c000
rt_sigaction(SIGINT, {0x4579d0, [INT], SA_RESTORER|SA_RESTART, 0x7f9b466ae9f0}, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGTERM, {0x4579d0, [TERM], SA_RESTORER|SA_RESTART, 0x7f9b466ae9f0}, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGHUP, {SIG_IGN, [HUP], SA_RESTORER|SA_RESTART, 0x7f9b466ae9f0}, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGUSR1, {SIG_IGN, [USR1], SA_RESTORER|SA_RESTART, 0x7f9b466ae9f0}, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGUSR2, {SIG_IGN, [USR2], SA_RESTORER|SA_RESTART, 0x7f9b466ae9f0}, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGPIPE, {SIG_IGN, [PIPE], SA_RESTORER|SA_RESTART, 0x7f9b466ae9f0}, {SIG_DFL, [], 0}, 8) = 0
open("/etc/openvpn/client.conf", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=3606, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f9b48313000
read(3, "################################"..., 4096) = 3606
read(3, "", 4096) = 0
close(3) = 0
munmap(0x7f9b48313000, 4096) = 0
chdir("/etc/openvpn") = 0
access("certs/RFSC-ca.crt", R_OK) = 0
access("certs/RFSC-client.crt", R_OK) = 0
access("keys/RFSC-client.key", R_OK) = 0
access("/var/run/openvpn", R_OK|W_OK|X_OK) = 0
access("/var/run/openvpn/client.pid", F_OK) = 0
access("/var/run/openvpn/client.pid", W_OK) = 0
access("/tmp", R_OK|W_OK|X_OK) = 0
brk(0x1a9e000) = 0x1a9e000
open("/etc/localtime", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=3585, ...}) = 0
fstat(3, {st_mode=S_IFREG|0644, st_size=3585, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f9b48313000
read(3, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\7\0\0\0\7\0\0\0\0"..., 4096) = 3585
lseek(3, -2281, SEEK_CUR) = 1304
read(3, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\7\0\0\0\7\0\0\0\0"..., 4096) = 2281
close(3) = 0
munmap(0x7f9b48313000, 4096) = 0
getpid() = 18979
socket(PF_LOCAL, SOCK_DGRAM|SOCK_CLOEXEC, 0) = 3
connect(3, {sa_family=AF_LOCAL, sun_path="/dev/log"}, 110) = 0
sendto(3, "<29>Jul 9 19:22:55 openvpn[1897"..., 156, MSG_NOSIGNAL, NULL, 0) = 156
sendto(3, "<29>Jul 9 19:22:55 openvpn[1897"..., 90, MSG_NOSIGNAL, NULL, 0) = 90
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f9b482c3a10) = 18980
exit_group(0) = ?
+++ exited with 0 +++

/var/log/messages:

Jul 9 19:22:55 rumpuscat openvpn[18979]: OpenVPN 2.3_git x86_64-slackware-linux-gnu [SSL (OpenSSL)] [LZO] [SNAPPY] [LZ4] [EPOLL] [MH] [IPv6] built on Jul 9 2015
Jul 9 19:22:55 rumpuscat openvpn[18979]: library versions: OpenSSL 1.0.1o 12 Jun 2015, LZO 2.03
Jul 9 19:22:55 rumpuscat openvpn[18980]: Exiting due to fatal error

Not sure what to do next but I will think about it some.

Thank you again.

Cheers,

Fred

comment:8 Changed 4 years ago by Steffan Karger

Oh, sorry, I forgot to mention that with the new patch you should also add the --askpass option to make it work.

comment:9 Changed 4 years ago by Gert Döring

syzzer: so what we definitely need (additionally) is a proper error message if --daemon is used without --askpass and a pass phrase is required... :-) - but thanks so far. Nice that we have so many handy options.

comment:10 Changed 4 years ago by breakfastfish

Hi again,

I tried the --askpass option previously with the same results as without. It still fails with the same messages in /var/log/messages. Here are my results:

# strace -f /tmp/build/package-openvpn/usr/sbin/openvpn --writepid /var/run/openvpn/client.pid --config /etc/openvpn/client.conf --cd /etc/openvpn --askpass /tmp/build/package-openvpn/usr/sbin/passwd --daemon
execve("/tmp/build/package-openvpn/usr/sbin/openvpn", ["/tmp/build/package-openvpn/usr/s"..., "--writepid", "/var/run/openvpn/client.pid", "--config", "/etc/openvpn/client.conf", "--cd", "/etc/openvpn", "--askpass", "/tmp/build/package-openvpn/usr/s"..., "--daemon"], 54 vars */) = 0
brk(0) = 0x2173000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ff967088000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/usr/lib64/../lib64/tls/x86_64/libnsl.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/../lib64/tls/x86_64", 0x7ffd21066e60) = -1 ENOENT (No such file or directory)
open("/usr/lib64/../lib64/tls/libnsl.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/../lib64/tls", 0x7ffd21066e60) = -1 ENOENT (No such file or directory)
open("/usr/lib64/../lib64/x86_64/libnsl.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/../lib64/x86_64", 0x7ffd21066e60) = -1 ENOENT (No such file or directory)
open("/usr/lib64/../lib64/libnsl.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/../lib64", {st_mode=S_IFDIR|0755, st_size=221184, ...}) = 0
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=301279, ...}) = 0
mmap(NULL, 301279, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7ff96703e000
close(3) = 0
open("/lib64/libnsl.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\0\20A\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=115871, ...}) = 0
mmap(NULL, 2202328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ff966c4c000
mprotect(0x7ff966c63000, 2093056, PROT_NONE) = 0
mmap(0x7ff966e62000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x16000) = 0x7ff966e62000
mmap(0x7ff966e64000, 6872, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7ff966e64000
close(3) = 0
open("/usr/lib64/../lib64/libresolv.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib64/libresolv.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@:\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=110237, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ff96703d000
mmap(NULL, 2202264, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ff966a32000
mprotect(0x7ff966a49000, 2093056, PROT_NONE) = 0
mmap(0x7ff966c48000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x16000) = 0x7ff966c48000
mmap(0x7ff966c4a000, 6808, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7ff966c4a000
close(3) = 0
open("/usr/lib64/../lib64/liblzo2.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@$\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=143216, ...}) = 0
mmap(NULL, 2227624, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ff966812000
mprotect(0x7ff966832000, 2093056, PROT_NONE) = 0
mmap(0x7ff966a31000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1f000) = 0x7ff966a31000
close(3) = 0
open("/usr/lib64/../lib64/libsnappy.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\0\320$\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=33096, ...}) = 0
mmap(NULL, 2128296, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ff96660a000
mprotect(0x7ff966612000, 2093056, PROT_NONE) = 0
mmap(0x7ff966811000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x7000) = 0x7ff966811000
close(3) = 0
open("/usr/lib64/../lib64/libstdc++.so.6", 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 \246\5\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=970768, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ff96703c000
mmap(NULL, 3150880, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ff966308000
mprotect(0x7ff9663ec000, 2093056, PROT_NONE) = 0
mmap(0x7ff9665eb000, 40960, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xe3000) = 0x7ff9665eb000
mmap(0x7ff9665f5000, 82976, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7ff9665f5000
close(3) = 0
open("/usr/lib64/../lib64/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib64/libm.so.6", 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\260T\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1125896, ...}) = 0
mmap(NULL, 3150184, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ff966006000
mprotect(0x7ff966106000, 2097152, PROT_NONE) = 0
mmap(0x7ff966306000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x100000) = 0x7ff966306000
close(3) = 0
open("/usr/lib64/../lib64/libssl.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\0\340t\1\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0555, st_size=447024, ...}) = 0
mmap(NULL, 2542544, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ff965d99000
mprotect(0x7ff965dfd000, 2093056, PROT_NONE) = 0
mmap(0x7ff965ffc000, 40960, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x63000) = 0x7ff965ffc000
close(3) = 0
open("/usr/lib64/../lib64/libcrypto.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\0\200\27\6\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0555, st_size=1944360, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ff96703b000
mmap(NULL, 4055032, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ff9659bb000
mprotect(0x7ff965b71000, 2093056, PROT_NONE) = 0
mmap(0x7ff965d70000, 155648, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b5000) = 0x7ff965d70000
mmap(0x7ff965d96000, 12280, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7ff965d96000
close(3) = 0
open("/usr/lib64/../lib64/libdl.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
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\200\16\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=18988, ...}) = 0
mmap(NULL, 2109744, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ff9657b7000
mprotect(0x7ff9657ba000, 2093056, PROT_NONE) = 0
mmap(0x7ff9659b9000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7ff9659b9000
close(3) = 0
open("/usr/lib64/../lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib64/libc.so.6", 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\20\36\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=2102965, ...}) = 0
mmap(NULL, 3969600, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ff9653ed000
mprotect(0x7ff9655ac000, 2097152, PROT_NONE) = 0
mmap(0x7ff9657ac000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1bf000) = 0x7ff9657ac000
mmap(0x7ff9657b2000, 16960, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7ff9657b2000
close(3) = 0
open("/usr/lib64/../lib64/libgcc_s.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\0\0*\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=88840, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ff96703a000
mmap(NULL, 2184736, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ff9651d7000
mprotect(0x7ff9651ec000, 2097152, PROT_NONE) = 0
mmap(0x7ff9653ec000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x15000) = 0x7ff9653ec000
close(3) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ff967039000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ff967037000
arch_prctl(ARCH_SET_FS, 0x7ff967037740) = 0
mprotect(0x7ff9657ac000, 16384, PROT_READ) = 0
mprotect(0x7ff9659b9000, 4096, PROT_READ) = 0
mprotect(0x7ff966306000, 4096, PROT_READ) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ff967036000
mprotect(0x7ff9665eb000, 32768, PROT_READ) = 0
mprotect(0x7ff966c48000, 4096, PROT_READ) = 0
mprotect(0x7ff966e62000, 4096, PROT_READ) = 0
mprotect(0x7ff967089000, 4096, PROT_READ) = 0
munmap(0x7ff96703e000, 301279) = 0
gettimeofday({1436534110, 71928}, NULL) = 0
brk(0) = 0x2173000
brk(0x2194000) = 0x2194000
rt_sigaction(SIGINT, {0x4579d0, [INT], SA_RESTORER|SA_RESTART, 0x7ff9654239f0}, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGTERM, {0x4579d0, [TERM], SA_RESTORER|SA_RESTART, 0x7ff9654239f0}, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGHUP, {SIG_IGN, [HUP], SA_RESTORER|SA_RESTART, 0x7ff9654239f0}, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGUSR1, {SIG_IGN, [USR1], SA_RESTORER|SA_RESTART, 0x7ff9654239f0}, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGUSR2, {SIG_IGN, [USR2], SA_RESTORER|SA_RESTART, 0x7ff9654239f0}, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGPIPE, {SIG_IGN, [PIPE], SA_RESTORER|SA_RESTART, 0x7ff9654239f0}, {SIG_DFL, [], 0}, 8) = 0
open("/etc/openvpn/client.conf", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=3606, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ff967087000
read(3, "################################"..., 4096) = 3606
read(3, "", 4096) = 0
close(3) = 0
munmap(0x7ff967087000, 4096) = 0
chdir("/etc/openvpn") = 0
access("certs/RFSC-ca.crt", R_OK) = 0
access("certs/RFSC-client.crt", R_OK) = 0
access("keys/RFSC-client.key", R_OK) = 0
access("/tmp/build/package-openvpn/usr/sbin/passwd", R_OK) = 0
access("/var/run/openvpn", R_OK|W_OK|X_OK) = 0
access("/var/run/openvpn/client.pid", F_OK) = 0
access("/var/run/openvpn/client.pid", W_OK) = 0
access("/tmp", R_OK|W_OK|X_OK) = 0
brk(0x21b6000) = 0x21b6000
open("/etc/localtime", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=3585, ...}) = 0
fstat(3, {st_mode=S_IFREG|0644, st_size=3585, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ff967087000
read(3, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\7\0\0\0\7\0\0\0\0"..., 4096) = 3585
lseek(3, -2281, SEEK_CUR) = 1304
read(3, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\7\0\0\0\7\0\0\0\0"..., 4096) = 2281
close(3) = 0
munmap(0x7ff967087000, 4096) = 0
getpid() = 4117
socket(PF_LOCAL, SOCK_DGRAM|SOCK_CLOEXEC, 0) = 3
connect(3, {sa_family=AF_LOCAL, sun_path="/dev/log"}, 110) = 0
sendto(3, "<29>Jul 10 08:15:10 openvpn[4117"..., 155, MSG_NOSIGNAL, NULL, 0) = 155
sendto(3, "<29>Jul 10 08:15:10 openvpn[4117"..., 88, MSG_NOSIGNAL, NULL, 0) = 88
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7ff967037a10) = 4118
exit_group(0) = ?
+++ exited with 0 +++

Looks the same as before. I am confused now.

Cheers,

Fred

comment:11 Changed 4 years ago by breakfastfish

Here is strace output without --askpass or --daemon option:

# strace -f /tmp/build/package-openvpn/usr/sbin/openvpn --writepid /var/run/openvpn/client.pid --config /etc/openvpn/client.conf --cd /etc/openvpn
execve("/tmp/build/package-openvpn/usr/sbin/openvpn", ["/tmp/build/package-openvpn/usr/s"..., "--writepid", "/var/run/openvpn/client.pid", "--config", "/etc/openvpn/client.conf", "--cd", "/etc/openvpn"], 54 vars */) = 0
brk(0) = 0x1b98000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f557fd9c000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/usr/lib64/../lib64/tls/x86_64/libnsl.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/../lib64/tls/x86_64", 0x7ffce37efd00) = -1 ENOENT (No such file or directory)
open("/usr/lib64/../lib64/tls/libnsl.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/../lib64/tls", 0x7ffce37efd00) = -1 ENOENT (No such file or directory)
open("/usr/lib64/../lib64/x86_64/libnsl.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/../lib64/x86_64", 0x7ffce37efd00) = -1 ENOENT (No such file or directory)
open("/usr/lib64/../lib64/libnsl.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/../lib64", {st_mode=S_IFDIR|0755, st_size=221184, ...}) = 0
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=301279, ...}) = 0
mmap(NULL, 301279, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f557fd52000
close(3) = 0
open("/lib64/libnsl.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\0\20A\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=115871, ...}) = 0
mmap(NULL, 2202328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f557f960000
mprotect(0x7f557f977000, 2093056, PROT_NONE) = 0
mmap(0x7f557fb76000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x16000) = 0x7f557fb76000
mmap(0x7f557fb78000, 6872, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f557fb78000
close(3) = 0
open("/usr/lib64/../lib64/libresolv.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib64/libresolv.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@:\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=110237, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f557fd51000
mmap(NULL, 2202264, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f557f746000
mprotect(0x7f557f75d000, 2093056, PROT_NONE) = 0
mmap(0x7f557f95c000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x16000) = 0x7f557f95c000
mmap(0x7f557f95e000, 6808, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f557f95e000
close(3) = 0
open("/usr/lib64/../lib64/liblzo2.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@$\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=143216, ...}) = 0
mmap(NULL, 2227624, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f557f526000
mprotect(0x7f557f546000, 2093056, PROT_NONE) = 0
mmap(0x7f557f745000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1f000) = 0x7f557f745000
close(3) = 0
open("/usr/lib64/../lib64/libsnappy.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\0\320$\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=33096, ...}) = 0
mmap(NULL, 2128296, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f557f31e000
mprotect(0x7f557f326000, 2093056, PROT_NONE) = 0
mmap(0x7f557f525000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x7000) = 0x7f557f525000
close(3) = 0
open("/usr/lib64/../lib64/libstdc++.so.6", 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 \246\5\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=970768, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f557fd50000
mmap(NULL, 3150880, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f557f01c000
mprotect(0x7f557f100000, 2093056, PROT_NONE) = 0
mmap(0x7f557f2ff000, 40960, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xe3000) = 0x7f557f2ff000
mmap(0x7f557f309000, 82976, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f557f309000
close(3) = 0
open("/usr/lib64/../lib64/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib64/libm.so.6", 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\260T\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1125896, ...}) = 0
mmap(NULL, 3150184, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f557ed1a000
mprotect(0x7f557ee1a000, 2097152, PROT_NONE) = 0
mmap(0x7f557f01a000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x100000) = 0x7f557f01a000
close(3) = 0
open("/usr/lib64/../lib64/libssl.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\0\340t\1\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0555, st_size=447024, ...}) = 0
mmap(NULL, 2542544, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f557eaad000
mprotect(0x7f557eb11000, 2093056, PROT_NONE) = 0
mmap(0x7f557ed10000, 40960, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x63000) = 0x7f557ed10000
close(3) = 0
open("/usr/lib64/../lib64/libcrypto.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\0\200\27\6\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0555, st_size=1944360, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f557fd4f000
mmap(NULL, 4055032, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f557e6cf000
mprotect(0x7f557e885000, 2093056, PROT_NONE) = 0
mmap(0x7f557ea84000, 155648, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b5000) = 0x7f557ea84000
mmap(0x7f557eaaa000, 12280, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f557eaaa000
close(3) = 0
open("/usr/lib64/../lib64/libdl.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
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\200\16\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=18988, ...}) = 0
mmap(NULL, 2109744, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f557e4cb000
mprotect(0x7f557e4ce000, 2093056, PROT_NONE) = 0
mmap(0x7f557e6cd000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7f557e6cd000
close(3) = 0
open("/usr/lib64/../lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib64/libc.so.6", 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\20\36\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=2102965, ...}) = 0
mmap(NULL, 3969600, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f557e101000
mprotect(0x7f557e2c0000, 2097152, PROT_NONE) = 0
mmap(0x7f557e4c0000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1bf000) = 0x7f557e4c0000
mmap(0x7f557e4c6000, 16960, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f557e4c6000
close(3) = 0
open("/usr/lib64/../lib64/libgcc_s.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\0\0*\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=88840, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f557fd4e000
mmap(NULL, 2184736, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f557deeb000
mprotect(0x7f557df00000, 2097152, PROT_NONE) = 0
mmap(0x7f557e100000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x15000) = 0x7f557e100000
close(3) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f557fd4d000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f557fd4b000
arch_prctl(ARCH_SET_FS, 0x7f557fd4b740) = 0
mprotect(0x7f557e4c0000, 16384, PROT_READ) = 0
mprotect(0x7f557e6cd000, 4096, PROT_READ) = 0
mprotect(0x7f557f01a000, 4096, PROT_READ) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f557fd4a000
mprotect(0x7f557f2ff000, 32768, PROT_READ) = 0
mprotect(0x7f557f95c000, 4096, PROT_READ) = 0
mprotect(0x7f557fb76000, 4096, PROT_READ) = 0
mprotect(0x7f557fd9d000, 4096, PROT_READ) = 0
munmap(0x7f557fd52000, 301279) = 0
gettimeofday({1436534373, 79808}, NULL) = 0
brk(0) = 0x1b98000
brk(0x1bb9000) = 0x1bb9000
rt_sigaction(SIGINT, {0x4579d0, [INT], SA_RESTORER|SA_RESTART, 0x7f557e1379f0}, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGTERM, {0x4579d0, [TERM], SA_RESTORER|SA_RESTART, 0x7f557e1379f0}, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGHUP, {SIG_IGN, [HUP], SA_RESTORER|SA_RESTART, 0x7f557e1379f0}, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGUSR1, {SIG_IGN, [USR1], SA_RESTORER|SA_RESTART, 0x7f557e1379f0}, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGUSR2, {SIG_IGN, [USR2], SA_RESTORER|SA_RESTART, 0x7f557e1379f0}, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGPIPE, {SIG_IGN, [PIPE], SA_RESTORER|SA_RESTART, 0x7f557e1379f0}, {SIG_DFL, [], 0}, 8) = 0
open("/etc/openvpn/client.conf", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=3606, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f557fd9b000
read(3, "################################"..., 4096) = 3606
read(3, "", 4096) = 0
close(3) = 0
munmap(0x7f557fd9b000, 4096) = 0
chdir("/etc/openvpn") = 0
access("certs/RFSC-ca.crt", R_OK) = 0
access("certs/RFSC-client.crt", R_OK) = 0
access("keys/RFSC-client.key", R_OK) = 0
access("/var/run/openvpn", R_OK|W_OK|X_OK) = 0
access("/var/run/openvpn/client.pid", F_OK) = 0
access("/var/run/openvpn/client.pid", W_OK) = 0
access("/tmp", R_OK|W_OK|X_OK) = 0
gettimeofday({1436534373, 86323}, NULL) = 0
open("/etc/localtime", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=3585, ...}) = 0
fstat(3, {st_mode=S_IFREG|0644, st_size=3585, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f557fd9b000
read(3, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\7\0\0\0\7\0\0\0\0"..., 4096) = 3585
lseek(3, -2281, SEEK_CUR) = 1304
read(3, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\7\0\0\0\7\0\0\0\0"..., 4096) = 2281
brk(0x1bda000) = 0x1bda000
close(3) = 0
munmap(0x7f557fd9b000, 4096) = 0
fstat(1, {st_mode=S_IFCHR|0600, st_rdev=makedev(136, 2), ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f557fd9b000
write(1, "Fri Jul 10 08:19:33 2015 OpenVPN"..., 146Fri Jul 10 08:19:33 2015 OpenVPN 2.3_git x86_64-slackware-linux-gnu [SSL (OpenSSL)] [LZO] [SNAPPY] [LZ4] [EPOLL] [MH] [IPv6] built on Jul 9 2015
) = 146
gettimeofday({1436534373, 87957}, NULL) = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3585, ...}) = 0
write(1, "Fri Jul 10 08:19:33 2015 library"..., 79Fri Jul 10 08:19:33 2015 library versions: OpenSSL 1.0.1p 9 Jul 2015, LZO 2.03
) = 79
open("/var/run/openvpn/client.pid", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3
getpid() = 4173
fstat(3, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f557fd9a000
write(3, "4173\n", 5) = 5
close(3) = 0
munmap(0x7f557fd9a000, 4096) = 0
rt_sigaction(SIGINT, {0x4579d0, [INT], SA_RESTORER|SA_RESTART, 0x7f557e1379f0}, {0x4579d0, [INT], SA_RESTORER|SA_RESTART, 0x7f557e1379f0}, 8) = 0
rt_sigaction(SIGTERM, {0x4579d0, [TERM], SA_RESTORER|SA_RESTART, 0x7f557e1379f0}, {0x4579d0, [TERM], SA_RESTORER|SA_RESTART, 0x7f557e1379f0}, 8) = 0
rt_sigaction(SIGHUP, {SIG_IGN, [HUP], SA_RESTORER|SA_RESTART, 0x7f557e1379f0}, {SIG_IGN, [HUP], SA_RESTORER|SA_RESTART, 0x7f557e1379f0}, 8) = 0
rt_sigaction(SIGUSR1, {SIG_IGN, [USR1], SA_RESTORER|SA_RESTART, 0x7f557e1379f0}, {SIG_IGN, [USR1], SA_RESTORER|SA_RESTART, 0x7f557e1379f0}, 8) = 0
rt_sigaction(SIGUSR2, {SIG_IGN, [USR2], SA_RESTORER|SA_RESTART, 0x7f557e1379f0}, {SIG_IGN, [USR2], SA_RESTORER|SA_RESTART, 0x7f557e1379f0}, 8) = 0
rt_sigaction(SIGPIPE, {SIG_IGN, [PIPE], SA_RESTORER|SA_RESTART, 0x7f557e1379f0}, {SIG_IGN, [PIPE], SA_RESTORER|SA_RESTART, 0x7f557e1379f0}, 8) = 0
open("/dev/urandom", O_RDONLY|O_NOCTTY|O_NONBLOCK) = 3
fstat(3, {st_mode=S_IFCHR|0666, st_rdev=makedev(1, 9), ...}) = 0
poll([{fd=3, events=POLLIN}], 1, 10) = 1 ([{fd=3, revents=POLLIN}])
read(3, "\2046\367g\224*\375\177\2\375\335\337\270\303\223\216\245\373\237\22\32ti\352\265\243\361jZ\213\356\34", 32) = 32
close(3) = 0
getuid() = 0
open("certs/RFSC-client.crt", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=4923, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f557fd9a000
read(3, "Certificate:\n Data:\n V"..., 4096) = 4096
read(3, "2lIHoT/aaKlxlKmdP3YhzF4L\ne3tM4AV"..., 4096) = 827
read(3, "", 4096) = 0
close(3) = 0
munmap(0x7f557fd9a000, 4096) = 0
open("keys/RFSC-client.key", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0600, st_size=1743, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f557fd9a000
read(3, "-----BEGIN RSA PRIVATE KEY-----\n"..., 4096) = 1743
open("/dev/tty", O_RDWR|O_CREAT|O_TRUNC|O_CLOEXEC, 0666) = 5
ioctl(5, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(5, SNDCTL_TMR_CONTINUE or SNDRV_TIMER_IOCTL_GPARAMS or TCSETSF, {B38400 opost -isig icanon -echo ...}) = 0
fstat(5, {st_mode=S_IFCHR|0666, st_rdev=makedev(5, 0), ...}) = 0
ioctl(5, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B38400 opost -isig icanon -echo ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f557fd99000
write(5, "Enter Private Key Password:", 27Enter Private Key Password:) = 27
read(5,

Here password is entered and process continues. I can put it to background with ctrl-z bg commands but how to do this from a shell script?

Cheers,

Fred

comment:12 Changed 4 years ago by Steffan Karger

@Fred: Just to be clear, did you apply the patch, compile openvpn, and use the newly compiler binary for you most recent tests? The patch is not yet in any repo, you'll have to apply it manually first. I'm asking this, because your output does not match what

@cron2: yes, a warning message would indeed be nice. I will probably get to it in a few days. Either as an update or follow-up patch, depending on whether this patch already went in.

Changed 4 years ago by breakfastfish

patch file

Changed 4 years ago by breakfastfish

Attachment: init.c added

comment:13 Changed 4 years ago by breakfastfish

Hi,

Just tried building the git version again as I noticed that init.c, init.h and openvpn.c had been updated when I refreshed my local repository. It seems to be working now. I had to add the --askpass option to my start/stop script and it works as in 2.3.6.
Many many thanks to all of you for this fix! Probably small in consideration of everything else. I did notice this when building though:

init.c: In function 'do_up':
init.c:1656:5: warning: passing argument 1 of 'options_hash_changed_or_zero' from incompatible pointer type [enabled by default]

&c->c2.pulled_options_digest))

init.c:1623:1: note: expected 'const uint8_t (*)[16]' but argument is of type 'uint8_t (*)[16]'

options_hash_changed_or_zero(const uint8_t (*a)[MD5_DIGEST_LENGTH],

init.c:1656:5: warning: passing argument 2 of 'options_hash_changed_or_zero' from incompatible pointer type [enabled by default]

&c->c2.pulled_options_digest))

init.c:1623:1: note: expected 'const uint8_t (*)[16]' but argument is of type 'uint8_t (*)[16]'

options_hash_changed_or_zero(const uint8_t (*a)[MD5_DIGEST_LENGTH],

Don't know if it is something that is important or not.

Thanks Again,

Fred

comment:14 in reply to:  13 Changed 4 years ago by Gert Döring

Hi and good morning,

Replying to breakfastfish:

Just tried building the git version again as I noticed that init.c, init.h and openvpn.c had been updated when I refreshed my local repository.

You're just too fast :-) - this is exactly what I wanted to ask you to do, after our lengthy discussion/test/commit session yesterday night.

It seems to be working now.

Glad to hear that!

I had to add the --askpass option to my start/stop script and it works as in 2.3.6.

Yes. This is needed now - which is a bit annoying, but at least the error message points this out clearly now (reminds me: the man page entry for --daemon should be updated as well...). This is really somewhat unsolveable - if we init crypto before daemon(), we fail on FreeBSD's cryptodev, if we daemon() before initing crypto, it's too late to ask for a pass phrase, unless we know beforehand (by means of --askpass)...

Many many thanks to all of you for this fix! Probably small in consideration of everything else. I did notice this when building though:

init.c: In function 'do_up':
init.c:1656:5: warning: passing argument 1 of 'options_hash_changed_or_zero' from incompatible pointer type [enabled by default]

&c->c2.pulled_options_digest))

I think part of this is due to more recent compilers being more picky - but yeah, we should do another round of "fix warnings and then compile with -Wall -Werror" :-)

thanks for your patience!

gert

comment:15 Changed 4 years ago by breakfastfish

Good Morning & thank you for the reply. Once again, thank you for all of your work on this project.

Just wondering if I can use 2.3_git for production work or if there is a way to "back port" to 2.3.7 ?? I did a diff of init.c in 2.3.7 and the one in 2.3_git. There are considerable changes to the one in git. The other files, init.h and openvpn.c don't have much difference (no pun).

Cheers,

Fred

comment:16 Changed 4 years ago by Gert Döring

In our git, just use the "release/2.3" branch ("git checkout release/2.3") - this is 2.3.7 plus about 7 small fixes (in other words: the patchs have already been backported, and will be part of the 2.3.8 release coming "soon"). Or do "git diff v2.3.7..release/2.3" to see everything that has been changed since 2.3.7 release :-)

comment:17 Changed 4 years ago by Gert Döring

Resolution: fixed
Status: newclosed

2.3.8 has been tagged today and should show up on the download servers tomorrow.

comment:18 Changed 4 years ago by Gert Döring

Oh, as a side note, the init.c warnings in git master are also fixed

commit 2dd6501e3d679046a1ed488f22d62defdf737cf3
Author: Steffan Karger <steffan@…>
Date: Sun Jul 26 13:27:19 2015 +0200

reintroduce md5_digest wrapper struct to fix gcc warnings

comment:19 Changed 4 years ago by breakfastfish

Hi,

Thank you again for all of your good work on this software. I have downloaded 2.3.8 and built and tested it. I have found no issues yet. Everything is functioning as it should.

Cheers,

Fred

Note: See TracTickets for help on using tickets.