Package: osiris Version: 4.2.0-2 Severity: important Tags: patch
hy, here is a mail from one of the developers with an temp. fix. ------------------------schnippp----------------------------------------- In src/libosirisctl/osirisctl.c:ctl_get_database() at the break; on line 3808, the status should be set to TRUE when the function returns, however on some systems a FALSE is returned to the calling function src/cli/osiris.c:process_print_db() at the if statement on line 2867. This causes the CLI print-db to fail even though the temporary database was correctly written to the CLI host as shown by trying to diff the db.temp and the original DB on the management host. When debugging this issue, I found that putting a sleep(1); right before the offending break in osirisctl.c on line 3808 fixes the problem. Can anyone provide insight as to why this workaround works, and maybe provide a better fix? This condition exists on some Debian systems as reported by Ruben Puettmann and I was able to recreate the error on a Fedora Core 5 i386 virtual machine. Thank you! dave ------------------schnapp--------------------------------------- You can follow the discussion on: http://osiris.shmoo.com/pipermail/osiris-devel/ attached is an Patch for the 4.2.2 Version Ruben -- Ruben Puettmann [EMAIL PROTECTED] http://www.puettmann.net
--- osiris-4.2.2/src/libosirisctl/osirisctl.c 2006-07-27 19:57:51.000000000 -0400 +++ osiris-patched/src/libosirisctl/osirisctl.c 2006-11-29 15:50:11.000673960 -0500 @@ -3804,8 +3804,21 @@ } } + /* set status to TRUE, close the database file, and return + to the CLI... + + This is functionally equivalent to what was previously here; + however, some systems would see ctl_get_database() return + FALSE to the CLI which would make print-db fail. + */ status = TRUE; - break; + + if( dbfile ) + { + fclose( dbfile ); + } + + return status; } /* drop all other message types. */