c720e8585f
Ian says: Sometime around January 1999 2.4-current sources broke the handling of afpd group access. Now fixed. Various fixes and updates to afpd.
54 lines
1.3 KiB
Plaintext
54 lines
1.3 KiB
Plaintext
--- etc/afpd/file.c.orig Sat Oct 19 06:33:04 1996
|
|
+++ etc/afpd/file.c Tue Mar 31 02:24:45 1998
|
|
@@ -25,6 +25,7 @@
|
|
#include <unistd.h>
|
|
|
|
#include "directory.h"
|
|
+#include "desktop.h"
|
|
#include "volume.h"
|
|
#include "file.h"
|
|
#include "globals.h"
|
|
@@ -124,16 +125,16 @@
|
|
break;
|
|
|
|
case FILPBIT_FINFO :
|
|
- if ( !isad ||
|
|
- bcmp( ad_entry( &ad, ADEID_FINDERI ), ufinderi, 8 ) == 0 ) {
|
|
+ if ( !isad ) {
|
|
bcopy( ufinderi, data, 32 );
|
|
- if (( em = getextmap( path )) != NULL ) {
|
|
- bcopy( em->em_type, data, sizeof( em->em_type ));
|
|
- bcopy( em->em_creator, data + 4, sizeof( em->em_creator ));
|
|
- }
|
|
} else {
|
|
bcopy( ad_entry( &ad, ADEID_FINDERI ), data, 32 );
|
|
}
|
|
+ if ( bcmp( data, ufinderi, 8 ) == 0 &&
|
|
+ ( em = getextmap( path )) != NULL ) {
|
|
+ bcopy( em->em_type, data, sizeof( em->em_type ));
|
|
+ bcopy( em->em_creator, data + 4, sizeof( em->em_creator ));
|
|
+ }
|
|
data += 32;
|
|
break;
|
|
|
|
@@ -317,7 +318,7 @@
|
|
return( AFPERR_NOOBJ );
|
|
}
|
|
|
|
- if ((int)ibuf & 1 ) {
|
|
+ if ((long)ibuf & 1 ) {
|
|
ibuf++;
|
|
}
|
|
|
|
@@ -666,6 +667,10 @@
|
|
{
|
|
struct adouble ad;
|
|
int adflags;
|
|
+
|
|
+ if ( of_findfile( curdir, utompath( file )) != NULL ) {
|
|
+ return( AFPERR_BUSY );
|
|
+ }
|
|
|
|
adflags = ADFLAGS_DF|ADFLAGS_HF;
|
|
if ( ad_open( file, adflags, O_RDWR, 0, &ad ) < 0 ) {
|