Rsync 3.1.0 on Interix (SUA for Windows)

for the two or three people left running SUA, and trying to rsync a UNIX box back on a corporate Windows server, you’ll probably wonder why rsync crashes…

$ ./rsync dbserver:: Memory fault (core dumped) $

Wonderful.  So I know what you’re thinking, let’s debug it, right?!

$ gdb rsync

GNU gdb 2002-11-11-cvs Copyright 2002 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type “show copying” to see the conditions. There is absolutely no warranty for GDB. Type “show warranty” for details. This GDB was configured as “i586-pc-interix3″…

(gdb) set args dbserver::

(gdb) r

Starting program: /dev/fs/C/Users/neozeed/tmp/rsync-3.1.0/rsync dbserver:: procfs: init_inferior, get_traced_signals line 4856, /proc/1375: Value too large to be stored in data type.

Yeah. Fantastic.

Well it turns out the bundled libintl on Interix is all screwed up.  So edit the config.h, and remove the line:

#define HAVE_ICONV_H 1

rebuild, and all will be well.

Unix/32V multiuser…

Well I was reading through this post:

 
When it made mention that for multiuser operations to work on Unix v7 you have to enable modem control… I’ve never gotten the DZ to work on 32v so seeing that it’s basically just Unix v7 on the VAX it probably worked in the same manner.
 
So I changed the following line from my 32v’s dboot.ini from:
 
set dz lines=8
 
to
set dz lines=16
att dz -m 2311
And now SIMH will listen on TCP port 2311 and allow me to connect into it’s serial ports!
Another minor note, regarding porting SIMH to the SUA/SFU environment for Windows regarding the nanosleep debacle:
In sim_timer.c the lines:
(void) nanosleep (&treq, NULL);
will fail as SUA/SFU don’t have nanosleep, however you can replace it with usleep and it’ll work… I use this:
(void) usleep (milliseconds*1000);
And for some reason some time structures don’t get defined so above the defintion of uint32 sim_os_msec to satisfy ‘foo’, simply place in:
struct timezone {
int tz_minuteswest;
int tz_dsttime;
};
And above the definition of uint32 sim_os_ms_sleep_init (void) I placed in:
struct timespec {
time_t tv_sec; /* seconds */
long tv_nsec; /* nanoseconds */
};
In the file sim_sock.c the line:
timerclear (&tz);
will fail as there is no timerclear… So I just replaced it with the following:
memset(&tz,0x0,sizeof(tz));
I then downloaded & build gnu make 3.81 and I’ve confirmed that 32v will load on the VAX11/780 emulator and it will idle ‘correctly’……
I know this is ‘clear as mud’ but it’ll help some people!

SUA/SFU dropbear minor annoyances..

Well I just deployed a Windows server to run some ancient ASP stuff, and it just turned out that the new direction is going to be php & unix… Since the machine is now in a different nation changes will be… difficult.

So for now I thought I’d install the SFU package and just connect in thru that and set it up… Except SFU/SUA is all telnet remotely… Which is bad. However dropbear to the rescue has ‘fixed’ it, now I can ssh.

There is really one two tweaks, the first one requires you to change the utmp stuff to utmpx.. It’s really easy, just add the x to the structures!

The ‘challenge’ was to authenticate passwords. You cannot verify passwords the old way, but after a lot of digging around I found this page:

http://technet.microsoft.com/en-us/library/bb463206.aspx

“Porting applications in C” ..

And for anyone that cares, here is the part for svr-authpasswd.c

/* the first bytes of passwdcrypt are the salt */
// testcrypt = crypt((char*)password, passwdcrypt);
// m_burn(password, passwordlen);
// m_free(password);

//This changes
//if (strcmp(testcrypt, passwdcrypt) == 0)
if(setuser(ses.authstate.pw_name,password,SU_CHECK)==0)

Yep, that’s it, and now gen your keys, and away you go!