net-fs/samba-4.2.9 is the only non-masked currently available ebuild for Samba4. However, it cannot be installed, because net-fs/samba-4.2.9 has a hard dependency on >=sys-libs/ntdb-1.0, while sys-libs/ntdb-1.0, the only available version of sys-libs/ntdb, has a hard dependency on <net-fs/samba-4.1.7. So, in summary, net-fs/samba-4.2.9 has a hard dependency on sys-libs/ntdb-1.0, which is a hard blocker for net-fs/samba-4.2.9, and no alternate version of either is available.
I believe you just need to unmerge older samba first, it's not a dependency on <net-fs/samba-4.1.7 but a blocker on !!<net-fs/samba-4.1.7
Huh. You're right. I stand corrected. As long as I manually removed net-fs/samba-3.6.25 FIRST, it worked without a problem.