Port-macppc archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

netatalk 3.0.4/2.2.4 timestamps on NetBSD 6.0 fixed



My trouble with timestamps in Netatalk is fixed.  I have patches for both
the timestamp fix, and also a couple of other changes that allow netatalk
to build and install without error.  I have given the patches to the
netatalk folks on their mail list.  I will provide them here as well
in hopes that someone will deal with them appropriately.

Note that neither of the latest releases, 3.0.4, nor 2.2.4 would build
on NetBSD, and if built, had the timestamp problems I have previously
described.

All better now. The patches are small.  Here is the patch set for the 3.0.4
release.

Note that the biggest change is a set of really hacky macros that
compensate for differences in some SSL stuff.  It would be nice if
the NetBSD libraries and whoever else implements this stuff could
settle on a common spelling. (hint hint...)

Thanks all for your help,

-dgl-


----- patch for 3.0.4 -----

--- ./bin/afppasswd/afppasswd.c.orig    2013-01-04 08:38:53.000000000 -0600
+++ ./bin/afppasswd/afppasswd.c 2013-05-25 18:43:03.000000000 -0500
@@ -37,6 +37,11 @@
 
 #include <des.h>
 
+#define Key_schedule DES_key_schedule
+#define key_sched(kkkk, ssss) DES_key_sched((kkkk), &(ssss))
+#define ecb_encrypt(nnnn1, nnnn2, ssss, ffff) DES_ecb_encrypt((nnnn1), 
(nnnn2), &(ssss), (ffff))
+#define C_Block DES_cblock
+
 #ifdef USE_CRACKLIB
 #include <crack.h>
 #endif /* USE_CRACKLIB */

--- ./distrib/initscripts/Makefile.in.orig      2013-05-24 08:32:58.000000000 
-0500
+++ ./distrib/initscripts/Makefile.in   2013-05-24 22:47:01.000000000 -0500
@@ -712,7 +712,7 @@
 @USE_SUSE_SYSV_TRUE@   rm -f $(DESTDIR)$(sysvdir)/$(sysv_SCRIPTS)
 
 @USE_NETBSD_TRUE@netatalk: rc.netbsd
-@USE_NETBSD_TRUE@      cp -f $< $@
+@USE_NETBSD_TRUE@      cp -f rc.netbsd $@
 @USE_NETBSD_TRUE@      chmod a+x $@
 
 @USE_NETBSD_TRUE@install-data-hook:

--- ./distrib/initscripts/rc.netbsd.tmpl.orig   2013-01-04 08:37:06.000000000 
-0600
+++ ./distrib/initscripts/rc.netbsd.tmpl        2013-05-25 00:18:16.000000000 
-0500
@@ -13,7 +13,7 @@
 command=":SBINDIR:/netatalk"
 etcdir=":ETCDIR:"
 pidfile="/var/run/${name}.pid"
-required_files="$etcdir/afp.conf
+required_files="$etcdir/afp.conf"
 
 load_rc_config $name
 run_rc_command "$1"

--- ./etc/uams/uams_randnum.c.orig      2013-03-07 01:03:19.000000000 -0600
+++ ./etc/uams/uams_randnum.c   2013-05-25 18:47:44.000000000 -0500
@@ -27,6 +27,11 @@
 
 #include <des.h>
 
+#define Key_schedule DES_key_schedule
+#define key_sched(kkkk, ssss) DES_key_sched((kkkk), &(ssss))
+#define ecb_encrypt(nnnn1, nnnn2, ssss, ffff) DES_ecb_encrypt((nnnn1), 
(nnnn2), &(ssss), (ffff))
+#define C_Block DES_cblock
+
 #ifdef USE_CRACKLIB
 #include <crack.h>
 #endif /* USE_CRACKLIB */

--- ./etc/afpd/volume.c.orig    2013-05-29 14:55:38.000000000 -0500
+++ ./etc/afpd/volume.c 2013-05-28 15:43:53.000000000 -0500
@@ -530,6 +530,7 @@
     char        *namebuf;
     int         vcnt;
     size_t      len;
+    uint32_t    aint;
 
     load_volumes(obj);
 
@@ -575,12 +576,13 @@
     *rbuflen = data - rbuf;
     data = rbuf;
     if ( gettimeofday( &tv, NULL ) < 0 ) {
-        LOG(log_error, logtype_afpd, "afp_getsrvrparms(%s): gettimeofday: %s", 
volume->v_path, strerror(errno) );
+       /* volume == null at this point...  no point crashing on error*/
+        LOG(log_error, logtype_afpd, "afp_getsrvrparms(): gettimeofday: %s", 
strerror(errno) );
         *rbuflen = 0;
         return AFPERR_PARAM;
     }
-    tv.tv_sec = AD_DATE_FROM_UNIX(tv.tv_sec);
-    memcpy(data, &tv.tv_sec, sizeof( uint32_t));
+    aint = AD_DATE_FROM_UNIX(tv.tv_sec);
+    memcpy(data, &aint, sizeof( uint32_t));
     data += sizeof( uint32_t);
     *data = vcnt;
     return( AFP_OK );




Home | Main Index | Thread Index | Old Index