Imported Upstream version 1.12.0
[platform/upstream/augeas.git] / lenses / semanage.aug
1 (*
2 Module: Semanage
3    Parses /etc/selinux/semanage.conf
4
5 Author:
6    Pino Toscano <ptoscano@redhat.com>
7
8 About: License
9    This file is licenced under the LGPL v2+, like the rest of Augeas.
10
11 About: Configuration files
12    This lens applies to /etc/selinux/semanage.conf. See <filter>.
13
14 About: Examples
15    The <Test_Semanage> file contains various examples and tests.
16 *)
17
18 module Semanage =
19   autoload xfm
20
21 let comment = IniFile.comment "#" "#"
22 let sep = IniFile.sep "=" "="
23 let empty = IniFile.empty
24 let eol = IniFile.eol
25
26 let entry = IniFile.entry IniFile.entry_re sep comment
27           | empty
28
29 let title = IniFile.title_label "@group" (IniFile.record_re - /^end$/)
30 let record = [ title . entry+ . Util.del_str "[end]" . eol ]
31
32 let lns = (entry | record)*
33
34 (* Variable: filter *)
35 let filter = incl "/etc/selinux/semanage.conf"
36
37 let xfm = transform lns filter