Increased version number to 4.5.2

Documentation update.

1998-10-30  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* fish.c (command): Replace vnsprintf with g_strdup_vprintf.  This
	is both safe and more correct, as there is no limit on the
	pathname.

	* ftpfs.c (command): Same as above.

	* util-alone.c (print_vfs_message): Same as above.

1998-10-30  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* layout.c (print_vfs_message): Use g_snprintf instead of
	vnsprintf.
This commit is contained in:
Miguel de Icaza 1998-10-30 17:45:43 +00:00
parent e704d53f77
commit f15ee9faf9
12 changed files with 884 additions and 638 deletions

View File

@ -5,7 +5,7 @@ AC_INIT(create_vcs)
AC_CONFIG_HEADER(config.h)
PACKAGE=mc
VERSION=4.5.0
VERSION=4.5.2
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
AC_SUBST(VERSION)

View File

@ -2082,7 +2082,7 @@ regular Unix file system; the <em/ftpfs/, used to manipulate files on
remote systems with the FTP protocol; the <em/tarfs/, used to
manipulate tar and compressed tar files; the <em/undelfs/, used to
recover deleted files on ext2 file systems (the default file system
for Linux systems), fish (for manipulating files over shell connection
for Linux systems), fish (for manipulating files over shell connections
such as rsh/ssh) and finally the <em/mcfs/ (Midnight Commander file
system), a network based file system.
@ -2247,13 +2247,13 @@ to extract the selected files into a regular partition.
To use this file system, you have to chdir into the special file name
formed by the "/#undel:" prefix and the file name where the actual
file system resides (without /dev/ prefix).
file system resides.
For example, to recover deleted files on the second partition of the
first scsi disk on Linux, you would use the following path name:
<tscreen><verb>
/#undel:sda2
/#undel:/dev/sda2
</verb></tscreen>
It may take a while for the undelfs to load the required information

View File

@ -1,3 +1,10 @@
1998-10-27 Miguel de Icaza <miguel@nuclecu.unam.mx>
* gscreen.c (panel_icon_list_button_release): Remove unused
variable.
Provide hand written CList-start drag code
1998-10-30 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gmetadata.c (meta_get_icon_pos): Renamed from

1335
po/mc.pot

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,9 @@
1998-10-30 Miguel de Icaza <miguel@nuclecu.unam.mx>
* layout.c (print_vfs_message): Use g_snprintf instead of
vnsprintf.
1998-10-30 Sung-Hyun Nam <namsh@lgic.co.kr>
* color.c, slint.c: support transparent background if user use

View File

