vile
[Top][All Lists]
Advanced

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

Re: [vile] Tags not working, how to diagnose?


From: Thomas Dickey
Subject: Re: [vile] Tags not working, how to diagnose?
Date: Sat, 20 Oct 2007 17:38:31 -0400 (EDT)

On Sat, 20 Oct 2007, Chris G wrote:

On Sat, Oct 20, 2007 at 11:53:58AM -0400, Paul Fox wrote:
chris wrote:
> Same directory, same file that vile can't read/see for some reason.
>
> As a final test I copied the whole directory where I just did the
> successful test on my work system to my home system and tried vile
> there.  With the identical tags file that works with vile on Fedora 7
> at work I get "[No tags file available.]".

would it be worth running with strace, to see where vile is actually
looking for the file?

Here's the (hopefully) relevant bit of the result:-

   rt_sigprocmask(SIG_BLOCK, [ALRM], [], 8) = 0
   select(1, [0], NULL, NULL, {0, 0})      = 0 (Timeout)
   rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
   access("tags", R_OK)                    = 0
   stat("/home/chris/wmsfixbuildTFEE7.5.0dev/SUN5/TV", {st_mode=S_IFDIR|0775, 
st_size=4096, ...>

When I run strace to compare, I see (depending on whether I have tagrelative set), either a stat() for the tags filename (set) or the top-level directory (unset), as it collects the directory information to get the current-working-directory path.

I see the problem though - the strace is going into this chunk in bind.c:

        if (ffaccess(fname, mode)) {
#if SYS_UNIX
            int success = FALSE;

            if (mode & FL_EXECABLE) {
                char *dname = malloc(NFILEN + strlen(fname) + 10);
                if (dname != 0) {
                    sprintf(dname, "%s%c..", fname, vl_pathsep);
                    lengthen_path(dname);
                    if (is_our_file(dname) && is_our_file(fname)) {
                        success = TRUE;
                    }
                    free(dname);
                }
            } else {
                success = TRUE;
            }
            if (success)
#endif

The is_our_file() call is seeing that your directory is group-writable.
I added a check last year:

 20061212 (m)
        + disallow source'ing from the current directory if the source'd file
          might be writable by other users.

The check is really aimed at sourcing things like .vilerc, but tags
happens to be using the same function.  So vile ignores that file,
continues looking for something better.

It "should" work if you chmod the directory to 755.

If I do "ls -al" in /home/chris/wmsfixbuildTFEE7.5.0dev/SUN5/TV I get:-

   drwxrwxr-x 2 chris chris   4096 2007-10-20 20:19 .
   drwxrwxr-x 3 chris chris   4096 2007-10-20 15:11 ..
   -r--r--r-- 1 chris chris   2212 2007-10-20 15:11 Makefile

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




reply via email to

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