Date: Thu, 31 Dec 1998 18:00:13 +0900 (JST) From: greg@greg.rim.or.jp To: FreeBSD-gnats-submit@FreeBSD.ORG Cc: greg@greg.rim.or.jp Subject: bin/9252: enviroment value "KRBTKFILE" is not set by login Message-ID: <199812310900.SAA06847@izanami.greg.rim.or.jp>
index | next in thread | raw e-mail
>Number: 9252
>Category: bin
>Synopsis: login program "login" don't set KRBTKFILE collectory
>Confidential: yes
>Severity: serious
>Priority: high
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Thu Dec 31 03:00:01 PST 1998
>Last-Modified:
>Originator: Kensaku Masuda
>Organization:
>Release: FreeBSD 2.2.8-STABLE i386
>Environment:
Enable KerberosIV enviroment
>Description:
Program "login" call a function klogin(), And function returning a
string by krbtkfile_env.
char tkt_location[MAXPATHLEN];
.
.
.
if (strcmp(instance, "root") != 0)
(void)sprintf(tkt_location, "%s%d", TKT_ROOT, pw->pw_uid);
else {
(void)sprintf(tkt_location, "%s_root_%d", TKT_ROOT, pw->pw_uid);
krbtkfile_env = tkt_location;
}
And krbtkfile_env is referenced outside of this function. So value is broken
at referencing time.
tkt_location must be static or allocated region on memory.
>How-To-Repeat:
>Fix:
--- klogin.c.orig Thu Dec 31 17:40:48 1998
+++ klogin.c Thu Dec 31 17:41:02 1998
@@ -68,7 +68,7 @@
{
int kerror;
char realm[REALM_SZ], savehost[MAXHOSTNAMELEN];
- char tkt_location[MAXPATHLEN];
+static char tkt_location[MAXPATHLEN];
char *krb_get_phost();
extern int noticketsdontcomplain;
>Audit-Trail:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199812310900.SAA06847>
