Commit Graph

6 Commits

Author SHA1 Message Date
Corinna Vinschen 9794095354 * 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.
2008-04-08 16:12:24 +00:00
Corinna Vinschen bffffaf652 * postinstall: Disable adding registry mounts to /etc/fstab for now. 2008-04-08 07:58:12 +00:00
Corinna Vinschen f471ca85e1 * postinstall: Add function print_flags and call where appropriate.
Omit system and cygdrive flag when testing cygdrive flags.
2008-04-07 16:37:20 +00:00
Corinna Vinschen 6c74e7d7fc * postinstall: Set IFS to LF only. Change while loop in subshell to
for loop in parent shell.  Add code to read system mount points and
	system cygdrive prefix from registry and append them to /etc/fstab.
2008-04-07 14:09:22 +00:00
Corinna Vinschen 93c5415116 * path.cc (struct opt): Rename "system" to "nouser".
* postinsatll: Ditto.
2008-04-06 09:56:42 +00:00
Corinna Vinschen ac6f159cd7 * postinstall: New script.
* Makefile.in (sysconfdir): Define.
	(install): Create $(sysconfdir)/postinstall dir.  Install postinstall
	script into it.

	* path.cc: Add temorary comments to note later function removal.
	(conv_fstab_spaces): New inline function to handle \040 to space
	conversion.
	(struct opt): Add "system" and "user" mount options.
	(mount_info::from_fstab_line): Only allow # to start a comment at
	the beginning of the line.  Call conv_fstab_spaces on native_path and
	posix_path fields.  Don't enforce system mounts in /etc/fstab.
	Drop last argument in call to add_item.
	(mount_info::from_fstab): Create a default cygdrive entry.  Load
	user mount points from fstab.<username> instead of fstab.<sid>.
	(mount_info::read_mounts): Drop last argument in call to add_item.
	(mount_info::add_reg_mount): Remove.
	(mount_info::del_reg_mount): Remove.
	(mount_info::write_cygdrive_info): Rename from
	mount_info::write_cygdrive_info_to_registry.  Don't write to registry.
	Disallow to overwrite a system cygdrive prefix.
	(mount_info::remove_cygdrive_info_from_registry): Remove.
	(mount_info::get_cygdrive_info): Just fetch current cygdrive prefix and
	flags.
	(mount_info::add_item): Drop last argument.  Don't write to registry.
	Disallow to overwrite a system mount point.
	(mount_info::del_item): Drop last argument.  Don't write to registry.
	Disallow to remove a system mount point.
	(mount): Enforce user mount.
	(cygwin_umount): Ditto.
	* shared_info.h (mount_info::add_item): Drop last argument.
	(mount_info::del_item): Ditto.
	(mount_info::add_reg_mount): Remove.
	(mount_info::del_reg_mount): Remove.
	(mount_info::write_cygdrive_info): Rename from
	mount_info::write_cygdrive_info_to_registry.
	(mount_info::remove_cygdrive_info_from_registry): Remove.
2008-04-05 09:30:06 +00:00