Improve valid() in netlm, nethalflm and mssql12.
Merge branch 'bleeding-jumbo' into bleeding-mask

* bleeding-jumbo:
  Improve valid() in netlm, nethalflm and mssql12.