Re: A filename to label translation daemon

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 08/10/2012 10:17 AM, Lennart Poettering wrote:
> On Fri, 10.08.12 16:11, Lennart Poettering (lennart@xxxxxxxxxxxxxx) wrote:
> 
>>> * Your mmap file is in some data format - you can make up your own,
>>> but I like using
>>> http://developer.gnome.org/glib/stable/glib-GVariant.html * Check the
>>> timestamp on the regexp text file versus the cached copy, if newer, use
>>> the text file * Otherwise, mmap the cached blob, loop through each
>>> regexp, passing a pointer to the mmap cache file for regexec()
>> 
>> Well, the main bits are not actually stored in regex_t afaics. They are 
>> stored in regex_t::buffer. But that makes this kind of caching really 
>> difficult, because that is a pointer and storing a pointer in an mmap() 
>> region makes no sense.
>> 
>> Dunno, maybe another regex library is more suitable for this...
> 
> PCRE appears to be perfectly suited for this. See pcreprecompile(3). They
> have an interface explicitly designed for this. And PCRE is used by
> numerous projects already, so should be safe to use for SELinux too?
> 
> Lennart
> 
This seems like the best solution?  If upstream will accept it.  We could
rebuild the regex data when semanage modifies the file context.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlApOxEACgkQrlYvE4MpobOtgwCdGLgwt60AY3L+pHuQzQnrREEW
eQ4AoIgVktEglFqzInQJSZpUQLfEFk9H
=YWaU
-----END PGP SIGNATURE-----

--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@xxxxxxxxxxxxx with
the words "unsubscribe selinux" without quotes as the message.


[Index of Archives]     [Selinux Refpolicy]     [Linux SGX]     [Fedora Users]     [Fedora Desktop]     [Yosemite Photos]     [Yosemite Camping]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux