From cbffef93e9ea392a331ffacb04288333ae5475ba Mon Sep 17 00:00:00 2001 From: das Date: Tue, 20 Jul 2004 10:12:29 +0000 Subject: * unix/tclUnixFile.c (NativeMatchType): added support for readonly matching of user immutable files (where available). --- ChangeLog | 5 +++++ unix/tclUnixFile.c | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 30a5964..a2879a6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2004-07-20 Daniel Steffen + * unix/tclUnixFile.c (NativeMatchType): added support for + readonly matching of user immutable files (where available). + +2004-07-20 Daniel Steffen + * 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)) || -- cgit v0.12