Re: proposed patch to mktexlsr

[email protected] (Frank Küster)
Newsgroups gmane.comp.tex.tetex.beta
Message-ID <[email protected]>
Olaf Weber <[email protected]> schrieb:

> Thomas Esser writes:
>
>>> - if we don't have write permissions to the directory, but the file
>>>   exists yet, we don't skip this directory. Below the script checks if
>>>   the file is writeable, anyway:
>
> The way we handle the file update requires write permission to the
> directory as well as the file itself.  I fail to see why this change
> is an improvement.

You're right. I missed that this change is in the context of a further
change. We also apply the following patch:

-  # To be really safe, a loop.
-  until PERMS=`kpsestat = "$db_file"`; do sleep 1; done
-  chmod $PERMS "$db_file_tmp"
-  rm -f "$db_file"
-  mv "$db_file_tmp" "$db_file"
-  rm -rf "$db_dir_tmp"
+  cat "$db_file_tmp" > "$db_file"
+  rm -f "$db_file_tmp"

But db_file_tmp is created securely by our tempfile program. 

I am not sure whether this has any other implications (and I didn't
develop it). Just for your information I attach the complete
Debian-specific patch that we apply to mktexlsr, there's also hunks for
other files in it.

Regards, Frank


-- 
Frank Küster, Biozentrum der Univ. Basel
Abt. Biophysikalische Chemie
patch-deb (application/octet-stream, 17.7 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.