From 9794095354b761547fd78720c7631153dc138b3d Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 8 Apr 2008 16:12:24 +0000 Subject: * mount.cc (mount_info::from_fstab): Read user fstab files from /etc/fstab.d/$USER to avoid user write access to /etc. * postinstall: Use variables for filenames. Create /etc/fstab.d dir with 01777 permissions. --- winsup/cygwin/mount.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'winsup/cygwin/mount.cc') diff --git a/winsup/cygwin/mount.cc b/winsup/cygwin/mount.cc index ba6f42bb1..83d45d5de 100644 --- a/winsup/cygwin/mount.cc +++ b/winsup/cygwin/mount.cc @@ -914,7 +914,7 @@ mount_info::from_fstab (bool user) PWCHAR u = wcpcpy (w, L"\\etc\\fstab"); if (user) - sys_mbstowcs (wcpcpy (u, L"."), NT_MAX_PATH - (u - path), + sys_mbstowcs (wcpcpy (u, L".d\\"), NT_MAX_PATH - (u - path), cygheap->user.name ()); debug_printf ("Try to read mounts from %W", path); HANDLE h = CreateFileW (path, GENERIC_READ, FILE_SHARE_READ, &sec_none_nih, -- cgit v1.2.3