in_pcbbind_setup(), etc.
Pawel Jakub Dawidek
pjd at FreeBSD.org
Tue Mar 23 04:38:35 PST 2004
Hmm.
I'm looking at in_pcbbind_setup() and this doesn't looks right
in few places.
For example: 'td' can be NULL? It is offten tested, but not always,
Line 290:
if (sin->sin_addr.s_addr != INADDR_ANY)
if (prison_ip(td->td_ucred, 0, &sin->sin_addr.s_addr))
return(EINVAL);
td_ucred is used, but 'td' is not tested.
If this is always current thread, it can't be NULL, right?
If this not have to be current thread, we cannot touch td_ucred here,
because (from proc.h):
[...]
* k - only accessed by curthread
[...]
struct ucred *td_ucred; /* (k) Reference to credentials. */
[...]
Not telling that we can just remove this argument if this is always
current thread.
--
Pawel Jakub Dawidek http://www.FreeBSD.org
pjd at FreeBSD.org http://garage.freebsd.pl
FreeBSD committer Am I Evil? Yes, I Am!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-net/attachments/20040323/aeabf406/attachment.bin
More information about the freebsd-net
mailing list