| Summary: | Krb4/AFS token passing doesn't work because of mkstemp | ||
|---|---|---|---|
| Product: | Portable OpenSSH | Reporter: | Kevin Sullivan <ksulliva> |
| Component: | sshd | Assignee: | OpenSSH Bugzilla mailing list <openssh-bugs> |
| Status: | CLOSED DUPLICATE | ||
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | -current | ||
| Hardware: | All | ||
| OS: | Linux | ||
Please search existing bug reports before submitting new bugs *** This bug has been marked as a duplicate of 44 *** Mass change of RESOLVED bugs to CLOSED |
In auth-krb4.c, in krb4_init(), we have: if ((fd = mkstemp(authctxt->krb4_ticket_file)) != -1) { which tries to create a temporary file to hold kerberos tickets. This file is created some lines above by: snprintf(authctxt->krb4_ticket_file, MAXPATHLEN, "%s%u_%ld", So, mkstemp() is passes something like "/tmp/tkt9036_6294", with no Xs at the end. On a RedHat 8.0, mkstemp() will fail if the file template does not end with at least 6 Xs. To fix this, replace the mkstemp line with: if ((fd = open(authctxt->krb4_ticket_file, O_RDWR|O_CREAT|O_EXCL, 0x600)) != -1) {