Commit Graph

35 Commits

Author SHA1 Message Date
Pavel Roskin 35aa47461b * sfs.c: Don't use flag EXECUTE_SETUID because it's being
removed as insecure and EXECUTE_WAIT because it has no effect.
* extfs.c: Likewise.
2002-08-19 23:20:03 +00:00
Pavel Roskin 6f3a7c8029 * direntry.c (vfs_s_open): Don't pass O_LINEAR to open() -
this flag is for VFS only, and causes side effects in Cygwin.
* extfs.c (extfs_open): Likewise.
* sfs.c (sfs_open): Likewise.
Reported by Pavel Tsekov <ptsekov@gmx.net>
2002-07-10 17:56:27 +00:00
Pavel Roskin 694468d9bb * sfs.c (sfs_free): Fix memory leak.
(sfs_init): Use PATH_SEP_STR.
2002-07-03 15:27:36 +00:00
Pavel Roskin 78982e7cc5 * sfc.c (sfs_getid): Don't use vfs_die(), return (vfsid)(-1)
instead.
2001-10-02 08:06:37 +00:00
Pavel Roskin 7493ab67ad * sfs.c (sfs_init): Use g_free(), not free() on mc_sfsini. 2001-08-11 04:57:17 +00:00
Andrew V. Samoilov 269af251b8 * sfs.c: Remark about shell removed.
(sfs_init): Optimized.
2001-06-15 22:32:15 +00:00
Pavel Roskin 6fe51516de * cpio.c (vfs_cpiofs_ops): Use short name for the filesystem.
This avoids creating long filenames in dirent.c when the "name"
field is used.
* extfs.c (vfs_extfs_ops): Likewise.
* fish.c (vfs_fish_ops): Likewise.
* ftpfs.c (vfs_ftpfs_ops): Likewise.
* local.c (vfs_local_ops): Likewise.
(vfs_nil_ops): Likewise.
* mcfs.c (vfs_mcfs_ops): Likewise.
* sfs.c (vfs_sfs_ops): Likewise.
* tar.c (vfs_tarfs_ops): Likewise.
* undelfs.c (vfs_undelfs_ops): Likewise.
2001-06-11 21:58:58 +00:00
Pavel Roskin 49d8cd7f50 * sfs.c (sfs_init): Change some warning messages to simplify
their translation.
2001-06-07 05:08:52 +00:00
Andrew V. Samoilov f52cfa5607 2001-05-30 Ludovic Drolez <ludovic.drolez@freealter.com>
* sfs.c (sfs_init): Don't hardcode location of sfs.ini,
	use mc_home to make mc relocatable.
2001-05-30 12:05:50 +00:00
Andrew V. Samoilov 6eda540762 '* src/main.c: Correct some comments after #endif
(shell): Remove comment and #ifdef around shell variable.
(process_args) [HAVE_SUBSHELL_SUPPORT]: All related args enclosed
between one #ifdef ... #endif pair.
(process_args): smbfs_set_debug () takes a debug level as argument,
commented out.

* vfs/sfs.c (shell): Variable moved to ...
* vfs/util-alone.c (shell): ... here'
2001-05-28 14:19:34 +00:00
Pavel Roskin fe7780ab1d * sfs.c (vfs_sfs_ops): Typo fix. 2001-05-26 05:11:17 +00:00
Pavel Roskin 112b99950e * sfs.c (redirect): Don't free the filename after failed
mc_mkstemps() - it's not needed anymore.
2001-05-22 07:11:32 +00:00
Pavel Roskin bea09b932d * src/ext.c (exec_extension): Use mc_mkstemps().
* src/user.c (execute_menu_command): Use mc_mkstemps().
* src/util.c (mc_mkstemps): New function - safely create and
open temporary file. Return the handle and the name.
* src/util.h: Declarations for init_tmpdir() and mc_mkstemps().
Define TMPDIR_DEFAULT and SCRIPT_SUFFIX.
* vfs/direntry.c (vfs_s_open): Use mc_mkstemps. Create and close
temporary file to reserve its name on the filesystem.
(vfs_s_retrieve_file): Use mc_mkstemps().
(g_tempnam): Remove.
* vfs/extfs.c (extfs_open): Use mc_mkstemps().
* vfs/sfs.c (redirect): Likewise.
* vfs/shared_ftp_fish.c (_get_file_entry): Likewise.
(retrieve_file): Likewise.
* vfs/vfs.c (mc_def_getlocalcopy): Likewise.
* vfs/xdirentry.h: Remove declaration of g_tempnam().
2001-05-21 16:21:07 +00:00
Andrew V. Samoilov 1f6dc4fe5a 2000-10-09 Andrew V. Samoilov <sav@bcs.zp.ua>
* sfs.c (redirect): temporary file unlinked on error;

	(sfs_init): warnings are localized
2000-10-09 22:45:50 +00:00
Pavel Machek c319041ba8 2000-05-15 Andrew V. Samoilov <sav@bcs.zp.ua>
* tar.c (read_header): memory leaking for empty symlink's names fixed

	* utilvfs.c (vfs_split_url): *host is not assigned if host is null

	* ftpfs.c (login_server): new features of vfs_split_url () used,
	  my_get_host_and_username became macro

	* vfs.c (mc_opendir, mc_chdir): unneeded calls to concat_dir_and_file
	  removed (vfs_canon removes trailing '/')

	* sfs.c (vfmake, redirect): allocated memory realeased on errors
