pam_radius_auth on Mac OS 10.6.2 - patch attached
Frank Cusack
fcusack at fcusack.com
Thu Feb 4 03:42:51 CET 2010
On February 3, 2010 4:24:07 PM +0100 Stefan Winter
<stefan.winter at restena.lu> wrote:
> Please review the patch - especially where entropy in the random number
> generater is reduced.
Pay attention to your comments. It's important to get spellings of
things like gettimeofday() right even in comments. (The errors in
english are fine and I'm not criticizing that at all.)
It's bad to use platform-specific defines the way you have. Rather
than imply that MacOS means no gettimeofday(), test for gettimeofday()
and your macro should be based on that.
#ifndef HAVE_GETTIMEOFDAY
...
#endif
Worst case, if you can't test for gettimeofday(), your MACOS #define
should set/clear HAVE_GETTIMEOFDAY. At least then there is only one
place it would have to be changed in the future.
something.h:
#ifndef MACOS
#define HAVE_GETTIMEOFDAY
#endif
I only reviewed your patch by looking at the patch itself; I didn't
look at it in context, so this isn't 100% but I think the so-called
RNG there is pretty ineffective. So I wouldn't complain about your
change, but yours looks to be really bad! uninitialized is just as
likely to be a constant value as it is to be a random value.
-frank
More information about the Freeradius-Devel
mailing list