ERRinvnetname in service.c

tridge at tridge at
Tue Sep 28 14:50:29 GMT 1999

> 1. We run the root preexec stuff before we even determine if the user can
> access the directory and thus share.

that is an unfortunate consequence of needing to become the user
before doing the chdir() and needing to do the root_prexec before
becoming the user.

> 2. We check if the user can access the share, and if not, return
> ERRinvnetname, which seems bad.  A better response would be ERRnoaccess.
> Even better, since we pull errno in to write a DEBUG 0 message, why not
> check and return ERRbadpath if the get no such file or directory, and
> ERRnoaccess otherwise?

remember that error codes are only as good as what the primary clients
(WinXX) do with them. You have to choose an error code that the client
will display sensibly under the circumstances. Often giving back a
"sensible" error code will lead to a garbage error in windows if the
redirector doesn't think that is a possible error code in the

It's been a _long_ time since I've tested this particular case, so if
you do find a better error code then let us know.

Cheers, Tridge

More information about the samba-technical mailing list