freebsd-nq/usr.sbin/rpc.yppasswdd
Warner Losh 02da3f2280 yppasswdd assumed that a struct x_master_passwd is type punable to a
struct passwd.  This is not the case when sizeof(unsigned long) !=
sizeof(time_t).  Write a dinky function to do the assignment instead
of relying on the punning.  This does slow things down a little (1
extra function call, 11 pointer or int assignments), but is much safer
and machines have been fast enough since the mid 1990s that nobody
will notice the difference.

time_t is a 64-bits int on arm and mips.  Before this change, arm was
silently broken.  I guess there aren't that many ARM machines running
master YP domain servers. :)

The client side doesn't assume this type punning, so it doesn't need
to be fixed.
2009-02-18 22:27:46 +00:00
..
Makefile
rpc.yppasswdd.8
yppasswd_private.x
yppasswdd_extern.h
yppasswdd_main.c
yppasswdd_server.c yppasswdd assumed that a struct x_master_passwd is type punable to a 2009-02-18 22:27:46 +00:00
yppwupdate