-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Samba regression from 3.8-14.03 #1385
Comments
@Mazo Thanks for reporting this, I'm having a quick look now and think it's the indented comments within the [global] section of /etc/samba/smb.conf thats causing a simple parsing error. |
With the above logging commit we get the following:
Hence the failed parsing on indented remarks. |
…r#1385 When reading from the /etc/samba/smb.conf file to populate the new custom config [global] section we need a final check on the field count to avoid tripping up on for example empty options or just indented remarks.
@schakrava With the 'final field count sanity check' patch: Handing over to you on this one as I suspect you know what's happened on this one already. |
Extracted "Custom global configuration" displayed with testing channel released code once all indented remarks are removed ie lines such as:
Looks like this (note the indent and last line with spaces):
|
Submitting the above, which results from removing the indented remarks then results in an empty smb.conf. Was looking for a user applicable edit of config as a quick work around on released testing channel code but looks like there more to this one that I initially though. |
A recent refactoring has orphaned this variable, previously this was passed as a parameter.
@schakrava pr ready for testing and review. Please update the following forum thread with significant development on this issue: |
Thanks @Mazo and @phillxnet and my apologies for sloppy changes to begin with. |
Fixed by #1386 |
The indicated forum thread has now been updated. |
See thread here from another user: https://forum.rockstor.com/t/3-8-14-03-broke-samba/1726
File "/opt/rockstor/src/rockstor/rest_framework_custom/generic_view.py", line 40, in _handle_exception
yield
File "/opt/rockstor/src/rockstor/smart_manager/views/samba_service.py", line 44, in get
config = get_global_config()
File "/opt/rockstor/src/rockstor/system/samba.py", line 179, in get_global_config
config[fields[0].strip()] = fields[1].strip()
IndexError: list index out of range
The text was updated successfully, but these errors were encountered: