Author: lha Date: 2007-07-16 17:10:00 +0000 (Mon, 16 Jul 2007) New Revision: 770
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=lorikeet&rev=770 Log: Merged with Heimdal svn revision 21591 Modified: trunk/heimdal/ChangeLog trunk/heimdal/configure.in trunk/heimdal/include/Makefile.am trunk/heimdal/lib/hx509/ChangeLog trunk/heimdal/lib/hx509/Makefile.am trunk/heimdal/lib/roken/ChangeLog trunk/heimdal/lib/roken/socket_wrapper.c trunk/heimdal/lib/roken/socket_wrapper.h Changeset: Modified: trunk/heimdal/ChangeLog =================================================================== --- trunk/heimdal/ChangeLog 2007-07-16 10:30:22 UTC (rev 769) +++ trunk/heimdal/ChangeLog 2007-07-16 17:10:00 UTC (rev 770) @@ -1,5 +1,7 @@ 2007-07-16 Love H�rnquist �strand <[EMAIL PROTECTED]> + * include/Makefile.am: Add krb_err.h. + * kdc/set_dbinfo.c: Print acl file too. * kdc/kerberos4.c: Error codes are just fine, remove XXX now. Modified: trunk/heimdal/configure.in =================================================================== --- trunk/heimdal/configure.in 2007-07-16 10:30:22 UTC (rev 769) +++ trunk/heimdal/configure.in 2007-07-16 17:10:00 UTC (rev 770) @@ -1,8 +1,8 @@ dnl Process this file with autoconf to produce a configure script. -AC_REVISION($Revision: 21544 $) +AC_REVISION($Revision: 21586 $) AC_PREREQ([2.59]) test -z "$CFLAGS" && CFLAGS="-g" -AC_INIT([Lorikeet-Heimdal, modified for Samba4],[0.9pre-samba],[samba-technical.org]) +AC_INIT([Lorikeet-Heimdal, modified for Samba4],[0.9rc3-samba],[samba-technical.org]) AC_CONFIG_SRCDIR([kuser/kinit.c]) AC_CONFIG_HEADERS(include/config.h) Modified: trunk/heimdal/include/Makefile.am =================================================================== --- trunk/heimdal/include/Makefile.am 2007-07-16 10:30:22 UTC (rev 769) +++ trunk/heimdal/include/Makefile.am 2007-07-16 17:10:00 UTC (rev 770) @@ -1,4 +1,4 @@ -# $Id: Makefile.am 21023 2007-06-09 02:54:41Z lha $ +# $Id: Makefile.am 21590 2007-07-16 17:05:42Z lha $ include $(top_srcdir)/Makefile.am.common @@ -64,6 +64,7 @@ heimntlm.h \ heimntlm-protos.h \ kafs.h \ + krb_err.h \ krb5-protos.h \ krb5-private.h \ krb5-types.h \ Modified: trunk/heimdal/lib/hx509/ChangeLog =================================================================== --- trunk/heimdal/lib/hx509/ChangeLog 2007-07-16 10:30:22 UTC (rev 769) +++ trunk/heimdal/lib/hx509/ChangeLog 2007-07-16 17:10:00 UTC (rev 770) @@ -1,3 +1,7 @@ +2007-07-16 Love H�rnquist �strand <[EMAIL PROTECTED]> + + * Makefile.am: Add version-script.map to EXTRA_DIST + 2007-07-12 Love H�rnquist �strand <[EMAIL PROTECTED]> * Makefile.am: Add depenency on asn1_compile for asn1 built files. Modified: trunk/heimdal/lib/hx509/Makefile.am =================================================================== --- trunk/heimdal/lib/hx509/Makefile.am 2007-07-16 10:30:22 UTC (rev 769) +++ trunk/heimdal/lib/hx509/Makefile.am 2007-07-16 17:10:00 UTC (rev 770) @@ -1,4 +1,4 @@ -# $Id: Makefile.am 21501 2007-07-12 11:42:19Z lha $ +# $Id: Makefile.am 21584 2007-07-16 14:59:15Z lha $ include $(top_srcdir)/Makefile.am.common @@ -249,6 +249,7 @@ mv test_query.tmp test_query EXTRA_DIST = \ + version-script.map \ crmf.asn1 \ data/bleichenbacher-bad.pem \ hx509_err.et \ Modified: trunk/heimdal/lib/roken/ChangeLog =================================================================== --- trunk/heimdal/lib/roken/ChangeLog 2007-07-16 10:30:22 UTC (rev 769) +++ trunk/heimdal/lib/roken/ChangeLog 2007-07-16 17:10:00 UTC (rev 770) @@ -1,3 +1,9 @@ +2007-07-16 Love H�rnquist �strand <[EMAIL PROTECTED]> + + * socket_wrapper.c: Add dup(dummy stub) and dup2(real). + + * socket_wrapper.h: Add dup(dummy stub) and dup2(real). + 2007-07-10 Love H�rnquist �strand <[EMAIL PROTECTED]> * Makefile.am: New library version. Modified: trunk/heimdal/lib/roken/socket_wrapper.c =================================================================== --- trunk/heimdal/lib/roken/socket_wrapper.c 2007-07-16 10:30:22 UTC (rev 769) +++ trunk/heimdal/lib/roken/socket_wrapper.c 2007-07-16 17:10:00 UTC (rev 770) @@ -149,6 +149,8 @@ #define real_send send #define real_socket socket #define real_close close +#define real_dup dup +#define real_dup2 dup2 #endif #ifdef HAVE_GETTIMEOFDAY_TZ @@ -1834,3 +1836,64 @@ return ret; } + +_PUBLIC_ int swrap_dup(int oldd) +{ + struct socket_info *si; + + si = find_socket_info(oldd); + if (si == NULL) + return real_dup(oldd); + + abort(); /* write code here */ +} + + +_PUBLIC_ int swrap_dup2(int oldd, int newd) +{ + struct socket_info *si_newd, *si_oldd; + int fd; + + if (newd == oldd) + return newd; + + si_oldd = find_socket_info(oldd); + si_newd = find_socket_info(newd); + + if (si_oldd == NULL && si_newd == NULL) + return real_dup2(oldd, newd); + + fd = real_dup2(si_oldd->fd, newd); + if (fd < 0) + return fd; + + /* close new socket first */ + if (si_newd) + swrap_close(newd); + + si_newd = (struct socket_info *)calloc(1, sizeof(struct socket_info)); + + si_newd->fd = fd; + + si_newd->family = si_oldd->family; + si_newd->type = si_oldd->type; + si_newd->protocol = si_oldd->protocol; + si_newd->bound = si_oldd->bound; + si_newd->bcast = si_oldd->bcast; + if (si_oldd->path) + si_newd->path = strdup(si_oldd->path); + if (si_oldd->tmp_path) + si_newd->tmp_path = strdup(si_oldd->tmp_path); + si_newd->myname = + sockaddr_dup(si_oldd->myname, si_oldd->myname_len); + si_newd->myname_len = si_oldd->myname_len; + si_newd->peername = + sockaddr_dup(si_oldd->peername, si_oldd->peername_len); + si_newd->peername_len = si_oldd->peername_len; + + si_newd->io = si_oldd->io; + + SWRAP_DLIST_ADD(sockets, si_newd); + + return fd; +} Modified: trunk/heimdal/lib/roken/socket_wrapper.h =================================================================== --- trunk/heimdal/lib/roken/socket_wrapper.h 2007-07-16 10:30:22 UTC (rev 769) +++ trunk/heimdal/lib/roken/socket_wrapper.h 2007-07-16 17:10:00 UTC (rev 770) @@ -51,6 +51,8 @@ ssize_t swrap_recv(int s, void *buf, size_t len, int flags); ssize_t swrap_send(int s, const void *buf, size_t len, int flags); int swrap_close(int); +int swrap_dup(int); +int swrap_dup2(int, int); #ifdef SOCKET_WRAPPER_REPLACE @@ -128,6 +130,17 @@ #undef close #endif #define close(s) swrap_close(s) + +#ifdef dup +#undef dup #endif +#define dup(oldd) swrap_dup(oldd) +#ifdef dup2 +#undef dup2 +#endif +#define dup2(oldd, newd) swrap_dup2(oldd, newd) + +#endif + #endif /* __SOCKET_WRAPPER_H__ */
