[Samba] What is the correct process or procedure to add functionality to Samba?

Dachshund Digital dachshund-digital at dc.rr.com
Mon Dec 26 04:24:05 UTC 2022


What is the correct process or procedure to add functionality to Samba?

I have an idea to add backing store validation behind Samba shares.  For 
example, add logic to Samba, such that if the backing store, i.e. device 
or mount point is missing, Samba does not publish the applicable share 
point.

If the above is done, a potential benefit would be, Samba could 
dynamically publish share points as devices or mount points become again 
visible.  This would, if implemented, eliminate the need for explicitly 
stop/start/restart smbd, as resources are restored to service, or even 
new resources published.

In the smb.conf, a new flag/parameter, per share, with a reference to a 
script for what actions to take when backing store disappears, reappears 
or added.

For example...  A possible idea...

[Some Share]
# enable actions, if yes
Watch = yes|no
Add = yes|no
Remove = yes|no
Recover = yes|no

# script samba can invoke when a backing store, i.e. device, mount point 
# no longer exists or present
WatchAction = <name of script to execute>

# mount point referenced in smb.conf now exists
AddAction = <name of script to execute>

# mount point on longer exists
RemoveAction = <name of script to execute>

# mount point now exists again
RecoverAction = <name of script to execute>

Is there any interest from the Samba development team to consider such 
as outlined above?

I am not as yet familiar with the patch submission process, but do I 
understand correctly, that is one possible path to implementing this idea?

-DD



More information about the samba mailing list