diff options
author | das <das> | 2004-07-20 10:12:29 (GMT) |
---|---|---|
committer | das <das> | 2004-07-20 10:12:29 (GMT) |
commit | cbffef93e9ea392a331ffacb04288333ae5475ba (patch) | |
tree | e1a25992ef3c631f676418431edca778b7e352b1 | |
parent | 281500f39ea00f49bce3fd08e71e69b440482c21 (diff) | |
download | tcl-cbffef93e9ea392a331ffacb04288333ae5475ba.zip tcl-cbffef93e9ea392a331ffacb04288333ae5475ba.tar.gz tcl-cbffef93e9ea392a331ffacb04288333ae5475ba.tar.bz2 |
* unix/tclUnixFile.c (NativeMatchType): added support for
readonly matching of user immutable files (where available).
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | unix/tclUnixFile.c | 6 |
2 files changed, 10 insertions, 1 deletions
@@ -1,5 +1,10 @@ 2004-07-20 Daniel Steffen <das@users.sourceforge.net> + * unix/tclUnixFile.c (NativeMatchType): added support for + readonly matching of user immutable files (where available). + +2004-07-20 Daniel Steffen <das@users.sourceforge.net> + * macosx/tclMacOSXBundle.c: dynamically acquire address for CFBundleOpenBundleResourceMap symbol, since it is only present in full CoreFoundation on Mac OS X and not in CFLite on pure Darwin. diff --git a/unix/tclUnixFile.c b/unix/tclUnixFile.c index e0f5cf5..07e43fc 100644 --- a/unix/tclUnixFile.c +++ b/unix/tclUnixFile.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixFile.c,v 1.40 2004/06/18 20:38:02 dgp Exp $ + * RCS: @(#) $Id: tclUnixFile.c,v 1.41 2004/07/20 10:12:29 das Exp $ */ #include "tclInt.h" @@ -378,8 +378,12 @@ NativeMatchType( /* * readonly means that there are NO write permissions * (even for user), but execute is OK for anybody + * OR that the user immutable flag is set (where supported). */ if (((types->perm & TCL_GLOB_PERM_RONLY) && +#if defined(HAVE_CHFLAGS) && defined(UF_IMMUTABLE) + !(buf.st_flags & UF_IMMUTABLE) && +#endif (buf.st_mode & (S_IWOTH|S_IWGRP|S_IWUSR))) || ((types->perm & TCL_GLOB_PERM_R) && (access(nativeEntry, R_OK) != 0)) || |