summaryrefslogtreecommitdiffstats
path: root/winsup/doc
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2015-12-01 15:02:14 +0100
committerCorinna Vinschen <corinna@vinschen.de>2015-12-07 17:37:44 +0100
commitfb71716d2c248de22ecd86dd8e3a1f4185eb8e87 (patch)
treee86a1fed507c62251bcfe17b7832c8d8fcde3dc1 /winsup/doc
parent5644f71428ba571b733db255e31dc39aba13ad8a (diff)
downloadcygnal-fb71716d2c248de22ecd86dd8e3a1f4185eb8e87.tar.gz
cygnal-fb71716d2c248de22ecd86dd8e3a1f4185eb8e87.tar.bz2
cygnal-fb71716d2c248de22ecd86dd8e3a1f4185eb8e87.zip
Introduce the 'usertemp' filesystem type
* mount.cc (mount_info::from_fstab_line): Support mounting the current user's temp folder as /tmp/. This is particularly useful a feature when Cygwin's own files are write-protected. * pathnames.xml: document the new usertemp file system type Detailed explanation: In the context of Windows, there is a per-user directory for temporary files, by default specified via the environment variable %TEMP%. Let's allow to use that directory for our /tmp/ directory. With this patch, we introduce the special filesystem type "usertemp": By specifying none /tmp usertemp binary,posix=0 0 0 in /etc/fstab, the /tmp/ directory gets auto-mounted to the directory specified by the %TEMP% variable. This feature comes handy in particularly in scenarios where the administrator might want to write-protect the entire Cygwin directory yet still needs to allow users to write into the /tmp/ directory. This is the case in the context of Git for Windows, where the Cygwin (MSys2) root directory lives inside C:\Program Files and hence /tmp/ would not be writable otherwise. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Diffstat (limited to 'winsup/doc')
-rw-r--r--winsup/doc/ChangeLog4
-rw-r--r--winsup/doc/pathnames.xml24
2 files changed, 25 insertions, 3 deletions
diff --git a/winsup/doc/ChangeLog b/winsup/doc/ChangeLog
index f9ae2b54e..4bdeb5fce 100644
--- a/winsup/doc/ChangeLog
+++ b/winsup/doc/ChangeLog
@@ -1,3 +1,7 @@
+2015-12-07 Johannes Schindelin <johannes.schindelin@gmx.de>
+
+ * pathnames.xml: Document the new usertemp file system type.
+
2015-12-06 Corinna Vinschen <corinna@vinschen.de>
* new-features.xml (ov-new2.4): Document cygpath -U option.
diff --git a/winsup/doc/pathnames.xml b/winsup/doc/pathnames.xml
index 9077303b4..9941633c4 100644
--- a/winsup/doc/pathnames.xml
+++ b/winsup/doc/pathnames.xml
@@ -74,9 +74,10 @@ doesn't matter if you write <literal>FAT</literal> into this field even if
the filesystem is NTFS. Cygwin figures out the filesystem type and its
capabilities by itself.</para>
-<para>The only exception is the file system type cygdrive. This type is
-used to set the cygdrive prefix. For a description of the cygdrive prefix
-see <xref linkend="cygdrive"></xref></para>
+<para>The only two exceptions are the file system types cygdrive and usertemp.
+The cygdrive type is used to set the cygdrive prefix. For a description of
+the cygdrive prefix see <xref linkend="cygdrive"></xref>, for a description of
+the usertemp file system type see <xref linkend="usertemp"></xref></para>
<para>The fourth field describes the mount options associated
with the filesystem. It is formatted as a comma separated list of
@@ -354,6 +355,23 @@ independently from the current cygdrive prefix:</para>
</sect2>
+<sect2 id="usertemp"><title>The usertemp file system type</title>
+
+<para>On Windows, the environment variable <literal>TEMP</literal> specifies
+the location of the temp folder. It serves the same purpose as the /tmp/
+directory in Unix systems. In contrast to /tmp/, it is by default a
+different folder for every Windows. By using the special purpose usertemp
+file system, that temp folder can be mapped to /tmp/. This is particularly
+useful in setups where the administrator wants to write-protect the entire
+Cygwin directory. The usertemp file system can be configured in /etc/fstab
+like this:</para>
+
+<screen>
+ none /tmp usertemp binary,posix=0 0 0
+</screen>
+
+</sect2>
+
<sect2 id="pathnames-symlinks"><title>Symbolic links</title>
<para>Symbolic links are not present and supported on Windows until Windows