diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-12-02 06:28:23 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-12-02 06:28:23 +0000 |
commit | b89e8ede0240fb2c7cabd1277f422647462a567b (patch) | |
tree | 0aa89e4248b38c58de2f079e1b7cea4c52f5c286 /kerberosIV | |
parent | 606cc2e85f23f2919eb02b48385df8bca0119cfc (diff) |
The change art made causes infinite recursion. This patches it until he fixes it right
Diffstat (limited to 'kerberosIV')
-rw-r--r-- | kerberosIV/krb/get_krbrlm.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/kerberosIV/krb/get_krbrlm.c b/kerberosIV/krb/get_krbrlm.c index 760d5c232ec..d771fa878eb 100644 --- a/kerberosIV/krb/get_krbrlm.c +++ b/kerberosIV/krb/get_krbrlm.c @@ -51,11 +51,12 @@ krb_get_lrealm_f(char *r, int n, const char *fname) p[strcspn(p, " \t\r\n")] = 0; p[REALM_SZ - 1] = 0; strcpy(r, p); - ret = KSUCCESS; + if (*p != '#') + ret = KSUCCESS; } fclose(f); } - return (*r == '#' ? KFAILURE : ret); + return ret; } int @@ -81,6 +82,9 @@ krb_get_lrealm(char *r, int n) if (krb_get_lrealm_f(r, n, files[i]) == KSUCCESS) return KSUCCESS; + if (r[0] == '#') + return(KFAILURE); + /* If nothing else works try LOCALDOMAIN, if it exists */ if (n == 1) { |