[Box Backup] Strange eventlog message (win32 client)

Chris Wilson chris at qwirx.com
Sat May 16 11:14:32 BST 2015


Dear Enrique,

When I got back I re-read your message and realised that I had completely 
misunderstood what you were saying when I scanned it in a hurry before 
leaving. My previous advice was therefore not useful at all. I'm really 
sorry about that.

You are right that something is wrong with the call to RegCreateKeyEx. 
This code has not changed for a very long time, and does not usually fail 
in my experience. It could be a permissions issue.

I read on MSDN that unlike the rest of the Win32 API, the Reg* functions 
return their error code directly instead of through GetLastError(). This 
is almost certainly why the wrong error message is displayed. I have just 
committed a fix for this.

I've also built a new client, this time 64-bit, using the latest trunk 
code and Cygwin/MinGW64 compiler, which you can find here:

https://www.boxbackup.org/svn/box/chris/win32/releases/boxbackup-trunk_3568-backup-client-x86_64-w64-mingw32.tgz

Please could you give it a try and let me know if it provides more useful 
error messages to help you find out why the registry calls are not 
working? (Anyone who would like to try the latest Windows client, please 
feel free to test this version too.)

I hope this helps to fix the problem!

Thanks, Chris.

On Thu, 7 May 2015, Enrique Perez-Terron wrote:

>
> Hello,
>
> After having let an installation bit rot for a while, I am trying to 
> resuscitate it, and now I am seeing an error in the event log on the Windows 
> 7 client:
>
> Failed to create the registry key: Operasjonen er fullført(0)
>
> where the nationalized (Norwegian) part translates approximately as "the 
> operation has completed".
>
> I tend to think that this must be a translation of the message corresponding 
> to the ERROR_SUCCESS code. I also suspect that the zero in parenthesis is the 
> numerical code.
>
> The server side is running the current Ubuntu boxbackup-server-0.11.1~r2837-1
> Looking at the source corresponding to this package, I find this snippet in 
> lib/win32/emu.cpp:1246
>
>       if (RegCreateKeyEx(HKEY_LOCAL_MACHINE, regkey.c_str(),
>                        0, NULL, REG_OPTION_NON_VOLATILE,
>                        KEY_WRITE, NULL, &hk, &dwDisp))
>       {
>               ::syslog(LOG_ERR, "Failed to create the registry key: %s",
>                       GetErrorMessage(GetLastError()).c_str());
>               return FALSE;
>       }
>
>
> My question: Was the code in build M3005 any different? The behavior looks so 
> strange.
>
> My windows install is an unpacking of
>  boxbackup-trunk_3005M-backup-client-mingw32
> into the directory
>  C:\Program Files\Box Backup\
> with only the most obvious changes to bbackupd.conf:
> $ diff bbackupd.conf '/c/Program Files/Box Backup/bbackupd.conf'
> 2,4c2,4
> < StoreHostname = yourhost
> < AccountNumber = 0x1
> < KeysFile = C:\Program Files\Box Backup\1-FileEncKeys.raw
> ---
>> StoreHostname = jerv
>> AccountNumber = 0x70286361
>> KeysFile = C:\Program Files\Box Backup\70286361-FileEncKeys.raw
> 6,7c6,7
> < CertificateFile = C:\Program Files\Box Backup\1-cert.pem
> < PrivateKeyFile = C:\Program Files\Box Backup\1-key.pem
> ---
>> CertificateFile = C:\Program Files\Box Backup\70286361-cert.pem
>> PrivateKeyFile = C:\Program Files\Box Backup\70286361-key.pem
>
> and similar changes to
>  NotifySysadmin.vbs,
> and the addition of the following files:
>  ./70286361-cert.pem
>  ./70286361-FileEncKeys.raw
>  ./70286361-key.pem
>  ./bbackupd/bbackupd.pid
>  ./bbackupd/last_sync_finish
>  ./bbackupd/last_sync_start
>  ./bbackupd/mnt_62cf6f81.n
>  ./serverCA.pem
> (where the files in the bbackupd directory have been created by the program).
>
> Regards,
> Enrique
> _______________________________________________
> Boxbackup mailing list
> Boxbackup at boxbackup.org
> http://lists.boxbackup.org/mailman/listinfo/boxbackup
>

-- 
_____ __     _
\  __/ / ,__(_)_  | Chris Wilson <chris+sig at qwirx.com> Cambs UK |
/ (_/ ,\/ _/ /_ \ | Security/C/C++/Java/Ruby/Perl/SQL Developer |
\__/_/_/_//_/___/ | We are GNU : free your mind & your software |


More information about the Boxbackup mailing list