@ -41,6 +41,7 @@
# include <unistd.h>
#endif
#include <signal.h>
#include <glib.h>
#include "tty.h"
#include "mad.h"
#include "util.h" /* Needed for the externs */
@ -854,18 +855,16 @@ void set_hintbar(char *str)
}
}
void print_vfs_message(char *msg, ...)
void print_vfs_message (char *msg, ...)
{
va_list ap;
char str[128];
char str [128];
va_start(ap, msg);
vsnprintf(str, 126, msg, ap);
/* Before you kill me for using non-portable vsnprintf... It is
neccessary: vfs layer may print arbitrary long messages (they
contain pathname). If you know how to solve it, please do so,
but this is probably exploitable buffer overrun.) */
va_end(ap);
va_start (ap, msg);
g_vsnprintf (str, 126, msg, ap);
va_end (ap);
if (midnight_shutdown || !the_hint || !the_hint->widget.parent)
return;

View File

@ -53,6 +53,7 @@ Topics:
 Virtual File System Virtual File System
 FTP File System FTP File System
 Tar File System Tar File System
 FIle transfer over SHell filesystem FIle transfer over SHell filesystem
 Network File System Network File System
 Undelete File System Undelete File System
 Colors Colors
@ -405,6 +406,14 @@ dir of the current dir.
does a chdir to ".." and to the currently selected
directory respectively.
M-y Moves to the previous directory in the history,
equivalent to depressing the '<' with the mouse.
M-u Moves to the next directory in the history, equivalent
to depressing the '>' with the mouse. Displays the
directory history, equivalent to depressing the 'v' with
the mouse.
[Shell Command Line]
Shell Command Line
@ -2173,15 +2182,17 @@ virtual file system switch. The virtual file system switch
allows the Midnight Commander to manipulate files not
located on the Unix file system.
Currently the Midnight Commander is packaged with five
Currently the Midnight Commander is packaged with some
Virtual File Systems (VFS): the local file system, used
for accessing the regular Unix file system; the ftpfs,
used to manipulate files on remote systems with the FTP
protocol; the tarfs, used to manipulate tar and compressed
tar files; the undelfs, used to recover deleted files on
ext2 file systems (the default file system for Linux
systems) and finally the mcfs (Midnight Commander file
system), a network based file system.
systems), fish (for manipulating files over shell
connections such as rsh and ssh) and finally the mcfs
(Midnight Commander file system), a network based file
system.
The VFS switch code will interpret all of the path names
used and will forward them to the correct file system, the
@ -2197,7 +2208,7 @@ command FTP link (accessible from the menubar) or you may
directly change your current directory to it using the cd
command to a path name that looks like this:
ftp://[!][user[:pass]@]machine[:port][remote-dir]
/#ftp:[!][user[:pass]@]machine[:port][remote-dir]
The, user, port and remote-dir elements are optional. If
you specify the user element, then the Midnight Commander
@ -2210,11 +2221,11 @@ there, and then, it may not be entirely safe anyways).
Examples:
ftp://ftp.nuclecu.unam.mx/linux/local
ftp://tsx-11.mit.edu/pub/linux/packages
ftp://!behind.firewall.edu/pub
ftp://guest@remote-host.com:40/pub
ftp://miguel:xxx@server/pub
/#ftp:ftp.nuclecu.unam.mx/linux/local
/#ftp:tsx-11.mit.edu/pub/linux/packages
/#ftp:!behind.firewall.edu/pub
/#ftp:guest@remote-host.com:40/pub
/#ftp:miguel:xxx@server/pub
To connect to sites behind a firewall, you will need to
use the prefix ftp://! (ie, with a bang character after
@ -2257,7 +2268,7 @@ command. To change your directory to a tar file, you
change your current directory to the tar file by using the
following syntax:
tar:filename.tar[dir-inside-tar]
/filename.tar:utar/[dir-inside-tar]
The mc.ext file already provides a shortcut for tar files,
this means that usually you just point to a tar file and
@ -2266,10 +2277,39 @@ File Edit Extension File Edit section for details on how this is done.
Examples:
tar:mc-3.0.tar.gz/mc-3.0/vfs
tar:/ftp/GCC/gcc-2.7.0.tar
mc-3.0.tar.gz#utar/mc-3.0/vfs
/ftp/GCC/gcc-2.7.0.tar#utar
The latter specifies the full path of the tar archive.
The latter specifies the full path of the tar archive.[FIle transfer over SHell filesystem]
FIle transfer over SHell filesystem
The fish file system is a network based file system that
allows you to manipulate the files in a remote machine as
if they were local. To use this, the other side has to
either run fish server, or has to have bash-compatible
shell.
To connect to a remote machine, you just need to chdir
into a special directory which name is in the following
format:
/#sh:[user@]machine[:options];/[remote-dir];</em>
The, user, options and remote-dir elements are optional.
If you specify the user element then the Midnight
Commander will try to logon on the remote machine as that
user, otherwise it will use your login name.
The options are 'C' - use compression and 'rsh' use rsh
instead of ssh. If the remote-dir element is present, your
current directory on the remote machine will be set to
this one.
Examples:
/#sh:onlyrsh.mx:r/linux/local
/#sh:joe@want.compression.edu:C/private
/#sh:joe@noncompressed.ssh.edu/private
[Network File System]
Network File System
@ -2283,7 +2323,7 @@ To connect to a remote machine, you just need to chdir
into a special directory which name is in the following
format:
mc:[user@]machine[:port][remote-dir]
/#mc:[user@]machine[:port][remote-dir]
The, user, port and remote-dir elements are optional. If
you specify the user element then the Midnight Commander
@ -2298,8 +2338,8 @@ machine will be set to this one.
Examples:
mc:ftp.nuclecu.unam.mx/linux/local
mc:joe@foo.edu:11321/private
/#mc:ftp.nuclecu.unam.mx/linux/local
/#mc:joe@foo.edu:11321/private
[Undelete File System]
Undelete File System
@ -2314,14 +2354,14 @@ and to extract the selected files into a regular
partition.
To use this file system, you have to chdir into the
special file name formed by the "undel:" prefix and the
special file name formed by the "/#undel" prefix and the
file name where the actual file system resides.
For example, to recover deleted files on the second
partition of the first scsi disk on Linux, you would use
the following path name:
undel:/dev/sda2
/#undel:/dev/sda2
It may take a while for the undelfs to load the required
information before you start browsing files there.
@ -2595,6 +2635,11 @@ everywhere).
[FILES]
FILES
The program will retrieve all of its information relative
to the MCHOME environment variable, if this variable is
not set, then it will fall back to the @prefix@ directory.
@prefix@/lib/mc.hlp The help file for the program.
@prefix@/lib/mc/mc.ext The default system-wide extensions

