Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Feb 2009 22:27:46 +0000 (UTC)
From:      Warner Losh <imp@FreeBSD.org>
To:        cvs-src-old@freebsd.org
Subject:   cvs commit: src/usr.sbin/rpc.yppasswdd yppasswdd_server.c
Message-ID:  <200902182228.n1IMS0Li032156@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
imp         2009-02-18 22:27:46 UTC

  FreeBSD src repository

  Modified files:
    usr.sbin/rpc.yppasswdd yppasswdd_server.c 
  Log:
  SVN rev 188766 on 2009-02-18 22:27:46Z by imp
  
  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.
  
  Revision  Changes    Path
  1.30      +21 -3     src/usr.sbin/rpc.yppasswdd/yppasswdd_server.c



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200902182228.n1IMS0Li032156>