Up to 23 deceased now. Shooter had previous assault with weapons charges and weapons prohibitions. That was more than. 10 years ago and prohibitions are typically 10 years in length, so it's possible he had a legitimate license. If he did, it's also possible that the RCMP dropped the ball on his background check.
https://www.cbc.ca/news/canada/nova-scotia/portapique-shooting-memorials-april-21-1.5539894
https://www.cbc.ca/news/canada/nova-scotia/portapique-shooting-memorials-april-21-1.5539894