patch to add full path to locking entries

thwartedefforts at wonky.org thwartedefforts at wonky.org
Wed Jan 6 00:50:02 GMT 1999


I've written a patch which modifies the locking code to record the full path 
to the files that is locked.  The patch is available at:

http://www.reac.com/samba/samba-fulllockpath-2beta5.diff

It is against 2.0beta5, but unless the locking code has changed drasticly, it should apply fine to the 2.1 series (I have not tested it against the 2.1 series).  If it doesn't, the list of changes is small and should be easy to apply by hand.

The upshot is that this changes what is shown in smbstatus.  This:

 Locked files:
 Pid  DenyMode  R/W  Oplock           Name
 -------------------------------------------------
 2619 DENY_ALL  RDWR EXCLUSIVE+BATCH  holidays1.mdb  Tue...
 2619 DENY_NONE RDWR EXCLUSIVE+BATCH  memo-99-01-05.doc  Tue...

becomes:

 Locked files:
 Pid  DenyMode  R/W  Oplock           Name
 -------------------------------------------------
 2619 DENY_ALL  RDWR EXCLUSIVE+BATCH  /tmp/holidays1.mdb  Tue...
 2619 DENY_NONE RDWR EXCLUSIVE+BATCH  /home/abakun/memo-99-01-05.doc  Tue...

Note the full path in the name field.

I was unable to locate any places where the locked filename is used for more
than informational purposes.  If it is used in a comparison or a search of 
some sort, could someone let me know where these occur so I can modify as 
necessary.

It would be really cool if this capability was provided in the regular 
distribution.

Andy.




More information about the samba-technical mailing list