[Samba] mount.cifs return code = -128

Günter Kukkukk linux at kukkukk.com
Fri Nov 8 08:27:55 MST 2013


Am Freitag, 8. November 2013, 15:06:07 schrieb Winkel, Richard J.:
> I'm sure there are some code hackers on this list.  This snippet from
> mount.h seems incapable of
> producing the value return value that I'm seeing, -128 (10000000). There
> must be something else going on but I'm flummoxed.
> 
> /* exit status - bits below are ORed */
> #define EX_USAGE        1       /* incorrect invocation or permission */
> #define EX_SYSERR       2       /* out of memory, cannot fork, ... */
> #define EX_SOFTWARE     4       /* internal mount bug or wrong version */
> #define EX_USER         8       /* user interrupt */
> #define EX_FILEIO      16       /* problems writing, locking, ...
> mtab/fstab */
> #define EX_FAIL        32       /* mount failure */
> #define EX_SOMEOK      64       /* some mount succeeded */
> 
> On 11/6/13 11:30 PM, Winkel, Richard J. wrote:
> > Could someone tell me what this return code means?  This is mount.cifs
> > version 4.8.1 on a
> > centos 6.4 workstation joined to an AD domain, using automount with
> > auto.cifs containing
> > * -fstype=cifs,sec=krb5,user=&,uid=$UID,gid=$GID,cruid=$UID,noserverino
> > 
> > ://server.address.edu/&
> > 
> > When the machine is freshly booted, and for awhile afterwards, domain
> > accounts can mount with no problem.
> > But after some period of time, maybe day or so, the mount fails with the
> > above error.   Rebooting fixes it.
> > Has anyone ever seen this before?  I don't see how any combination of
> > the error codes listed in mount.h could
> > generate this number.
> > 
> > Thanks for any help!
> > 
> > Rich

cifs returns the negative value of the encountered (or self set) errno.
So -128 had been 128 - and is often mapped like this: (might be arch dependent)
#define	ENETUNREACH	128	/* Network is unreachable */
--
from the cifs source:
smb2maperror.c: {STATUS_NETWORK_UNREACHABLE, -ENETUNREACH,
smb2maperror.c: {STATUS_PROTOCOL_UNREACHABLE, -ENETUNREACH,
smb2maperror.c: {STATUS_PORT_UNREACHABLE, -ENETUNREACH, "STATUS_PORT_UNREACHABLE"},
--
Cheers, Günter


More information about the samba mailing list