+Sun Nov 12 04:48:41 1995 Mark W. Eichin <eichin@cygnus.com>
+
+ * forward.c: set KRB5_DEFAULT_LIFE to 10 hours, not 8.
+ * forward.c (rd_and_store_for_creds): construct correct cache name
+ for forwarded tickets (based on tty name if available) and drop it
+ into the environment so login notices it.
+
Mon Oct 9 23:03:48 1995 Sam Hartman <hartmans@tertius.mit.edu>
* kerberos5.c: make session_key a pointer, and use
#include "k5-int.h"
+extern char *line; /* see sys_term.c */
+
/* Decode, decrypt and store the forwarded creds in the local ccache. */
krb5_error_code
rd_and_store_for_creds(context, auth_context, inbuf, ticket, lusername)
if (retval = krb5_rd_cred(context, auth_context, inbuf, &creds, NULL))
return(retval);
- sprintf(ccname, "FILE:/tmp/krb5cc_%d", pwd->pw_uid);
+ if (*line) {
+ /* code from appl/bsd/login.c since it will do the same */
+ sprintf(ccname, "FILE:/tmp/krb5cc_%s", strrchr(line, '/')+1);
+ } else {
+ /* since default will be based on uid and we haven't changed yet */
+ sprintf(ccname, "FILE:/tmp/krb5cc_%d", pwd->pw_uid);
+ }
+ setenv(KRB5_ENV_CCNAME, ccname, 1);
if (retval = krb5_cc_resolve(context, ccname, &ccache))
goto cleanup;
}
-#define KRB5_DEFAULT_LIFE 60*60*8 /* 8 hours */
+#define KRB5_DEFAULT_LIFE 60*60*10 /* 10 hours */
/* helper function: convert flags to necessary KDC options */
#define flags2options(flags) (flags & KDC_TKT_COMMON_MASK)
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN I<F ADVISED OF THE POSSIBILITY OF
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/