[188] in Kerberos-V5-bugs

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

kdb5_edit load_db failure

daemon@ATHENA.MIT.EDU (Nov-William H Rahe)
Mon Aug 19 12:16:46 1991

Date: Mon, 19 Aug 91 09:45:32 MDT
From: whrahe@somnet.sandia.gov (Nov-William H Rahe)
To: krb5-bugs@ATHENA.MIT.EDU

The load_db function was failing on a Sun 4/110.  The problem involved the
incrementing of an unsigned char pointer within the fscanf for the
key contents.  I have been informed informally, that this is not allowed
in the fscanf call (?).   At any rate the following changes have been made
to dump.c:
diff dump.c_orig dump.c ==>
195a196
>       int     align;
252c253
<                               "While allocating speace for name");
---
>                               "While allocating space for name");
259c260
<                               "While allocating speace for name");
---
>                               "While allocating space for mod_name");
273c274
<                               "While allocating speace for name");
---
>                               "While allocating space for key contents");
278c279
<                       if (fscanf(f,"%02x", entry.key.contents+i) != 1) {
---
>                       if (fscanf(f,"%02x", &align) != 1) {
283a285
>                       entry.key.contents[i] = align;
304c306
<                                       "While allocating speace for the salt");
---
>                                       "While allocating space for the salt");
*******************************************************************************
Also: Noted that kdb5_edit delent function was inconsistant.  Problem was
in princ_exists.  As written princ_exists returns a 0 if the principal does
not exist and also returns a 0 if the entry.kvno is 0.  I modified
princ_exists to return nprincs if the principal exists.
diff kdb5_edit.c_orig kdb5_edit.c ==>
271d270
<       vno = entry.kvno;
273c272
<       return(vno);
---
>       return(nprincs);
*******************************************************************************
                                                Bill

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