diff --git a/refpolicy/Changelog b/refpolicy/Changelog index 5306a991..a78314e4 100644 --- a/refpolicy/Changelog +++ b/refpolicy/Changelog @@ -1,3 +1,4 @@ + * Fix segenxml to handle modules with no interfaces. * Rename ipsec connect interface for consistency. * Add missing parts of unix stream socket connect interface of ipsec. diff --git a/refpolicy/support/segenxml.py b/refpolicy/support/segenxml.py index 7222249e..43a40fd3 100755 --- a/refpolicy/support/segenxml.py +++ b/refpolicy/support/segenxml.py @@ -215,9 +215,13 @@ def getModuleXML(file_name): temp_buf = [] module_buf.append("\n") + # The file had no interfaces, just a header. + if phase == "get header": + module_buf += temp_buf + # If there are XML comments at the end of the file, they arn't # attributed to anything. These are ignored. - if len(temp_buf): + elif len(temp_buf): warning("orphan XML comments at bottom of file %s" % file_name) module_buf.append("\n")