[1461] in Kerberos-V5-bugs

home help back first fref pref prev next nref lref last post

Re: Kerberos 5-B4-pl3 bug report (lib/krb5/ccache/file/fcc_init.c)

daemon@ATHENA.MIT.EDU (Craig Leres)
Sat Jun 10 00:16:21 1995

To: "Theodore Ts'o" <tytso@MIT.EDU>
Cc: krb5-bugs@MIT.EDU, hobbit@asylum.sf.ca.us, mike@fionn.lbl.gov
In-Reply-To: Your message of Fri, 09 Jun 95 23:58:18 Q.
Date: Fri, 09 Jun 95 21:16:11 PDT
From: Craig Leres <leres@ee.lbl.gov>


> Thanks for the patch, although I think there's a bug in your suggested
> change.  The two lines I've marked should be deleted.....

You're right; sorry about that.

		Craig
------
*** kerberosV.virgin/src/lib/krb5/ccache/file/fcc_init.c	Thu Sep 22 18:30:15 1994
--- kerberosV/src/lib/krb5/ccache/file/fcc_init.c	Fri Jun  9 21:14:42 1995
***************
*** 45,51 ****
     krb5_ccache id;
     krb5_principal princ;
  {
!      int ret = KRB5_OK;
  
       MAYBE_OPEN(id, FCC_OPEN_AND_ERASE);
  
--- 45,52 ----
     krb5_ccache id;
     krb5_principal princ;
  {
!      krb5_error_code status = KRB5_OK;
!      int ret;
  
       MAYBE_OPEN(id, FCC_OPEN_AND_ERASE);
  
***************
*** 55,68 ****
       ret = fchmod(((krb5_fcc_data *) id->data)->fd, S_IREAD | S_IWRITE);
  #endif
       if (ret == -1) {
! 	 ret = krb5_fcc_interpret(errno);
! 	 MAYBE_CLOSE(id, ret);
! 	 return ret;
       }
!      krb5_fcc_store_principal(id, princ);
  
!      MAYBE_CLOSE(id, ret);
!      return ret;
  }
  
  
--- 56,69 ----
       ret = fchmod(((krb5_fcc_data *) id->data)->fd, S_IREAD | S_IWRITE);
  #endif
       if (ret == -1) {
! 	 status = krb5_fcc_interpret(errno);
! 	 MAYBE_CLOSE(id, status);
! 	 return status;
       }
!      status = krb5_fcc_store_principal(id, princ);
  
!      MAYBE_CLOSE(id, status);
!      return status;
  }
  
  

home help back first fref pref prev next nref lref last post