2

How can I get a list of files locked by samba programmatically?

There is a command smbstatus which will give you that information. But I want to get that info within my program (written in Lazarus). One method is to run smbstatus as a child process and parse the output. I am trying to directly get the required info within the program (using an API).

ssh
  • 943
  • 1
  • 14
  • 23

1 Answers1

2

Parsing the smbstatus output is a fairly sensible thing to do.

You might also be able to access some of this information using libsmbsharemodes, which is a part of Samba.

jelmer
  • 2,405
  • 14
  • 27