SMBreadbraw reading negative bytes causes client disconnects
Scott Moomaw
scott at bridgewater.edu
Thu Aug 30 22:25:18 GMT 2001
In my message earlier today, I noted about a problem with read system
calls trying to get negative amounts of data. I have a Solaris snoop of
this that might be helpful for developers to see. Below is a truss of a
failure. In essence, the process llseek's beyond the end of the file and
then attempts to read data using a negative number of bytes. The negative
number is the distance beyond the end of file that you are.
7776: 173.2560 open64("eudora/IN.MBX", O_RDWR|O_NONBLOCK|O_CREAT, 0777) = 25
7776: 173.2561 gettimeofday(0x082560C8) = 0
7776: 173.2562 facl(25, GETACL, 16, 0x08256D3C) = 5
7776: 173.2563 facl(25, SETACL, 5, 0x08256D3C) = 0
7776: 173.2566 fcntl(13, F_SETLKW, 0x08046E9C) = 0
7776: 173.2569 fcntl(13, F_SETLKW, 0x08046E9C) = 0
7776: 173.2571 fcntl(13, F_SETLKW, 0x08047340) = 0
7776: 173.2572 send(5, "\0\0\0 AFF S M B -\0\0\0".., 69, 0) = 69
7776: 173.2579 poll(0x08047884, 3, 60000) = 1
7776: 173.2580 read(5, "\0\0\0 +", 4) = 4
7776: 173.2581 read(5, "FF S M B12\0\0\0\0\0\0\0".., 43) = 43
7776: 173.2582 gettimeofday(0x081DF1C4) = 0
7776: 173.2583 llseek(25, 0, SEEK_END) = 2806731
7776: 173.2584 send(5, "\0\0\0 'FF S M B12\0\0\0".., 43, 0) = 43
7776: 173.2877 poll(0x08047884, 3, 60000) = 1
7776: 173.2880 read(5, "\0\0\0 3", 4) = 4
7776: 173.2882 read(5, "FF S M B1A\0\0\0\0\0\0\0".., 51) = 51
7776: 173.2883 gettimeofday(0x081DF1C4) = 0
7776: 173.2884 fstat64(25, 0x08047908) = 0
7776: 173.2885 llseek(25, 2809801, SEEK_SET) = 2809801
7776: 173.2886 read(25, 0x082222D5, -3070) Err#22 EINVAL
More information about the samba-technical
mailing list