Hi, On 16-04-14 17:43, dav...@redhat.com wrote: > When a client connects, the test_file() function is used to check if a client > config file has been prepared. And if not, it continues without trying to > read > it. So, if the privileges of the running OpenVPN process is not allowed to > open and read an existing file, OpenVPN will treat this as a non-existing file > without saying anything. This is clearly wrong. So this patch adds an > warning > message in the OpenVPN log if it could not open the file due to lack of > permissions.
Makes sense. Feature ACK. > This will work fine on all *nix based OSes. Windows however reports 'no such > file or directory' (errno=2/-ENOENT) even on privilege access errors when the > directory this file resides is too restrictive. But there is no easy way to > work around that. However, I believe that the initial sanity checking at > startup will catch that one, as it will check if the directories it needs > exists. I see you're using errno for Windows builds. OpenVPN also has openvpn_errno(), which expands to errno on *nix OSes, but to GetLastError() for Windows. I'm not familiar with the details, but maybe using openvpn_errno() fixes the Windows ENOENT? -Steffan