In this paper we elucidate the physics underlying the fact that both bright and dark solitary waves can arise in a one-dimensional spin-polarized gas of fermionic atoms with attractive three-dimensional p-wave interactions in a hard-wall trap. This i
s possible since the one-dimensional fermion system can be mapped to a system of bosons described by the Lieb-Liniger model with either repulsive or attractive delta-function interactions which can support solitary waves.