Bug 14346 - testparm does not recognize 'max protocol' declaration
Summary: testparm does not recognize 'max protocol' declaration
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Tools (show other bugs)
Version: 4.5.14
Hardware: All Linux
: P5 trivial (vote)
Target Milestone: ---
Assignee: Andrew Bartlett
QA Contact: Samba QA Contact
Depends on:
Reported: 2020-04-15 19:55 UTC by James Thomas Moon
Modified: 2020-04-15 20:17 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description James Thomas Moon 2020-04-15 19:55:59 UTC
tl;dr Running `testparm` for an `smb.conf` file with `server max protocol` directive *and* `server min protocol` directive, `testparm` does not recognize `server max protocol`.

## Reproduction ##

Given file `test-smb.conf` with contents:

	server min protocol = SMB2
	server max protocol = SMB3

Run `testparm` with that file

    $ testparm test-smb.conf
        # Global parameters
          server min protocol = SMB2
          idmap config * : backend = tdb

BUG: no entry for `server max protocol` as defined in `test-smb.conf`
EXPECTED: entry for `server max protocol` as defined in `test-smb.conf`

This behavior changes if `server min protocol` directive in `test-smb.cong` is removed.  Then `testparm` will recognize `server max protocol`.

This behavior changes if passing `-v` to `testparm`. e.g.

      $ testparm -vs test-smb.conf 2>&1 | grep protocol
          server max protocol = SMB3
          server min protocol = SMB2

## Other Notes ##

Using `testparm` version `4.5.16-Debian` (this version is not available in Bugzilla Version field).
Comment 1 Andrew Bartlett 2020-04-15 20:17:55 UTC
The testparm tool only shows non-default smb.conf options.

Use testparm -v to show default values as well.  

What this shows is that 'server max protocol = SMB3' is already the default.