/*
- * $Id: unix.c,v 1.34 2002-05-10 21:35:41 jmarcus Exp $
+ * $Id: unix.c,v 1.35 2002-06-06 10:14:26 didg Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
ma->ma_owner = utombits( mode );
+ /* ma_user is a union of all permissions */
+
if ( (uuid == stat->st_uid) || (uuid == 0)) {
ma->ma_user = ma->ma_owner | AR_UOWN;
- } else if ( gmem( stat->st_gid )) {
- ma->ma_user = ma->ma_group;
- } else {
- ma->ma_user = ma->ma_world;
}
+ if ( gmem( stat->st_gid )) {
+ ma->ma_user |= ma->ma_group;
+ }
+ ma->ma_user |= ma->ma_world;
/*
* There are certain things the mac won't try if you don't have
/*
- * $Id: volume.c,v 1.26 2002-03-24 17:45:29 jmarcus Exp $
+ * $Id: volume.c,v 1.27 2002-06-06 10:14:26 didg Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
bitmap = htons( bitmap );
memcpy(rbuf, &bitmap, sizeof( bitmap ));
- curdir = volume->v_dir;
if ( chdir( volume->v_path ) < 0 ) {
ret = AFPERR_PARAM;
goto openvol_err;
}
+ curdir = volume->v_dir;
#ifdef CNID_DB
if (volume->v_dbpath)
}
}
if ( ovol != NULL ) {
- curdir = ovol->v_dir;
- if ( chdir( ovol->v_path ) < 0 ) {
- return( AFPERR_PARAM );
+ /* Even if chdir fails, we can't say afp_closevol fails. */
+ if ( chdir( ovol->v_path ) == 0 ) {
+ curdir = ovol->v_dir;
}
}