diff options
author | Thomas E. Dickey <dickey@invisible-island.net> | 2015-03-22 15:40:08 -0400 |
---|---|---|
committer | Thomas E. Dickey <dickey@invisible-island.net> | 2015-03-22 15:40:08 -0400 |
commit | d8e200ac5cfe78e4b56cfd34add92a539f04ac28 (patch) | |
tree | d5e63a19a089787075e529675c08d66321784ae8 /src/LYUtils.c | |
parent | 7e3f4d2b367c923c6cf36e25b6f908c576c9fc82 (diff) | |
download | lynx-snapshots-d8e200ac5cfe78e4b56cfd34add92a539f04ac28.tar.gz |
snapshot of project "lynx", label v2-8-9dev_4a
Diffstat (limited to 'src/LYUtils.c')
-rw-r--r-- | src/LYUtils.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/LYUtils.c b/src/LYUtils.c index c99c51df..4772fa47 100644 --- a/src/LYUtils.c +++ b/src/LYUtils.c @@ -1,5 +1,5 @@ /* - * $LynxId: LYUtils.c,v 1.273 2014/12/30 22:16:41 Gisle.Vanem Exp $ + * $LynxId: LYUtils.c,v 1.274 2015/03/22 15:38:23 tom Exp $ */ #include <HTUtils.h> #include <HTTCP.h> @@ -5862,9 +5862,9 @@ static BOOL IsOurSymlink(const char *name) #endif /* - * Verify if this is really a file, not accessed by a link, except for the - * special case of its directory being pointed to by a link from a directory - * owned by root and not writable by other users. + * Verify if this is really a file which is not accessed by a symbolic link, + * except for the special case of its directory being pointed to by a link from + * a directory owned by root and not writable by other users. */ BOOL IsOurFile(const char *name) { @@ -5875,7 +5875,6 @@ BOOL IsOurFile(const char *name) && lstat(name, &data) == 0 && ((S_ISREG(data.st_mode) && (data.st_mode & (S_IWOTH | S_IWGRP)) == 0 - && data.st_nlink == 1 && data.st_uid == getuid()) #if defined(HAVE_LSTAT) && defined(S_IFLNK) || (S_ISLNK(data.st_mode) && IsOurSymlink(name)) @@ -5915,6 +5914,10 @@ BOOL IsOurFile(const char *name) * uid we can count on is 0. It would be nice to add a * check for the gid also, but that wouldn't be * portable. + * + * Likewise, the t-bit would be nice to rely upon. However + * it is marked as an extension in POSIX, rather than + * required. */ if (data.st_uid != 0 || (data.st_mode & S_IWOTH) != 0) { |