From: Daniel J Walsh <dwalsh@redhat.com>
To: Stephen Smalley <sds@tycho.nsa.gov>,
SE Linux <selinux@tycho.nsa.gov>,
Karl MacMillan <kmacmill@redhat.com>
Subject: sepolgen fixes.
Date: Tue, 20 Feb 2007 09:55:41 -0500 [thread overview]
Message-ID: <45DB0BED.5050205@redhat.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 159 bytes --]
Change to Makefile to get proper python library path even on 64 bit
platforms.
Empty or poorly formated interface files cause sepol-ifgen to crash.
[-- Attachment #2: policycoreutils-sepolgen.patch --]
[-- Type: text/x-patch, Size: 1336 bytes --]
diff --exclude-from=exclude -N -u -r nsasepolgen/src/sepolgen/Makefile policycoreutils-2.0.1/sepolgen-1.0.0/src/sepolgen/Makefile
--- nsasepolgen/src/sepolgen/Makefile 2007-02-07 12:12:15.000000000 -0500
+++ policycoreutils-2.0.1/sepolgen-1.0.0/src/sepolgen/Makefile 2007-02-15 15:56:05.000000000 -0500
@@ -1,4 +1,4 @@
-PYTHONLIBDIR ?= `python -c "from distutils.sysconfig import *; print get_python_lib()"`
+PYTHONLIBDIR ?= $(shell python -c "from distutils.sysconfig import *; print get_python_lib(1)")
PACKAGEDIR ?= $(DESTDIR)/$(PYTHONLIBDIR)/sepolgen
install:
diff --exclude-from=exclude -N -u -r nsasepolgen/src/sepolgen/refparser.py policycoreutils-2.0.1/sepolgen-1.0.0/src/sepolgen/refparser.py
--- nsasepolgen/src/sepolgen/refparser.py 2007-02-07 12:12:15.000000000 -0500
+++ policycoreutils-2.0.1/sepolgen-1.0.0/src/sepolgen/refparser.py 2007-02-15 15:16:09.000000000 -0500
@@ -691,11 +691,13 @@
output.write(msg)
def parse_file(f, module, spt=None):
- fd = open(f)
- txt = fd.read()
- fd.close()
try:
+ fd = open(f)
+ txt = fd.read()
+ fd.close()
parse(txt, module, spt)
+ except IOError, e:
+ return
except ValueError, e:
raise ValueError("error parsing file %s: %s" % (f, str(e)))
next reply other threads:[~2007-02-20 14:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-20 14:55 Daniel J Walsh [this message]
2007-02-21 17:14 ` sepolgen fixes Karl MacMillan
2007-02-21 17:22 ` Stephen Smalley
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=45DB0BED.5050205@redhat.com \
--to=dwalsh@redhat.com \
--cc=kmacmill@redhat.com \
--cc=sds@tycho.nsa.gov \
--cc=selinux@tycho.nsa.gov \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.