rpms/acpid/devel acpid-1.0.6-fd.patch, NONE, 1.1 acpid.init, 1.3, 1.4 acpid.spec, 1.22, 1.23

Zdenek Prikryl (zprikryl) fedora-extras-commits at redhat.com
Wed Sep 26 13:50:14 UTC 2007


Author: zprikryl

Update of /cvs/extras/rpms/acpid/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv1631

Modified Files:
	acpid.init acpid.spec 
Added Files:
	acpid-1.0.6-fd.patch 
Log Message:
Fixed leak of a file descriptor
Resolves: #304761


acpid-1.0.6-fd.patch:

--- NEW FILE acpid-1.0.6-fd.patch ---
--- acpid-1.0.6.orig/acpid.c	2007-09-24 18:49:02.000000000 -0400
+++ acpid-1.0.6/acpid.c	2007-09-24 18:52:44.000000000 -0400
@@ -397,7 +397,7 @@ open_log(void)
 	int log_opts;
 
 	/* open /dev/null */
-	nullfd = open("/dev/null", O_RDONLY, 0640);
+	nullfd = open("/dev/null", O_RDONLY);
 	if (nullfd < 0) {
 		fprintf(stderr, "%s: can't open %s: %s\n", progname, 
 			"/dev/null", strerror(errno));
diff -urp acpid-1.0.6.orig/event.c acpid-1.0.6/event.c
--- acpid-1.0.6.orig/event.c	2007-09-24 18:49:02.000000000 -0400
+++ acpid-1.0.6/event.c	2007-09-24 18:55:10.000000000 -0400
@@ -318,6 +318,7 @@ parse_file(const char *file)
 			    file);
 		}
 		free_rule(r);
+		fclose(fp);
 		return NULL;
 	}
 	fclose(fp);
@@ -667,7 +668,7 @@ parse_cmd(const char *cmd, const char *e
 	i = 0;
 
 	memset(buf, 0, sizeof(buf));
-	while (i < (sizeof(buf)-1)) {
+	while ((size_t)i < (sizeof(buf)-1)) {
 		if (*p == '%') {
 			p++;
 			if (*p == 'e') {



Index: acpid.init
===================================================================
RCS file: /cvs/extras/rpms/acpid/devel/acpid.init,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- acpid.init	25 Jul 2007 08:59:47 -0000	1.3
+++ acpid.init	26 Sep 2007 13:49:40 -0000	1.4
@@ -10,10 +10,10 @@
 
 ### BEGIN INIT INFO
 # Provides: acpid
-# Required-Start: $syslog
-# Required-Stop: $syslog
-# Default-Start:  3 4 5
-# Default-Stop: 0 1 2 6
+# Required-Start: $syslog $local_fs
+# Required-Stop: $syslog $local_fs
+# Default-Start:  2 3 4 5
+# Default-Stop: 0 1 6
 # Short-Description: start and stop acpid
 # Description: Listen and dispatch ACPI events from the kernel
 ### END INIT INFO
@@ -35,7 +35,7 @@
 	fi
 	# Check for kernel support
 	if [ ! -f /proc/acpi/event ]; then
-		echo "$0: need ACPI support in kernel."
+		echo "$0: need ACPI_PROC_EVENT support in kernel."  //zmena podle 260181
 		exit 1
 	fi
 	# Check if it is already running


Index: acpid.spec
===================================================================
RCS file: /cvs/extras/rpms/acpid/devel/acpid.spec,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- acpid.spec	10 Aug 2007 06:49:39 -0000	1.22
+++ acpid.spec	26 Sep 2007 13:49:40 -0000	1.23
@@ -1,7 +1,7 @@
 Summary: ACPI Event Daemon
 Name: acpid
 Version: 1.0.6
-Release: 1%{?dist}
+Release: 2%{?dist}
 License: GPL
 Group: System Environment/Daemons
 Source: http://prdownloads.sourceforge.net/acpid/acpid-%{version}.tar.gz
@@ -11,6 +11,7 @@
 Source4: acpid.power.conf
 Patch1: acpid-1.0.6-makefile.patch
 Patch2: acpid-1.0.6-return.patch
+Patch3: acpid-1.0.6-fd.patch
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 ExclusiveArch: ia64 x86_64 %{ix86}
 URL: http://acpid.sourceforge.net/
@@ -27,6 +28,7 @@
 %setup -q
 %patch1 -p1 -b .makefile
 %patch2 -p1 -b .return
+%patch3 -p1 -b .fd
 
 %build
 make %{?_smp_mflags}
@@ -85,6 +87,10 @@
 fi
 
 %changelog
+* Wed Sep 26 2007 Zdenek Prikryl <zprikryl at redhat.com> - 1.0.6-2.fc8
+- Fixed leak of a file descriptor
+- Resolves: #304761
+
 * Tue Aug 07 2007 Zdenek Prikryl <zprikryl at redhat.com> - 1.0.6-1.fc8
 - Updated to version 1.0.6
 




More information about the fedora-extras-commits mailing list