[PC-BSD Commits] r18007 - pcbsd/current/src-sh/pc-adctl/krb
svn at pcbsd.org
svn at pcbsd.org
Mon Jul 30 16:07:56 PDT 2012
Author: johnh
Date: 2012-07-30 23:07:56 +0000 (Mon, 30 Jul 2012)
New Revision: 18007
Modified:
pcbsd/current/src-sh/pc-adctl/krb/krbconf.c
Log:
Let's complicate things further, magic to insert a binding inside of a
binding within braces.. and have it work correctly.
Modified: pcbsd/current/src-sh/pc-adctl/krb/krbconf.c
===================================================================
--- pcbsd/current/src-sh/pc-adctl/krb/krbconf.c 2012-07-30 22:27:43 UTC (rev 18006)
+++ pcbsd/current/src-sh/pc-adctl/krb/krbconf.c 2012-07-30 23:07:56 UTC (rev 18007)
@@ -495,6 +495,27 @@
last = fe;
}
+ if (last != NULL && last->type == KRB_ENTRY_BINDING_START) {
+ int bs = 0, found = 0;
+ struct krb_entry *node = last;
+
+ printf("last: %s (%d)\n", last->keb_name, last->type);
+
+ TAILQ_FOREACH_SAFE(fe, &fentries, fentries, fetmp) {
+ if (fe == node)
+ found = 1;
+ if (fe->type == KRB_ENTRY_BINDING_START)
+ bs++;
+ if (fe->type == KRB_ENTRY_BINDING_END)
+ bs--;
+
+ last = fe;
+
+ if (found == 1 && bs == 0)
+ break;
+ }
+ }
+
if (last != NULL) {
TAILQ_INSERT_AFTER(&fentries, last, ke, fentries);
if (end != NULL)
More information about the Commits
mailing list