Hi, On Sat, Jul 17, 2010 at 11:37:34AM +0200, Emilio Pozuelo Monfort wrote: > On 15/07/10 20:46, Carl Fredrik Hammar wrote:
> > The first thing you should do in any RPC that is not a stub is: > > if (!user) > > return EOPNOTSUPP; > > Done. I'm not sure when user would be NULL. Do you know it? Every translator handles at least two classes of ports: the fsys control ports; and the ports on which the translator offers it's actual funcionality. (Usually the protid ports for node(s) served by the translator -- but sockets are a bit special in this regard...) If an RPC is valid only on a certain class of ports, only this port class will be searched for matching port entries. (This is typically done by the MIG stubs, according to what was specified as INTRAN in a mutations.h file -- i.e. mig-mutate.h for pflocal.) So if someone tries the RPC on a wrong port type, we get no entry -- and tell the caller that this RPC is not valid on whatever wrong port type was used. -antrik-