2000-05-16 14:59:33 +00:00
Pavel Machek 1139602a9b Return value is needed for mc_[un]getlocalcopy. 1999-11-11 14:23:40 +00:00
Norbert Warmuth d988df6100 1999-08-18 Norbert Warmuth <nwarmuth@privat.circular.de>
* vfs/direntry.c (vfs_s_getlocalcopy): There's an aditional strdup
needed. In rare cases a pointer was freed twice. Pavel Machek
pointed this out a while ago but obviously it hasn't been fixed, yet.

* vfs/sfs.c (vfmake): Quote characters with a special meaning to the
shell in filenames/-pathes (Fix Bug #1931, VFS will not work if
your full path has the space character in it.).
1999-08-18 19:08:56 +00:00
Norbert Warmuth 3cf5946891 Revert last patch, it has some issues (you want to update when you already
updated your code with the broken patch).
1999-08-18 05:37:45 +00:00
Norbert Warmuth 8a7769edb3 1999-08-18 Norbert Warmuth <nwarmuth@privat.circular.de>
* vfs/sfs.c (vfmake): Quote characters with a special meaning to the
shell in filenames/-pathes (Fix Bug #1931, VFS will not work if
your full path has the space character in it.).
1999-08-18 04:53:18 +00:00
Miguel de Icaza 34f790657c Fix from Pavel 1999-04-07 17:37:36 +00:00
Timur Bakeyev bf81009392 Actually commit all my changers. Fear :> 1999-01-20 22:01:11 +00:00
Miguel de Icaza 85f17a4dc6 Lots of changes:
- SFS-based file systems now work on GNOME edition, I was
	  not waiting for child process to finish decompressing.

	- VFS code cleanup.  I am going to eventually get rid of all
	  the macro-mania that has creeped into the vfs layer.

Miguel
1999-01-11 00:48:23 +00:00
Norbert Warmuth 749d16ba30 Sat Jan 9 19:15:00 1999 Norbert Warmuth <nwarmuth@privat.circular.de>
* vfs/vfs.c (vfs_timeout_handler): Guard from recursive invocation.

Sat Jan  9 19:13:28 1999  Norbert Warmuth  <nwarmuth@privat.circular.de>

* vfs/sfs.c (sfs_free): Fixed wrong linked list handling (head was
lost after the first iteration).

(sfs_getid): dito, return value was wrong.
1999-01-09 23:08:41 +00:00
Norbert Warmuth e4c8a9d060 Thu Dec 31 08:47:15 1998 Norbert Warmuth <nwarmuth@privat.circular.de>
* sfs.c (sfs_nothingisopen): Assume for now it's always save to free
this filesystem and delete temporary files. This needs further
investigation.

* tar.c: deleted unused empty struct tar_super.

Thu Dec 31 08:40:44 1998  Norbert Warmuth  <nwarmuth@privat.circular.de>

* direntry.c: Split fd_usage into fd_usage and ino_usage. fd_usage
was used for external and internal reference count. This was wrong
because we can free resources taken up by the vfs as soon as the
external reference count (now fd_usage) is zero. The internal
reference count (ino_usage) mustn't matter because the vfs has to
clean up itself in the correct order.
1998-12-31 15:54:49 +00:00
Miguel de Icaza 8fb1821455 Warning fixes + compile fixes -mig 1998-12-15 19:53:55 +00:00
Pavel Machek 965880696c Security (inspired by Norbert Warmuth): make /tmp files 0600 and
create them with O_EXCL for sfs and extfs.
1998-12-15 15:57:39 +00:00
Pavel Machek f51a940aec Removed debugging messages and fixed Makefile.in. 1998-10-23 10:38:22 +00:00
Pavel Machek 37e364fe67 BIG changes: tar now uses brand-new direntry.c. Hope it does not hurt
too much.
1998-10-23 08:26:25 +00:00
Pavel Machek 176dc1f70d static's added, do_reget hack removed 1998-10-12 22:07:53 +00:00
Pavel Machek 136006707c Fixed cursor positioning so that it does not call any vfs code, few
statics added to vfs layer, no longer use '0' in place of NULL.
1998-09-29 16:01:16 +00:00
Pavel Machek a92e6f3ea8 Changed license to LGPL, added passing of vfs * (acting as self), so
we can do OOP-like trics.
1998-09-27 19:27:58 +00:00
Pavel Machek 7d12623b27 Cleaned up some warnings. 1998-09-18 14:28:07 +00:00
Norbert Warmuth e87670a3bd 1998-09-14 Norbert Warmuth <k3190@fh-sw.de>
* sfs.c (sfs_free): assignment operator was used to check for equality
1998-09-14 19:21:04 +00:00
Pavel Machek 6bc8719e94 Minor ommission fixed, it should compile, now. 1998-09-14 08:14:31 +00:00
Pavel Machek 3d0a91d4a8 Added vfs_uid for use by libvfs.so users (rpc.nfsd)
Added single file filesystem (sfs)
Added vfs_flags so library users can disable selected filesystems
Minor shuffling of functions so garbage collection works for library
1998-08-25 16:00:16 +00:00