[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

No Subject



                tmp = malloc(len);
                snprintf(tmp, len, "%s/root", invokinguser);
                ret = krb5_parse_name(context, tmp, &princ);
                free(tmp);
        } else
                ret = krb5_parse_name(context, username, &princ);
[ ... ]

invokinguser is set by su and stuff but not by login. Entered OpenBSD
3 years and 5 months ago with this commit:

http://www.openbsd.org/cgi-bin/cvsweb/src/libexec/login_krb5/login_krb5.c?rev=1.9&content-type=text/x-cvsweb-markup

... How about not logging in as root to start with?

Or just do something like this:

--- libexec/login_krb5/login_krb5.c~    Sun Dec 19 22:45:59 2004
+++ libexec/login_krb5/login_krb5.c     Sun Dec 19 22:45:59 2004
@@ -164,7 +164,7 @@
                exit(1);
        }
 
-       if (strcmp(username, "root") == 0) {
+       if (invokinguser != NULL && (strcmp(username, "root") == 0)) {
                char *tmp;
                int len = strlen(invokinguser)+6;


-- 
/Gabriel