status..lck and connection.c problem under debug

John E. Malmberg wb8tyw at
Sat Jan 15 23:09:33 GMT 2000

The routine claim_connection() in module smbd/connection.c is making the
assumption that the smbd program would never be run twice with the same
process id.

Under normal conditions on OpenVMS it would be true, but under debug
conditions this is false.

Because of this, the status..lck file would get a new record every time a
test was run, and orphan status records would result.

The following change to connection.c prevents the status..lck from growing
under debug.

OLD: ************
  179                   if (foundi < 0 && (! ||
!process_exists( {
  180                        foundi=i;

  179                   if (foundi < 0 &&
  180                       (! || ( == getpid()) ||
  181                        !process_exists( {
  182                        foundi=i;

I suspect that this is not an issue on UNIX systems, but I am not sure of

More information about the samba-technical mailing list