Re: Mapping permissions


Subject: Re: Mapping permissions
From: Peter Westlake (peter@harlequin.co.uk)
Date: Thu Dec 14 2000 - 13:09:42 EST


Reminder: my problem was that I got oserror -50 when trying to delete
a read-only file from the Mac. The following changes make it work:

diff etc/afpd/file.c ~peterg/installs/netatalk-1.4b2/etc/afpd/file.c
671c671
< if ( ad_open( file, adflags, O_RDONLY, 0, &ad ) < 0 ) {

---
>     if ( ad_open( file, adflags, O_RDWR, 0, &ad ) < 0 ) {
675c675
<           if ( ad_open( file, adflags, O_RDONLY, 0, &ad ) < 0 ) {
---
>           if ( ad_open( file, adflags, O_RDWR, 0, &ad ) < 0 ) {

diff libatalk/adouble/ad_open.c ~peterg/installs/netatalk-1.4b2/libatalk/adouble/ad_open.c 156c156 < admode = ad_mode( ad_p, mode==O_RDONLY? O_RDWR: mode ); --- > admode = ad_mode( ad_p, mode );

This is in 1.4b2, no asun mods or anything like that, just a few hacked include paths to make it compile on RedHat 6.0.

The change to ad_open.c is purely to comply with the comment at the head of ad_open() about not opening the header file read-only. I have no idea what goes wrong if you do, but it didn't seem like a good time to find out. I'd be interested to know, but only for my own interest.

This *does* seem to work, but I've only been using it for about ten minutes. Can anyone foresee any bad side-effects of these changes?

Peter.



This archive was generated by hypermail 2b28 : Wed Jan 17 2001 - 14:32:46 EST