rpms/pcsc-lite/F-11 pcsc-lite-1.5-permissions.patch, NONE, 1.1 pcsc-lite.spec, 1.20, 1.21

Robert Relyea rrelyea at fedoraproject.org
Wed Jun 17 17:57:40 UTC 2009


Author: rrelyea

Update of /cvs/extras/rpms/pcsc-lite/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv27244

Modified Files:
	pcsc-lite.spec 
Added Files:
	pcsc-lite-1.5-permissions.patch 
Log Message:


Update directory permissions
bug: 503211


pcsc-lite-1.5-permissions.patch:

--- NEW FILE pcsc-lite-1.5-permissions.patch ---
diff -up ./src/pcscdaemon.c.permissions ./src/pcscdaemon.c
--- ./src/pcscdaemon.c.permissions	2009-02-06 00:46:20.000000000 -0800
+++ ./src/pcscdaemon.c	2009-06-17 10:06:49.419656000 -0700
@@ -438,7 +438,8 @@ int main(int argc, char **argv)
 	rv = SYS_Stat(PCSCLITE_EVENTS_DIR, &fStatBuf);
 	if (rv < 0)
 	{
-		int mode = S_IRWXU | S_IWGRP | S_IXGRP | S_IWOTH | S_IXOTH; /* 0755 */
+ 		/* 1733 : world writable + sticky bit */
+ 		int mode = S_IRWXU | S_IWGRP | S_IXGRP | S_IWOTH | S_IXOTH | S_ISVTX;
 
 		rv = SYS_Mkdir(PCSCLITE_EVENTS_DIR, mode);
 		if (rv != 0)
diff -up ./src/winscard_clnt.c.permissions ./src/winscard_clnt.c
--- ./src/winscard_clnt.c.permissions	2009-02-06 00:46:20.000000000 -0800
+++ ./src/winscard_clnt.c	2009-06-17 10:07:32.392742000 -0700
@@ -1717,7 +1717,7 @@ static long WaitForPcscdEvent(SCARDCONTE
 {
 	char filename[FILENAME_MAX];
 	char buf[1];
-	int fd;
+	int fd, r;
 	struct timeval tv, *ptv = NULL;
 	struct timeval before, after;
 	fd_set read_fd;
@@ -1734,7 +1734,14 @@ static long WaitForPcscdEvent(SCARDCONTE
 
 	(void)snprintf(filename, sizeof(filename), "%s/event.%d.%ld",
 		PCSCLITE_EVENTS_DIR, SYS_GetPID(), hContext);
-	(void)mkfifo(filename, 0644);
+	r = mkfifo(filename, 0644);
+ 	if (-1 == r)
+ 	{
+ 		Log2(PCSC_LOG_CRITICAL, "Can't create event fifo: %s", strerror(errno));
+ 		goto exit;
+ 	}
+ 
+
 	fd = SYS_OpenFile(filename, O_RDONLY | O_NONBLOCK, 0);
 
 	FD_ZERO(&read_fd);
@@ -1755,6 +1762,7 @@ static long WaitForPcscdEvent(SCARDCONTE
 		dwTime -= diff/1000;
 	}
 
+exit:
 	return dwTime;
 }
 


Index: pcsc-lite.spec
===================================================================
RCS file: /cvs/extras/rpms/pcsc-lite/F-11/pcsc-lite.spec,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -p -r1.20 -r1.21
--- pcsc-lite.spec	6 Mar 2009 00:37:05 -0000	1.20
+++ pcsc-lite.spec	17 Jun 2009 17:57:10 -0000	1.21
@@ -1,6 +1,6 @@
 Name:           pcsc-lite
 Version:        1.5.2
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        PC/SC Lite smart card framework and applications
 %define upstream_build 2795
 
@@ -11,6 +11,7 @@ Source0:        http://alioth.debian.org
 Patch0:         %{name}-1.4-docinst.patch
 Patch1:         %{name}-1.4.100-rpath64.patch
 Patch2:         %{name}-close_on_exec.patch
+Patch3:         %{name}-1.5-permissions.patch
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
@@ -64,6 +65,7 @@ Group:          Documentation
 %patch0 -p0 -b .docinst
 %patch1 -p1 -b .rpath64
 %patch2 -p1 -b .close_on_exec
+%patch3 -p0 -b .permissions
 
 %build
 %configure \
@@ -150,6 +152,9 @@ fi
 
 
 %changelog
+* Wed Jun 17 2009 Bob Relyea <rrelyea at redhat.com> - 1.5.2-2
+- Pick up security fixes from upstream
+
 * Fri Feb 27 2009 Bob Relyea <rrelyea at redhat.com> - 1.5.2-1
 - Pick up 1.5.2
 - Add FD_CLOEXEC flag




More information about the fedora-extras-commits mailing list