vile
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vile] vile-9.7r.patch.gz


From: Thomas Dickey
Subject: Re: [vile] vile-9.7r.patch.gz
Date: Tue, 26 May 2009 11:37:22 -0400 (EDT)

On Tue, 26 May 2009, Steven Lembark wrote:

On Mon, 25 May 2009 20:51:46 -0400
   $ ls -al /opt/vile/local;
   total 8
   drwxr-sr-x 2 lembark root   23 Mar 25 09:48 .
   drwxr-sr-x 9 lembark root  116 May 26 10:12 ..
   -rw-r--r-- 1 lembark root 5098 Mar  5 09:47 filters.rc


The directory mods are 02755 for /opt/vile, /opt/vile/local.

This happens to be as myself and su (root).

What the hell is causing this? I've had a shared
/opt/vile/local/filters.rc for some time now without
problems. One of the updates from n-q introduced some
sort of bug: the file is there, it is readable.

It is this check (which appears to bite other people than me):

static int
is_our_file(char *fname)
{
    int status = FALSE;
    struct stat sb;

    if (stat(fname, &sb) == 0) {
        if ((sb.st_mode & 0022) == 0
            && (sb.st_uid == getuid() || sb.st_uid == 0)) {
            status = TRUE;
        } else {
            TPRINTF(("\"%s\" is not our %s\n",
                     fname, S_ISDIR(sb.st_mode) ? "directory" : "file"));
        }
    }
    return status;
}

called from check_file_access in bind.c

It was originally just for ensuring that it didn't prevent sourcing .vilerc in the current directory, but I redesigned it in 9.7q (prompted
by Paul Fox's question about not being able to source a group-writable
.vilerc from the current directory).

I modified the original code to make it configurable, and made the default include the home-directory. Setting check-access to none should make the
problem go away...

--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net




reply via email to

[Prev in Thread] Current Thread [Next in Thread]