From 07a3ad638e4c210ba60ee60b589dcbe92dd1b8e5 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Mon, 3 Apr 2006 21:26:44 +0000 Subject: [PATCH] - Fix leaky descriptor --- libsemanage-rhat.patch | 23 ++++++++++++----------- libsemanage.spec | 2 ++ 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/libsemanage-rhat.patch b/libsemanage-rhat.patch index 6722ca9..8261a6e 100644 --- a/libsemanage-rhat.patch +++ b/libsemanage-rhat.patch @@ -1,11 +1,12 @@ ---- libsemanage-1.5.28/src/Makefile~ 2006-02-17 14:45:52.000000000 -0500 -+++ libsemanage-1.5.28/src/Makefile 2006-03-17 08:44:29.000000000 -0500 -@@ -3,7 +3,7 @@ - LIBDIR ?= $(PREFIX)/lib - SHLIBDIR ?= $(DESTDIR)/lib - INCLUDEDIR ?= $(PREFIX)/include --PYLIBVER ?= python2.4 -+PYLIBVER ?= $(shell python -c 'import sys;print "python%d.%d" % sys.version_info[0:2]') - PYINC ?= /usr/include/${PYLIBVER} - PYLIBDIR ?= $(LIBDIR)/${PYLIBVER} - +diff --exclude-from=exclude -N -u -r nsalibsemanage/src/semanage_store.c libsemanage-1.6.2/src/semanage_store.c +--- nsalibsemanage/src/semanage_store.c 2006-03-10 09:48:01.000000000 -0500 ++++ libsemanage-1.6.2/src/semanage_store.c 2006-03-29 14:20:16.000000000 -0500 +@@ -1159,6 +1159,8 @@ + ERR(sh, "Could not open direct %s at %s.", lock_name, lock_file); + return -1; + } ++ fcntl(fd, F_SETFD, FD_CLOEXEC); ++ + if (sh->timeout == 0) { + /* return immediately */ + origtime.tv_sec = 0; diff --git a/libsemanage.spec b/libsemanage.spec index f7cf274..5e9d799 100644 --- a/libsemanage.spec +++ b/libsemanage.spec @@ -44,6 +44,8 @@ needed for developing applications that manipulate binary policies. %build make clean +# Don't want to rebuild +touch src/semanage_wrap.c make CFLAGS="%{optflags}" all pywrap %install