[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lynx-dev rc save bug
From: |
Bela Lubkin |
Subject: |
Re: lynx-dev rc save bug |
Date: |
Wed, 7 Oct 1998 10:21:00 -0700 |
Philip Webb wrote:
> write(1, "\r\nSaving Options...", 19) = 19
> ! open("/homes/purslow/.lynxrc", O_WRONLY|O_CREAT|O_EXCL, 0600) = -1 EEXIST
> (File exists)
> ! lxstat(2, "/homes/purslow/.lynxrc", {st_mode=S_IFREG|0600, st_size=11022,
> ...}) = 0
> ! getuid() = 1300 (euid 1300)
> ! lxstat(2, "/homes/purslow", {st_mode=S_IFLNK|0755, st_size=18, ...}) = 0
> ! lxstat(2, "/homes", {st_mode=S_IFLNK|0755, st_size=13, ...}) = 0
> ioctl(0, 0x4004667f, [0]) = 0
> ioctl(0, 0x4004667f, [0]) = 0
> ! write(1, "\rAlert!: Unable to save Options"..., 32) = 32
/homes/purslow is a symlink. src/LYUtils.c:IsOurFile() wants its parent
-- that is, /homes -- to be owned by root and not world-writable. It
isn't world-writable, so it must be that it's not owned by root. We can
also see in this trace that /homes itself is a symlink, so IsOurFile()
would have wanted / to be owned by root and not world-writable, if it
had gotten that far.
This is the first time I've seen IsOurFile(), and I'd say there are a
whole bunch of things wrong with its approach. Not so fatal that it
should be changed right now, but it definitely needs revisiting.
Philip, you should be able to patch LYUtils.c:
if (data.st_uid != 0
|| data.st_mode & S_IWOTH) {
to
if (data.st_mode & S_IWOTH) {
This is just a kludge to break the undesirable side-effect; shouldn't be
put into ongoing source or anything.
>Bela<
- Re: lynx-dev rc save bug, Bela Lubkin, 1998/10/07
- Re: lynx-dev rc save bug, dickey, 1998/10/07
- Re: lynx-dev rc save bug, Bela Lubkin, 1998/10/07
- Re: lynx-dev rc save bug, dickey, 1998/10/07
- Re: lynx-dev rc save bug,
Bela Lubkin <=
- Re: lynx-dev rc save bug, dickey, 1998/10/07
- Re: lynx-dev rc save bug, dickey, 1998/10/07
- Re: lynx-dev rc save bug, Bela Lubkin, 1998/10/08
- Re: lynx-dev rc save bug, Bela Lubkin, 1998/10/09