Bug 1976 - smbwrapper fork bug
smbwrapper fork bug
Product: Samba 3.0
Classification: Unclassified
Component: Build environment
All Solaris
: P3 normal
: none
Assigned To: Samba Bugzilla Account
Samba QA Contact
Depends on:
  Show dependency treegraph
Reported: 2004-10-27 09:13 UTC by James R Grinter
Modified: 2005-02-17 09:35 UTC (History)
0 users

See Also:

test case for bug in smbw_fork() (997 bytes, text/plain)
2004-10-27 09:17 UTC, James R Grinter
no flags Details
proposed bug fix to smbwrapper/smbw.c (369 bytes, patch)
2004-10-27 09:21 UTC, James R Grinter
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description James R Grinter 2004-10-27 09:13:48 UTC
The implementation of fork() results in tree disconnects being sent to the SMB 
server when closing the child processes's server references.

When the parent process then attempts another access to the same server it 
receives "ERRSRV - ERRinvnid (The tree ID (TID) specified in a command was 
Comment 1 James R Grinter 2004-10-27 09:17:16 UTC
Created attachment 746 [details]
test case for bug in smbw_fork()

This is an example C program. Compile and run as per comments at top.

Second stat() operation will return EINVAL (Invalid argument), not ENOENT (No
such file or directory) that one expects.
Comment 2 James R Grinter 2004-10-27 09:21:03 UTC
Created attachment 747 [details]
proposed bug fix to smbwrapper/smbw.c

This is a proposed patch, to prevent smbw_fork() from actually sending a tree
disconnect to the server.
Comment 3 Gerald (Jerry) Carter 2005-02-17 09:35:26 UTC
smbwrapper is not being maintained currently.  Marking as fix 
later (if anyone wants to come back to this and run all the 
necessary regression tests).