diff options
author | Hans Insulander <hin@cvs.openbsd.org> | 2001-05-14 13:58:07 +0000 |
---|---|---|
committer | Hans Insulander <hin@cvs.openbsd.org> | 2001-05-14 13:58:07 +0000 |
commit | 6b6658feb17be0d5df98012da8153afd520e6b32 (patch) | |
tree | a7620703403e2d300bbc54ed3ffb305bd92927a6 /kerberosIV | |
parent | 241816854b8049967c23ee2c6a2f80a65a43c28a (diff) |
Look for `krb.extra' in /etc/kerberosIV, as documented.
I'm really amazed noone has reported this...
Diffstat (limited to 'kerberosIV')
-rw-r--r-- | kerberosIV/src/lib/krb/getfile.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/kerberosIV/src/lib/krb/getfile.c b/kerberosIV/src/lib/krb/getfile.c index 12ad5c397d3..42e6c89a9f3 100644 --- a/kerberosIV/src/lib/krb/getfile.c +++ b/kerberosIV/src/lib/krb/getfile.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 1996, 1997, 1998 Kungliga Tekniska Högskolan + * Copyright (c) 1995 - 2000 Kungliga Tekniska Högskolan * (Royal Institute of Technology, Stockholm, Sweden). * All rights reserved. * @@ -33,7 +33,7 @@ #include "krb_locl.h" -RCSID("$KTH: getfile.c,v 1.5 1999/12/02 16:58:42 joda Exp $"); +RCSID("$KTH: getfile.c,v 1.5.2.1 2000/12/07 17:04:48 assar Exp $"); static int is_suid(void) @@ -53,7 +53,7 @@ get_file(const char **files, int num, const char *file, char *buf, size_t len) { const char *p, **q; int i = 0; - if(!is_suid() && (p = getenv("KRBCONFDIR"))){ + if(getuid() != 0 && !is_suid() && (p = getenv("KRBCONFDIR"))){ if(num == i){ snprintf(buf, len, "%s/%s", p, file); return 0; @@ -86,6 +86,7 @@ krb_get_krbrealms(int num, char *buf, size_t len) int krb_get_krbextra(int num, char *buf, size_t len) { - const char *files[] = { "/etc/krb.extra", NULL }; + const char *files[] = { "/etc/kerberosIV/krb.extra", "/etc/krb.extra", + NULL }; return get_file(files, num, "krb.extra", buf, len); } |