[cvsnt] Commit continues after non-zero status from verifymsg

Haasjes, Klaas Klaas.Haasjes at raet.com
Wed Jun 1 09:35:41 BST 2005


Community technical support mailing list was retired 2010 and replaced with a professional technical support team. For assistance please contact: Pre-sales Technical support via email to sales@march-hare.com.


It is a bug in logmsg.cpp, introduced somewhere after 2.0.58d, when the trigger activation code is completely rewritten.
The call to the verifymsg script is moved to the function verifymsg_proc, but this function always returns 0. Besides that, the return status of the call to verifymsg_proc in function do_verify is not tested, so verifymsg always succeeds.

After making the following changes in logmsg.cpp (build 2.5.01.1976), it works like in 2.0.58d:
in do_verify, replace line 475: run_trigger(&args,verifymsg_proc) by:
			if (run_trigger(&args,verifymsg_proc)) {
				/* Since following error() exits, delete the temp file
				now.  */
				if (unlink_file (fname) < 0)
					error (0, errno, "cannot remove %s", fname);

				error (1, 0, "Message verification failed");

			}

in verifymsg_proc replace line 672:
	return 0;
by
	return ret;

Patch format:
475c475,483
< 			run_trigger(&args,verifymsg_proc);
---
> 			if (run_trigger(&args,verifymsg_proc)) {
> 				/* Since following error() exits, delete the temp file
> 				now.  */
> 				if (unlink_file (fname) < 0)
> 					error (0, errno, "cannot remove %s", fname);
> 
> 				error (1, 0, "Message verification failed");
> 
> 			}
672c680
< 	return 0;
---
> 	return ret;



More information about the cvsnt mailing list
Download the latest CVSNT, TortosieCVS, WinCVS etc. for Windows 8 etc.
@CVSNT on Twitter   CVSNT on Facebook