[OpenAFS] Fwd: Bug#415952: openafs-client: klog fails with an "bus access error" for password longer then 8 symbols.

Russ Allbery rra@stanford.edu
Wed, 27 Jun 2007 07:46:43 -0700


Marcus Watts <mdw@spam.ifs.umich.edu> writes:

> Anyways, to take a stab in the dark:
> pwlen.gt.8 characters goes to StringToKey (instead of Andrew_StringToKey),
> (in src/kauth/client.c).  This calls des_key_sched with 2 parms,
> char temp_key[8] and des_key_schedule schedule.  Somewhere inside
> the depths of des_key_schedule, it is indeed assumed that the
> key schedule can be accessed as integers.  Presumably this is
> what is failing.

> So, key_schedule in stock 1.4.4 is defined this way:
> typedef struct des_ks_struct { des_cblock _; } des_key_schedule[16];
> That is, an array of 16 blocks of 8 characters.  The C compiler will
> indeed only give that character alignment, so a problem is quite possible.
> A relatively simple fix is to instead do this:
> typedef struct des_ks_struct { int _[8/sizeof(int)]; } des_key_schedule[16];
> which will give it exactly the same size but require int alignment, which
> is what is required.  This should compile and work without errors; the
> fieldname itself is never used.

Unfortunately, it looks like this wasn't the problem.  The user is still
having the same problem even with this patch.

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>