[svn-commits] tilghman: trunk r104534 - /trunk/utils/astcanary.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Feb 27 09:34:29 CST 2008


Author: tilghman
Date: Wed Feb 27 09:34:28 2008
New Revision: 104534

URL: http://svn.digium.com/view/asterisk?view=rev&rev=104534
Log:
open(2) needs a mode argument when O_CREAT is specified.
(Closes issue #12083)

Modified:
    trunk/utils/astcanary.c

Modified: trunk/utils/astcanary.c
URL: http://svn.digium.com/view/asterisk/trunk/utils/astcanary.c?view=diff&rev=104534&r1=104533&r2=104534
==============================================================================
--- trunk/utils/astcanary.c (original)
+++ trunk/utils/astcanary.c Wed Feb 27 09:34:28 2008
@@ -67,7 +67,7 @@
 		/* Update the modification times (checked from Asterisk) */
 		if (utime(argv[1], NULL)) {
 			/* Recreate the file if it doesn't exist */
-			if ((fd = open(argv[1], O_RDWR | O_TRUNC | O_CREAT)) > -1)
+			if ((fd = open(argv[1], O_RDWR | O_TRUNC | O_CREAT, 0777)) > -1)
 				close(fd);
 			else
 				exit(1);




More information about the svn-commits mailing list