[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lynx-dev moving files to directories that one doesn't own
From: |
Klaus Weide |
Subject: |
Re: lynx-dev moving files to directories that one doesn't own |
Date: |
Tue, 6 Jul 1999 18:23:10 -0500 (CDT) |
On Tue, 6 Jul 1999, Jon Schewe wrote:
> > The check for this is done explicitly in 'dir_has_same_owner' in
> > HTLocal.c. You could modify that (and sumbit a patch to the list)
>
> I believe you means LYLocal.c
Yes that's what I meant, sorry.
> > to be more lenient. There is a function HTEditable in HTFile.c,
> > a simple way to modify 'dir_has_same_owner' would be to add a call
> > to 'HTEditable' after the first 'else' in 'dir_has_same_owner'
> > (and proceed according to the return value). [ I'm not sure whether
> > HTEditable really does a good job, it hasn't really been used for
> > a long time. I think it was called, but nothing noticeable actually
> > depended on its result.]
> >
> This looks good except that dir_has_same_owner just gets the stat info and
> the owners uid, but HTEditable wants the directory name, I'll at least have
> to copy the functionality out of HTFile.c
Seems easier to add the name as a third parameter for dir_has_same_owner.
It's only used in two places in LYLocal.c, so no big change.
I would also be more logical to change the name of the dir_has_same_owner
function, since it now doesn't describe any more what it does. It should
be directory_target_ok_for_user or directory_target_ok or something like
that.
Consider sending a patch for Tom to include, if you think this should
be in the general code.
Klaus