# File lib/puppet/provider/selmodule/semodule.rb, line 80
 80:   def selmodversion_file
 81:     magic = 0xF97CFF8F
 82: 
 83:     filename = selmod_name_to_filename
 84:     mod = File.new(filename, "r")
 85: 
 86:     (hdr, ver, numsec) = mod.read(12).unpack('LLL')
 87: 
 88:     raise Puppet::Error, "Found #{hdr} instead of magic #{magic} in #{filename}" if hdr != magic
 89: 
 90:     raise Puppet::Error, "Unknown policy file version #{ver} in #{filename}" if ver != 1
 91: 
 92:     # Read through (and throw away) the file section offsets, and also
 93:     # the magic header for the first section.
 94: 
 95:     mod.read((numsec + 1) * 4)
 96: 
 97:     ## Section 1 should be "SE Linux Module"
 98: 
 99:     selmod_readnext(mod)
100:     selmod_readnext(mod)
101: 
102:     # Skip past the section headers
103:     mod.read(14)
104: 
105:     # Module name
106:     selmod_readnext(mod)
107: 
108:     # At last!  the version
109: 
110:     v = selmod_readnext(mod)
111: 
112:     self.debug "file version #{v}"
113:     v
114:   end