View File

@ -133,11 +133,9 @@ typedef struct {
void *back_b;
void *fwd_b;
void *up_b;
/* Used during drag and drop */
int maybe_start_drag;
int click_x, click_y;
#endif
} WPanel;

View File

@ -1,3 +1,13 @@
1998-10-30 Miguel de Icaza <miguel@nuclecu.unam.mx>
* fish.c (command): Replace vnsprintf with g_strdup_vprintf. This
is both safe and more correct, as there is no limit on the
pathname.
* ftpfs.c (command): Same as above.
* util-alone.c (print_vfs_message): Same as above.
Wed Oct 28 17:06:57 1998 Pavel Machek <pavel@atrey.karlin.mff.cuni.cz>
* ftpfs.c: report which directory you are listing, fix behaviour

View File

@ -43,6 +43,7 @@
#include <pwd.h>
#include <grp.h>
#include <ctype.h> /* For isdigit */
#include <glib.h>
#ifdef SCO_FLAVOR
# include <sys/timeb.h> /* alex: for struct timeb definition */
#endif /* SCO_FLAVOR */
@ -156,22 +157,22 @@ static int command (struct connection *bucket, int wait_reply,
char *fmt, ...)
{
va_list ap;
char buf[2048]; /* FIXME: buffer exceed ?? */
char *str;
int n, status;
va_start (ap, fmt);
vsnprintf (buf, 2046, fmt, ap);
va_end (ap);
n = strlen(buf);
buf[n] = 0;
va_start (ap, fmt);
str = g_strdup_vprintf (fmt, ap);
va_end (ap);
if (logfile){
fwrite (buf, strlen (buf), 1, logfile);
fwrite (str, strlen (str), 1, logfile);
fflush (logfile);
}
enable_interrupt_key();
status = write(qsockw(bucket), buf, strlen(buf));
status = write (qsockw (bucket), str, strlen (str));
g_free (str);
if (status < 0){
code = 421;
if (errno == EPIPE){
@ -183,7 +184,7 @@ static int command (struct connection *bucket, int wait_reply,
disable_interrupt_key();
if (wait_reply)
return get_reply (qsockr(bucket), (wait_reply & WANT_STRING) ? reply_str : NULL, sizeof (reply_str)-1);
return get_reply (qsockr (bucket), (wait_reply & WANT_STRING) ? reply_str : NULL, sizeof (reply_str) - 1);
return COMPLETE;
}

View File

@ -225,41 +225,45 @@ static int
command (struct connection *bucket, int wait_reply, char *fmt, ...)
{
va_list ap;
char buf[2048]; /* FIXME: buffer exceed ?? */
char *str, *fmt_str;
int n, status;
int sock = qsock (bucket);
va_start (ap, fmt);
vsnprintf (buf, 2046, fmt, ap);
fmt_str = g_strdup_vprintf (fmt, ap);
va_end (ap);
n = strlen(buf);
buf[n++] = '\r';
buf[n++] = '\n';
buf[n] = 0;
str = copy_strings (fmt_str, "\r\n", NULL);
g_free (fmt_str);
if (logfile){
if (strncmp (buf, "PASS ", 5) == 0) {
if (strncmp (str, "PASS ", 5) == 0){
char *tmp = "PASS <Password not logged>\r\n";
fwrite (tmp, strlen (tmp), 1, logfile);
} else
fwrite (buf, strlen (buf), 1, logfile);
fflush (logfile);
}
got_sigpipe = 0;
enable_interrupt_key();
status = write(sock, buf, strlen(buf));
enable_interrupt_key ();
status = write (sock, str, strlen (str));
free (str);
if (status < 0){
code = 421;
if (errno == EPIPE){
got_sigpipe = 1;
}
disable_interrupt_key();
disable_interrupt_key ();
return TRANSIENT;
}
disable_interrupt_key();
disable_interrupt_key ();
if (wait_reply)
return get_reply (sock, (wait_reply & WANT_STRING) ? reply_str : NULL, sizeof (reply_str)-1);
return COMPLETE;
}

View File

@ -144,14 +144,15 @@ vfs_get_password (char *msg)
void
print_vfs_message (char *msg, ...)
{
char buf [4096];
char *str;
va_list args;
va_start (args,msg);
vsnprintf (buf, sizeof (buf)-1, msg, args);
info_puts (buf);
str = g_strdup_vprintf (msg, args);
va_end (args);
info_puts (str);
g_free (str);
}
void