2001-10-03 joe c <marcus@marcuscom.com>
* configure.in: Fix bug with PAM configuration
+ * etc/afpd/directory.c: Fix bug with unaccessible directories causing
+ afpd to erroneously return AFPERR_NOOBJ
2001-09-28 joe c <marcus@marcuscom.com>
/*
- * $Id: directory.c,v 1.18 2001-09-06 20:00:59 rufustfirefly Exp $
+ * $Id: directory.c,v 1.19 2001-10-03 19:51:04 jmarcus Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
}
if (( path = cname( vol, dir, &ibuf )) == NULL ) {
- return( AFPERR_NOOBJ );
+ switch( errno ) {
+ case EACCES:
+ return( AFPERR_ACCESS );
+ case EEXIST:
+ return( AFPERR_EXIST );
+ default:
+ return( AFPERR_NOOBJ );
+ }
}
/* check for illegal bits */
}
if (( path = cname( vol, parentdir, &ibuf )) == NULL ) {
- return( AFPERR_NOOBJ );
+ switch( errno ) {
+ case EACCES:
+ return( AFPERR_ACCESS );
+ default:
+ return( AFPERR_NOOBJ );
+ }
}
/* see if we already have the directory. */