smbfs 1.72 (14.4.2009)

- In proc.c, smb_setup_header() initialized the SMB header length
  field with a number which was too large by four bytes. Consequently,
  what was later committed to the wire would have four trailing data
  bytes which could contain random values. This often didn't do much
  harm, but it seems that Samba 3.2.4 and Windows Vista don't like the
  looks of the trailing junk bytes.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/amiga-smbfs/trunk@20 26594b9e-b914-4e86-b7a1-9402bd427170
This commit is contained in:
Olaf Barthel
2009-04-14 11:33:05 +00:00
parent 58bb78ae14
commit 2f0d253eef
20 changed files with 61 additions and 47 deletions
+2 -2
View File
@@ -1,11 +1,11 @@
#
# $Id: GNUmakefile.68k,v 1.2 2005-05-27 09:48:26 obarthel Exp $
# $Id: GNUmakefile.68k,v 1.3 2009-04-14 11:32:51 obarthel Exp $
#
# :ts=8
#
# SMB file system wrapper for AmigaOS, using the AmiTCP V3 API
#
# Copyright (C) 2000-2005 by Olaf `Olsen' Barthel <olsen@sourcery.han.de>
# Copyright (C) 2000-2009 by Olaf `Olsen' Barthel <obarthel -at- gmx -dot- net>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
+2 -2
View File
@@ -1,11 +1,11 @@
#
# $Id: GNUmakefile.os4,v 1.3 2005-05-29 08:32:58 obarthel Exp $
# $Id: GNUmakefile.os4,v 1.4 2009-04-14 11:32:51 obarthel Exp $
#
# :ts=8
#
# SMB file system wrapper for AmigaOS, using the AmiTCP V3 API
#
# Copyright (C) 2000-2005 by Olaf `Olsen' Barthel <olsen@sourcery.han.de>
# * Copyright (C) 2000-2009 by Olaf `Olsen' Barthel <obarthel -at- gmx -dot- net>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
+2 -2
View File
@@ -1,11 +1,11 @@
/*
* $Id: assert.c,v 1.2 2005-05-27 09:48:26 obarthel Exp $
* $Id: assert.c,v 1.3 2009-04-14 11:32:51 obarthel Exp $
*
* :ts=8
*
* SMB file system wrapper for AmigaOS, using the AmiTCP V3 API
*
* Copyright (C) 2000-2005 by Olaf `Olsen' Barthel <olsen@sourcery.han.de>
* Copyright (C) 2000-2009 by Olaf `Olsen' Barthel <obarthel -at- gmx -dot- net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
+2 -2
View File
@@ -1,11 +1,11 @@
/*
* $Id: assert.h,v 1.3 2005-05-27 10:35:48 obarthel Exp $
* $Id: assert.h,v 1.4 2009-04-14 11:32:51 obarthel Exp $
*
* :ts=8
*
* SMB file system wrapper for AmigaOS, using the AmiTCP V3 API
*
* Copyright (C) 2000-2005 by Olaf `Olsen' Barthel <olsen@sourcery.han.de>
* Copyright (C) 2000-2009 by Olaf `Olsen' Barthel <obarthel -at- gmx -dot- net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
+2 -2
View File
@@ -1,11 +1,11 @@
/*
* $Id: main.c,v 1.7 2005-06-13 19:34:25 obarthel Exp $
* $Id: main.c,v 1.8 2009-04-14 11:32:51 obarthel Exp $
*
* :ts=4
*
* SMB file system wrapper for AmigaOS, using the AmiTCP V3 API
*
* Copyright (C) 2000-2005 by Olaf `Olsen' Barthel <olsen@sourcery.han.de>
* Copyright (C) 2000-2009 by Olaf `Olsen' Barthel <obarthel -at- gmx -dot- net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
+9 -5
View File
@@ -1,5 +1,5 @@
/*
* $Id: proc.c,v 1.6 2005-06-13 13:11:26 obarthel Exp $
* $Id: proc.c,v 1.7 2009-04-14 11:32:51 obarthel Exp $
*
* :ts=8
*
@@ -10,7 +10,7 @@
* 28/06/96 - Fixed long file name support (smb_proc_readdir_long) by Yuri Per
*
* Modified for big endian support by Christian Starkjohann.
* Modified for use with AmigaOS by Olaf Barthel <olsen@sourcery.han.de>
* Modified for use with AmigaOS by Olaf Barthel <obarthel -at- gmx -dot- net>
*/
#include "smbfs.h"
@@ -241,7 +241,7 @@ date_unix2dos (int unix_date, unsigned short *time_value, unsigned short *date)
dword
smb_len (byte * packet)
{
return (dword)( ((packet[1] & 0x1) << 16L) | (packet[2] << 8L) | (packet[3]) );
return (dword)( (((dword)(packet[1] & 0x1)) << 16) | (((dword)packet[2]) << 8) | (packet[3]) );
}
static INLINE word
@@ -538,7 +538,11 @@ smb_setup_header (struct smb_server *server, byte command, word wct, word bcc)
byte *p = server->packet;
byte *buf = server->packet;
p = smb_encode_smb_length (p, xmit_len);
/* olsen: we subtract four bytes because smb_encode_smb_length() adds
four bytes which are not supposed to be included in the total
number of bytes to be sent */
p = smb_encode_smb_length (p, xmit_len - 4);
/* p = smb_encode_smb_length (p, xmit_len); */
BSET (p, 0, 0xff);
BSET (p, 1, 'S');
@@ -2517,7 +2521,7 @@ smb_proc_connect (struct smb_server *server)
}
/* error code stuff - put together by Merik Karman
merik@blackadder.dsh.oz.au */
merik -at- blackadder -dot- dsh -dot- oz -dot- au */
typedef struct
{
char *name;
+2 -2
View File
@@ -1,11 +1,11 @@
/*
* $Id: quad_math.c,v 1.2 2005-05-29 08:32:58 obarthel Exp $
* $Id: quad_math.c,v 1.3 2009-04-14 11:32:51 obarthel Exp $
*
* :ts=4
*
* SMB file system wrapper for AmigaOS, using the AmiTCP V3 API
*
* Copyright (C) 2000-2005 by Olaf `Olsen' Barthel <olsen@sourcery.han.de>
* Copyright (C) 2000-2009 by Olaf `Olsen' Barthel <obarthel -at- gmx -dot- net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
+2 -2
View File
@@ -1,11 +1,11 @@
/*
* $Id: quad_math.h,v 1.1 2005-05-27 09:48:26 obarthel Exp $
* $Id: quad_math.h,v 1.2 2009-04-14 11:32:51 obarthel Exp $
*
* :ts=4
*
* SMB file system wrapper for AmigaOS, using the AmiTCP V3 API
*
* Copyright (C) 2000-2005 by Olaf `Olsen' Barthel <olsen@sourcery.han.de>
* Copyright (C) 2000-2009 by Olaf `Olsen' Barthel <obarthel -at- gmx -dot- net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
+2 -2
View File
@@ -1,11 +1,11 @@
#
# $Id: smakefile,v 1.3 2005-05-27 10:35:48 obarthel Exp $
# $Id: smakefile,v 1.4 2009-04-14 11:32:51 obarthel Exp $
#
# :ts=8
#
# SMB file system wrapper for AmigaOS, using the AmiTCP V3 API
#
# Copyright (C) 2000-2005 by Olaf `Olsen' Barthel <olsen@sourcery.han.de>
# Copyright (C) 2000-2009 by Olaf `Olsen' Barthel <obarthel -at- gmx -dot- net>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
+3 -3
View File
@@ -1,15 +1,15 @@
/*
* $Id: smb_abstraction.c,v 1.1.1.1 2005-05-24 13:22:13 obarthel Exp $
* $Id: smb_abstraction.c,v 1.2 2009-04-14 11:32:51 obarthel Exp $
*
* :ts=8
*
* Name: smb_abstraction.c
* Description: Smb abstraction layer.
* Author: Christian Starkjohann <cs@hal.kph.tuwien.ac.at>
* Author: Christian Starkjohann <cs -at- hal -dot- kph -dot- tuwien -dot- ac -dot- at>
* Date: 1996-12-31
* Copyright: GNU-GPL
*
* Modified for use with AmigaOS by Olaf Barthel <olsen@sourcery.han.de>
* Modified for use with AmigaOS by Olaf Barthel <obarthel -at- gmx -dot- net>
*/
#include "smbfs.h"
+4 -4
View File
@@ -1,16 +1,16 @@
/*
* $Id: smb_abstraction.h,v 1.1.1.1 2005-05-24 13:22:13 obarthel Exp $
* $Id: smb_abstraction.h,v 1.2 2009-04-14 11:32:51 obarthel Exp $
*
* :ts=8
*
* Name: smb_abstraction.h
* Description: Interface to the smb abstraction layer.
* Author: Christian Starkjohann <cs@hal.kph.tuwien.ac.at>
* Author: Christian Starkjohann <cs -at- hal -dot- kph -dot- tuwien -dot- ac -dot- at>
* Date: 1996-12-31
* Copyright: GNU-GPL
*
* Modified for use with AmigaOS by Olaf Barthel <olsen@sourcery.han.de>
* Modified to support record locking by Peter Riede <Noster-Riede@T-Online.de>
* Modified for use with AmigaOS by Olaf Barthel <obarthel -at- gmx -dot- net>
* Modified to support record locking by Peter Riede <Noster-Riede -at- T-Online -dot- de>
*/
#ifndef _SMB_ABSTRACTION_H
+2 -2
View File
@@ -1,11 +1,11 @@
/*
* $Id: smbfs.h,v 1.3 2005-06-13 08:04:15 obarthel Exp $
* $Id: smbfs.h,v 1.4 2009-04-14 11:32:51 obarthel Exp $
*
* :ts=4
*
* SMB file system wrapper for AmigaOS, using the AmiTCP V3 API
*
* Copyright (C) 2000-2005 by Olaf `Olsen' Barthel <olsen@sourcery.han.de>
* Copyright (C) 2000-2009 by Olaf `Olsen' Barthel <obarthel -at- gmx -dot- net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
+5 -5
View File
@@ -1,6 +1,6 @@
#define VERSION 1
#define REVISION 71
#define DATE "13.6.2005"
#define VERS "smbfs 1.71"
#define VSTRING "smbfs 1.71 (13.6.2005)\r\n"
#define VERSTAG "\0$VER: smbfs 1.71 (13.6.2005)"
#define REVISION 72
#define DATE "14.4.2009"
#define VERS "smbfs 1.72"
#define VSTRING "smbfs 1.72 (14.4.2009)\r\n"
#define VERSTAG "\0$VER: smbfs 1.72 (14.4.2009)"
+1 -1
View File
@@ -1 +1 @@
71
72
+3 -3
View File
@@ -1,13 +1,13 @@
/*
* $Id: sock.c,v 1.1.1.1 2005-05-24 13:22:13 obarthel Exp $
* $Id: sock.c,v 1.2 2009-04-14 11:32:51 obarthel Exp $
*
* :ts=8
*
* sock.c
*
* Copyright (C) 1995 by Paal-Kr. Engstad and Volker Lendecke
* Modified by Christian Starkjohann <cs@hal.kph.tuwien.ac.at>
* Modified for use with AmigaOS by Olaf Barthel <olsen@sourcery.han.de>
* Modified by Christian Starkjohann <cs -at- hal -dot- kph -dot- tuwien -dot- ac -dot- at>
* Modified for use with AmigaOS by Olaf Barthel <obarthel -at- gmx -dot- net>
*/
#include "smbfs.h"
+2 -2
View File
@@ -1,11 +1,11 @@
/*
* $Id: system_headers.c,v 1.1.1.1 2005-05-24 13:22:13 obarthel Exp $
* $Id: system_headers.c,v 1.2 2009-04-14 11:32:51 obarthel Exp $
*
* :ts=4
*
* SMB file system wrapper for AmigaOS, using the AmiTCP V3 API
*
* Copyright (C) 2000-2003 by Olaf `Olsen' Barthel <olsen@sourcery.han.de>
* Copyright (C) 2000-2009 by Olaf `Olsen' Barthel <obarthel -at- gmx -dot- net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
+2 -2
View File
@@ -1,11 +1,11 @@
/*
* $Id: system_headers.h,v 1.1.1.1 2005-05-24 13:22:13 obarthel Exp $
* $Id: system_headers.h,v 1.2 2009-04-14 11:32:51 obarthel Exp $
*
* :ts=4
*
* SMB file system wrapper for AmigaOS, using the AmiTCP V3 API
*
* Copyright (C) 2000-2003 by Olaf `Olsen' Barthel <olsen@sourcery.han.de>
* Copyright (C) 2000-2009 by Olaf `Olsen' Barthel <obarthel -at- gmx -dot- net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by