can I define "static" interfaces in source/lib/interfaces.c?

Martin Zielinski mz at seh.de
Mon Feb 13 09:01:23 GMT 2006


Tomasz Chmielewski wrote:
> Martin Zielinski wrote:
> 
[...]
> 
> 
> Indeed, the device detection seems to work now.
> 
> However, something's still wrong.
> 
> Can you run smbclient command properly to upload files?
> 
> For example, something like this:
> 
> SHARE=shared
> FILE=/usr/share/cups/drivers/ps5ui.dll
> 
> # smbclient //localhost/$SHARE -N -U'administrator%pass' -c "put $FILE 
> testfile"
> Domain=[MAGISTA] OS=[Unix] Server=[Samba 3.0.21b]
> Error writing file: NT_STATUS_ACCESS_DENIED
> putting file /usr/share/cups/drivers/ps5ui.dll as \testfile (0.0 kb/s) 
> (average 0.0 kb/s)
> 
> 
> So, I get "Error writing file: NT_STATUS_ACCESS_DENIED".
> 
> Only 16573 bytes of the file are uploaded.
> 
> The logfile says:
> 
> [2006/02/10 11:36:06, 0] smbd/reply.c:reply_write_and_X(3048)
>   reply_write_and_X - large offset (40bd << 32) used and we don't 
> support 64 bit offsets.
> [2006/02/10 11:36:06, 3] smbd/error.c:error_packet(146)
>   error packet at smbd/reply.c(3050) cmd=47 (SMBwriteX) 
> NT_STATUS_ACCESS_DENIED
> 
> Does the same happen for you?
> 
> smbclient from a remote machine (normal one, not cross-compiled) is fine.
> 
> 
[...]
Ok,

Did some tests and comparisons between an ARM smbclient and a MIPS (BE) 
smbclient.

1st thing is, that I get several compiler warnings like these:

libsmb/clireadwrite.c:35: warning: right shift count >= width of type

they come from code like this:

if ((SMB_BIG_UINT)offset >> 32) 	

where sizeof (SMB_BIG_UINT) is 4 on ARM _and_ MIPS. (On my i686 it's: 8)

Now comes the compiler:
arm gcc: (0x40bd >> 32) == 0
mips gcc: (0x40bd >> 32) == 0x40bd (!)

so everything after that goes wrong.

The smbclient error can be (warning: hack) fixed, when you change the 
code line
- if ((SMB_BIG_UINT)offset >> 32)
with
+ if (sizeof (SMB_BIG_UINT) > 4 && (SMB_BIG_UINT)offset >> 32)

Perhaps, you find a more elegant way.

Bye,

Martin

-- 
Martin Zielinski             mz at seh.de
Software Development
SEH Computertechnik GmbH     www.seh.de


More information about the samba-technical mailing list