[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#507282: marked as done (xmcd: Missing mode to open() calls with O_CREAT)



Your message dated Thu, 24 Jun 2010 18:48:23 +0000
with message-id <E1ORrTL-00089W-Du@ries.debian.org>
and subject line Bug#507282: fixed in xmcd 2.6-23
has caused the Debian Bug report #507282,
regarding xmcd: Missing mode to open() calls with O_CREAT
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
507282: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=507282
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: xmcd
Version: 2.6-21
Severity: normal
Tags: patch
User: ubuntu-devel@lists.ubuntu.com
Usertags: origin-ubuntu jaunty ubuntu-patch

Hi,

open(2) states that a mode must be specified when the O_CREAT flag
is specified, there are a few cases where you package does not do
that.

Attached is a patch to specify a mode in those calls, please consider
applying it. The patch to cddb_open is a bit odd, as it doesn't
choose the flags itself. I patched the case where it is called with
O_CREAT by one caller, but it would take a bit of a re-work to have
the caller also specify the mode, or to add an explicit mode to
the open calls in cddb_local_open as well.

Thanks,

James
diff -u xmcd-2.6/cda_d/cda.c xmcd-2.6/cda_d/cda.c
--- xmcd-2.6/cda_d/cda.c
+++ xmcd-2.6/cda_d/cda.c
@@ -393,7 +393,7 @@
 	mypid = getpid();
 
 	for (;;) {
-		fd = open(dlock, O_CREAT | O_EXCL | O_WRONLY);
+		fd = open(dlock, O_CREAT | O_EXCL | O_WRONLY, 0644);
 		if (fd < 0) {
 			if (errno == EEXIST) {
 				if ((fd = open(dlock, O_RDONLY)) < 0)
diff -u xmcd-2.6/cddb_d/cddb_int.c xmcd-2.6/cddb_d/cddb_int.c
--- xmcd-2.6/cddb_d/cddb_int.c
+++ xmcd-2.6/cddb_d/cddb_int.c
@@ -2072,7 +2072,7 @@
 
 	if (rw & O_WRONLY) {
 		/* Open file */
-		if ((fp->fd = open(dbp->dbfile, rw)) < 0) {
+		if ((fp->fd = open(dbp->dbfile, rw, S_IRUSR | S_IWUSR)) < 0) {
 			MEM_FREE(fp->cache);	
 			MEM_FREE(fp);	
 			return NULL;
--- xmcd-2.6.orig/libdi_d/libdi.c
+++ xmcd-2.6/libdi_d/libdi.c
@@ -2721,7 +2721,7 @@
 	mypid = getpid();
 
 	for (;;) {
-		fd = open(lockfile, O_CREAT | O_EXCL | O_WRONLY);
+		fd = open(lockfile, O_CREAT | O_EXCL | O_WRONLY, 0644);
 		if (fd < 0) {
 			if (errno == EEXIST) {
 				if ((fd = open(lockfile, O_RDONLY)) < 0)

--- End Message ---
--- Begin Message ---
Source: xmcd
Source-Version: 2.6-23

We believe that the bug you reported is fixed in the latest version of
xmcd, which is due to be installed in the Debian FTP archive:

cddb_2.6-23_i386.deb
  to main/x/xmcd/cddb_2.6-23_i386.deb
xmcd_2.6-23.diff.gz
  to main/x/xmcd/xmcd_2.6-23.diff.gz
xmcd_2.6-23.dsc
  to main/x/xmcd/xmcd_2.6-23.dsc
xmcd_2.6-23_i386.deb
  to main/x/xmcd/xmcd_2.6-23_i386.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 507282@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Alessio Treglia <alessio@debian.org> (supplier of updated xmcd package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Thu, 24 Jun 2010 20:29:29 +0200
Source: xmcd
Binary: xmcd cddb
Architecture: source i386
Version: 2.6-23
Distribution: unstable
Urgency: low
Maintainer: Debian QA Group <packages@qa.debian.org>
Changed-By: Alessio Treglia <alessio@debian.org>
Description: 
 cddb       - CD DataBase support tools
 xmcd       - X11 based CD player
Closes: 507282
Changes: 
 xmcd (2.6-23) unstable; urgency=low
 .
   * QA upload.
   * Add mode argument to open() calls with O_CREAT to fix build failures;
     thanks to James Westby for the patch (Closes: #507282).
Checksums-Sha1: 
 69db63dc4bf58b005a6f4f135355317d6f69db6d 1039 xmcd_2.6-23.dsc
 173f821719e233f8dc699388b522ee80aa126912 35900 xmcd_2.6-23.diff.gz
 046cef763203186c4240abdcedb4d82ec091ba3a 350628 xmcd_2.6-23_i386.deb
 473f30ddbc74573f33044e9d4ee7414ccdaebc0b 61674 cddb_2.6-23_i386.deb
Checksums-Sha256: 
 907968fb06dfffd2776e3efcefb4dcc7b9a72e229628e05b50a8ba2b22175b61 1039 xmcd_2.6-23.dsc
 48b5cfe3c5604c0f3aba965f8ae872237d577126b217918750edb9da48f43afd 35900 xmcd_2.6-23.diff.gz
 d8c366c4090cc59d221adef35ce63a18ee78db5caf8744f9ac79c925b6794af3 350628 xmcd_2.6-23_i386.deb
 44a8dfb68e0544603a30d7b4aa1509de7541df4a255ca1d64957973ff1f36d6a 61674 cddb_2.6-23_i386.deb
Files: 
 8c485da3f9e89ffee4ac1464f515966b 1039 sound optional xmcd_2.6-23.dsc
 767a43f5be2d22a0fee7ce82dbabc99e 35900 sound optional xmcd_2.6-23.diff.gz
 55199e027f542b0f1d52d9fc7f4ea019 350628 sound optional xmcd_2.6-23_i386.deb
 c89faa4ead22032febfa235c32bfada0 61674 sound optional cddb_2.6-23_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAkwjpZsACgkQRdSMfNz8P9Cq7QCeIpvPcVjObwT/IME7L6uKH+dH
IOoAn1MxKg3zgQWFXpGZY+aOpQpKvCyl
=0UyP
-----END PGP SIGNATURE-----



--- End Message ---

Reply to: