smbclient prints negative total sizes

Alexandre Oliva oliva at
Sun Feb 21 00:15:51 GMT 1999


Amanda uses smbclient to perform backups of MS-Windows hosts.
Unfortunately, there are some problems in backing them up: both `du'
and `tar' will print negative totals if the size of the disk exceeds
2GB (on 32 bit hosts).

Amanda recommends Samba to be built with a patch that uses unsigned
long longs for the byte counts, and prints them with printf("%llu"),
but people often get in trouble because the type is not available or
the C library doesn't support this printf.

I can see some ways to fix this problem:

1) introduce configure tests that check whether unsigned long longs or 
long longs are available, and if the C library supports printing them

2) borrow some code from GNU tar that implements a simple library of
macros for dealing with arbitrary precision integers

3) getting part of GNU gmp, that does the same and is much more
optimized, but uses much more space

Which would you prefer?

Alexandre Oliva  aoliva@{}
Universidade Estadual de Campinas, SP, Brasil

More information about the samba-technical mailing list