ssh
ssh

Reputation: 985

How to detect samba locked files programmatically?

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).

Upvotes: 2

Views: 992

Answers (1)

jelmer
jelmer

Reputation: 2450

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.

Upvotes: 2

Related Questions