Package: libpisock-dev
Version: 0.12.3-5
Tags: patch
User: [EMAIL PROTECTED]
Usertags: origin-ubuntu ubuntu-patch jaunty

Hello,

src/pilot-schlep.c currently calls open() with O_CREAT, but without a
mode. This is invalid according to the manpage.

I wanted to send this upstream, but didn't find a bug tracker. Since
you apparently forwarded some bugs to upstream, can you please relay
this?

Thanks for considering,

Martin

-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)
# Description: open(2) has 3 arguments with O_CREAT.
diff -urNad pilot-link-0.12.3~/src/pilot-schlep.c pilot-link-0.12.3/src/pilot-schlep.c
--- pilot-link-0.12.3~/src/pilot-schlep.c	2006-10-13 00:21:21.000000000 +1000
+++ pilot-link-0.12.3/src/pilot-schlep.c	2008-10-01 00:30:54.000000000 +1000
@@ -22,6 +22,9 @@
  */
 
 #include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
 
 #include "pi-source.h"
 #include "pi-file.h"
@@ -38,7 +41,7 @@
 		fd;
 	pi_buffer_t *buffer;
 
-	fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC);
+	fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR & S_IWUSR & S_IXUSR & S_IRGRP & S_IROTH);
 	if (fd < 0)
 		return -1;
 

Attachment: signature.asc
Description: Digital signature

Reply via email to