From bb7884021f31e7bb0a7e6945c6d0039ffd0256b5 Mon Sep 17 00:00:00 2001 From: Sam Hartman Date: Sat, 2 Nov 1996 05:43:35 +0000 Subject: [PATCH] * Fix broken comment ; it's setuid() that must suceed not the setleuid equivelent under AIX. * You want to destroy v4 tickets if you are converting them just as if you are getting them directly. * Attempt to be more reasonable about printing out errors in in_tkt. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@9283 dc483132-0cff-0310-8789-dd5450dbe970 --- src/appl/bsd/ChangeLog | 11 +++++++++++ src/appl/bsd/login.c | 6 +++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/appl/bsd/ChangeLog b/src/appl/bsd/ChangeLog index 494259188..1cf3eb8c7 100644 --- a/src/appl/bsd/ChangeLog +++ b/src/appl/bsd/ChangeLog @@ -1,3 +1,14 @@ +Fri Nov 1 23:11:21 1996 Sam Hartman + + * login.c: print out system error if -1 returns. + (destroy_tickets): Destroy krb4 tickets if we are converting as + well as just for initial tickets. + +Fri Nov 1 21:00:01 1996 Sam Hartman + + * login.c: Have the this call must succeed comment before setuid, + not the AIX login uid setting. + Thu Oct 31 22:14:00 1996 Sam Hartman * krlogind.c (doit): Remove tab3 because it isn't very useful and diff --git a/src/appl/bsd/login.c b/src/appl/bsd/login.c index 1f7240348..26d56348b 100644 --- a/src/appl/bsd/login.c +++ b/src/appl/bsd/login.c @@ -998,7 +998,7 @@ destroy_tickets() krb5_cc_destroy (c, cache); } #ifdef KRB4_GET_TICKETS - if (login_krb4_get_tickets) + if (login_krb4_get_tickets||login_krb4_convert) dest_tkt(); #endif /* KRB4_GET_TICKETS */ } @@ -1724,11 +1724,11 @@ int rewrite_ccache = 1; /*try to write out ccache*/ setluid((uid_t) pwd->pw_uid); } #endif /* HAVE_SETLUID */ - /* This call MUST succeed */ #ifdef _IBMR2 setuidx(ID_LOGIN, pwd->pw_uid); #endif + /* This call MUST succeed */ if(setuid((uid_t) pwd->pw_uid) < 0) { perror("setuid"); sleepexit(1); @@ -1762,7 +1762,7 @@ int rewrite_ccache = 1; /*try to write out ccache*/ if (retval != KSUCCESS) { syslog(LOG_ERR, "%s while re-initializing V4 ticket cache as user", - error_message(retval)); + error_message((retval == -1)?errno:retval)); goto skip_output_tkfile; } retval = krb_save_credentials(save_v4creds.service, -- 2.26.2