Hi Pat,<br><br>Sorry for the long delay in replying to you.<br><br><br><div class="gmail_quote">On Thu, Apr 19, 2012 at 11:47 PM, Pat Riehecky <span dir="ltr"><<a href="mailto:riehecky@fnal.gov" target="_blank">riehecky@fnal.gov</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5"><br></div></div>
(Apologies for the return of this old thread, but the history seemed to help provide context)<br>
<br>
I've almost got this working the way I think it should and reading my site's krb5.conf.  The only remaining issue I'm running into is with 'default_tgs_enctypes'.  I'd love to get it into a sequence, but I can't seem to figure out how.  The attached patch gets me really close, where I've got a sequence called 'type' under default_tgs_enctypes, but the extra part of the tree seems to be extra rather than useful, plus it seems to make setting those things a bit messy when it wasn't before - Was /files/etc/krb5.conf/<u></u>libdefaults/default_tgs_<u></u>enctypes = 'thing' my changes make /files/etc/krb5.conf/<u></u>libdefaults/default_tgs_<u></u>enctypes/type[x] = 'thing' which is not right.....<br>

<br></blockquote><div><br><br>The patch you attached leads to an ambiguity:<br><br>$ augparse -I . krb5.aug <br>Syntax error in lens definition<br>krb5.aug:49.0-53.87:Failed to compile libdefaults<br>krb5.aug:47.26-.71:exception: ambiguous iteration<br>
      Iterated regexp: /([a-zA-Z0-9]+-[a-zA-Z0-9]+-[a-zA-Z0-9]+)([ \t,]*)/<br>      'A-A-AAA-A-A' can be split into<br>      'A-A-A|=|AA-A-A'<br><br>     and<br>      'A-A-AA|=|A-A-A'<br><br>    Iterated lens: krb5.aug:47.26-.70:<br>
<br><br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
If I may ask three questions:<br>
<br>
So what can I do to get the sequence to populate when there are multiple items, but not when there are not?<br>
And how do I use the regex match for the sequence name?<br>
Is my attempt at a fix even on the right track?<br></blockquote><div><br><br>If you mean to generate an array only where there is more than one element, and use a fix value otherwise, dynamically, then it's a rather bad idea, since it will make it hard to add a second value to an existing unique one.<br>
<br>However, if supporting arrays vs single values is linked to specific keys, they you could explicitely split the cases to have a lens for array entries and another lens for simple entries. This is already done in quite a few modules.</div>
<br><br>Raphaël<br></div><br><br>