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

Bug#203532: tetex-extra: permissions of ls-R wrong



From: Julian Gilbey <jdg@polya.uklinux.net>
Subject: Bug#203532: tetex-extra: permissions of ls-R wrong
Date: Thu, 31 Jul 2003 17:09:50 +0100

> The simplest way is probably to modify mktexlsr to do the following:
> 
>   - (safely) create the temporary file in $TMPDIR instead of in the
>     same directory as the existing ls-R
>   - when all is successful, cat $db_file_tmp > $db_file, so that the
>     permissions are preserved.
> 
> Here is a patch which does this; what do people think?

I have a question.  With this patch, I tested mktexlsr
and found that this patch fixed the cron's problem #198549
but didn't fix #198546.

I suspect that the following modification is necessary.

--- mktexlsr.orig       2003-08-19 12:30:22.000000000 +0900
+++ mktexlsr    2003-08-19 14:51:28.000000000 +0900
@@ -80,7 +80,7 @@
   db_dir=`echo "$db_file" | sed 's%/[^/][^/]*$%%'` # can't rely on dirname

   test -d "$db_dir" || continue
-  test -w "$db_dir" || { echo "$progname: $db_dir: directory not writable. Skipping..." >&2; continue; }
+  test -w "$db_dir" || { echo "$progname: $db_dir: directory not writable. But try anyway..." >&2; }

   if test ! -f "$db_file"; then
     cp /dev/null "$db_file"

Does this have security problem?  If so, is there any
solution or I overlooked something essential?

Regards,			   2003-8-20(Wed)

-- 
 Debian Developer & Debian JP Developer - much more I18N of Debian
 Atsuhito Kohda <kohda@debian.org>
 Department of Math., Univ. of Tokushima



Reply to: