Samba config question

Status
Not open for further replies.

mikef

Cadet
Joined
Aug 4, 2016
Messages
2
Hi,
When I add "oplocks = no" to Auxiliary Parameters and cat smb4.conf the original line "oplocks = yes" is still present and "oplocks = no" is added at the bottom of [global]. Is this expected behavior?
 
D

dlavigne

Guest
Possibly a bug that has been fixed since 9.10-STABLE-201606270534?
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
Hi,
When I add "oplocks = no" to Auxiliary Parameters and cat smb4.conf the original line "oplocks = yes" is still present and "oplocks = no" is added at the bottom of [global]. Is this expected behavior?
I believe this is expected behavior sir. If you request a parameter that is ALREADY part of the parameter set, your request does not generally know that you are contradicting something already there, so what winds up happening, is the original/standard parameter setting is there, and then yours is simply inserted as an afterthought at the end.

Typically this is not a big deal because no one is usually trying to change things that are already set, rather they are adding some fancy. But in you case, this is a conflict.

I am not sure which setting---the original, or your auxiliary setting---will take precedence as the thing parses the conf file.

Not a "bug" Dru. But maybe not the best way to program things.
 

mikef

Cadet
Joined
Aug 4, 2016
Messages
2
So, would this be a case where it is appropriate to directly modify the smb4.conf file?
 
D

dlavigne

Guest
No, as you'll just lose it on every reboot. It might be worthwhile to make a feature request that the parser do the right thing for already defined parameters. If you make one, post the issue number here.
 

m0nkey_

MVP
Joined
Oct 27, 2015
Messages
2,739
That auxiliary configuration box is a pain in the ass. Thankfully, it's gone away in 10.

Suggest you open a feature request for 9.10 to see if a toggle can be included for it.
 
Status
Not open for further replies.
Top