kernel - fix crash in smb mount
The samba kernel-side daemon smbiod is created with
kthread_create_compat().
Kernel threads created with kthread_create_compat() have no td_ucred, as
other kernel threads, but have td_proc != NULL because this function
under the hood forks the process 0.
prison_replace_wildcard() was assuming that if td_proc != NULL it is
dealing with a user thread that has a valid td_ucred thus causing a NULL
ptr dereference when operating on kthread_create_compat()-threads.
Reported-and-fixed-by: Tero Jaasko
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue1790>