There are some switch cases missing, and tests...
Sorry Metze. That was a bit too much to review, but I know it needed to be in 4.15.rc1.
This bug was referenced in samba master:
Created attachment 16692 [details]
Patches for v4-15-test
Re-assigning to Karolin for inclusion in 4.15.rc2.