<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">I'm not too familiar with apparmor
rules any more, but an alternative approach might be to try and
break things on '/'.<br>
<br>
If this is possible without too much difficulty, it might be a
more approachable tree<br>
{ "bin" {"bash" = "ixr}}<br>
<br>
or from augtool 'get /files/etc/apparmor/<stuff>/bin/bash'<br>
<br>
This seems a bit more in line with your original thoughts. Though
I'm not sure if the end product would make much sense..... the
scope might look very odd if '<stuff>' was itself
'bash.rules' or something...<br>
<br>
Pat<br>
<br>
On 03/12/2013 08:22 AM, Raphaël Pinson wrote:<br>
</div>
<blockquote
cite="mid:CACE7ikEoXLtC4W6bfSmdi05K8-ZU_Qnm8q6Vc4jwkuf7jXSLsw@mail.gmail.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<div dir="ltr">
<div>
<div>Hi Smetana,<br>
<br>
<br>
</div>
The '/' character is illegal in node names, it can only be
used in values. In this case, you might actually want to use a
seq for node names, and store the path as a value, generating
a tree like:<br>
<br>
</div>
{ "1" = "/bin/bash" { "value" = "ixr" } }<br>
<br>
<br>
Regards,<br>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On Tue, Mar 12, 2013 at 2:15 PM, Serge
Smetana <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:serge.smetana@gmail.com" target="_blank">serge.smetana@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<br>
I'm trying to create lens for apparmor.<br>
Simple entry for apparmor rule is something like<br>
<br>
/bin/bash ixr,<br>
<br>
But if I describe lens as<br>
<br>
let rule = [ Util.indent . key Rx.fspath . Sep.space .
store Rx.word<br>
. Util.del_str "," . Util.eol ]<br>
<br>
I get the following exception:<br>
<br>
Failed to compile rule<br>
exception: The key regexp /[^ \t\n]+/ matches a '/'<br>
<br>
Is it possible to use filesystem path as a key?<br>
<br>
<br>
<br>
Thanks,<br>
Serge<br>
<br>
_______________________________________________<br>
augeas-devel mailing list<br>
<a moz-do-not-send="true"
href="mailto:augeas-devel@redhat.com">augeas-devel@redhat.com</a><br>
<a moz-do-not-send="true"
href="https://www.redhat.com/mailman/listinfo/augeas-devel"
target="_blank">https://www.redhat.com/mailman/listinfo/augeas-devel</a><br>
</blockquote>
</div>
<br>
<br clear="all">
<br>
-- <br>
Raphaël Pinson<br>
Administrateur Systèmes & Réseaux<br>
Camptocamp France<br>
Savoie Technolac<br>
BP 352<br>
48, avenue du Lac du Bourget<br>
73372 Le Bourget du Lac, Cedex<br>
<a moz-do-not-send="true" href="http://www.camptocamp.com"
target="_blank">www.camptocamp.com</a><br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
augeas-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:augeas-devel@redhat.com">augeas-devel@redhat.com</a>
<a class="moz-txt-link-freetext" href="https://www.redhat.com/mailman/listinfo/augeas-devel">https://www.redhat.com/mailman/listinfo/augeas-devel</a></pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="78">--
Pat Riehecky
Scientific Linux developer
<a class="moz-txt-link-freetext" href="http://www.scientificlinux.org/">http://www.scientificlinux.org/</a></pre>
</body>
</html>