[PC-BSD Commits] r18002 - pcbsd/current/src-sh/pc-adctl/krb
svn at pcbsd.org
svn at pcbsd.org
Mon Jul 30 14:58:58 PDT 2012
Author: johnh
Date: 2012-07-30 21:58:58 +0000 (Mon, 30 Jul 2012)
New Revision: 18002
Modified:
pcbsd/current/src-sh/pc-adctl/krb/krbconf.c
Log:
Fixed several bugs, the biggest one being to be case sensitive.
Modified: pcbsd/current/src-sh/pc-adctl/krb/krbconf.c
===================================================================
--- pcbsd/current/src-sh/pc-adctl/krb/krbconf.c 2012-07-30 21:12:20 UTC (rev 18001)
+++ pcbsd/current/src-sh/pc-adctl/krb/krbconf.c 2012-07-30 21:58:58 UTC (rev 18002)
@@ -262,7 +262,7 @@
count = 0;
TAILQ_FOREACH_SAFE(ke, &krbconf, entries, ketmp) {
if (ke->type == KRB_ENTRY_SECTION &&
- strcasecmp(ke->kes_name, name) == 0) {
+ strcmp(ke->kes_name, name) == 0) {
if (index < 0 || index == count) {
entry = ke;
break;
@@ -301,7 +301,7 @@
TAILQ_FOREACH_SAFE(ke, el, entries, ketmp) {
if ((ke->type == KRB_ENTRY_BINDING ||
ke->type == KRB_ENTRY_BINDING_START) &&
- strcasecmp(ke->keb_name, name) == 0) {
+ strcmp(ke->keb_name, name) == 0) {
if (index < 0 || index == count) {
entry = ke;
break;
@@ -486,7 +486,7 @@
switch (kp->type) {
case KRB_ENTRY_SECTION:
- if (kp->kes_nbindings > 0 && ke->type != KRB_ENTRY_BINDING_START) {
+ if (kp->kes_nbindings > 1 && ke->type != KRB_ENTRY_BINDING_START) {
struct krb_entry *fe, *fetmp, *last = NULL;
TAILQ_FOREACH_SAFE(fe, &kp->kes_bindings, entries, fetmp) {
@@ -501,7 +501,7 @@
TAILQ_INSERT_AFTER(&fentries, ke, end, fentries);
}
- } else if (kp->kes_nbindings > 0 && ke->type == KRB_ENTRY_BINDING_START) {
+ } else if (kp->kes_nbindings > 1 && ke->type == KRB_ENTRY_BINDING_START) {
struct krb_entry *fe, *fetmp, *last = NULL;
int section = 0;
@@ -953,14 +953,17 @@
xfree(&infile);
xfree(&outfile);
- yyparse();
+ if (infile != NULL)
+ yyparse();
do_modifications();
write_krb5_conf();
krb5_conf_free();
- fclose(yyin);
- fclose(yyout);
+ if (yyin != NULL)
+ fclose(yyin);
+ if (yyout != NULL)
+ fclose(yyout);
return (0);
}
More information about the Commits
mailing list