From: ian Date: Thu, 10 Aug 2000 00:18:31 +0000 (+0000) Subject: @@ -1,3 +1,9 @@ X-Git-Tag: rel-uservutils-0-2-0~4 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ian/git?p=userv-utils.git;a=commitdiff_plain;h=bc79a75c2bd7600387d3cca68b9fb4f073c6b6db @@ -1,3 +1,9 @@ +userv-utils (0.2.0) unstable; urgency=low + + * ipif/INSTALL instructions slightly improved, slattach patch included. + + -- + userv-utils (0.1.90) unstable; urgency=low * ipif/INSTALL instructions, such as they are, included. --- diff --git a/changelog b/changelog index e7b9e13..35580e4 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,9 @@ +userv-utils (0.2.0) unstable; urgency=low + + * ipif/INSTALL instructions slightly improved, slattach patch included. + + -- + userv-utils (0.1.90) unstable; urgency=low * ipif/INSTALL instructions, such as they are, included. diff --git a/debian/changelog b/debian/changelog index e7b9e13..35580e4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +userv-utils (0.2.0) unstable; urgency=low + + * ipif/INSTALL instructions slightly improved, slattach patch included. + + -- + userv-utils (0.1.90) unstable; urgency=low * ipif/INSTALL instructions, such as they are, included. diff --git a/ipif/INSTALL b/ipif/INSTALL index a07e9df..b18e413 100644 --- a/ipif/INSTALL +++ b/ipif/INSTALL @@ -6,15 +6,16 @@ if you wish. In any case, on each tunnel endpoint system (not the eventual end-system, but the point where the packets are `detunnelled'): -* Install userv, 0.95.0 or later. This should be in Debian. -* Get userv-utils 0.1.9 from the location above, unpack it, cd to the - `ipif' subdirectory, and say `make' then `really make install'. +* Install userv, 1.0.1 or later. This should be in Debian. Get this +* package, userv-utils from the location above, unpack it, cd to the + `ipif' subdirectory, and say `make' then as root `make install'. -The tunnel is always set up by one of its endpoints, using ssh. So -the active endpoint must have ssh installed; the passive endpoint must -have sshd accessible to the active endpoint, and be willing to allow -the active endpoint to run the appropriate command. +The tunnel is always set up by one of its endpoints, using ssh (we +recommend you use OpenSSH). So the active endpoint must have ssh +installed; the passive endpoint must have sshd accessible to the +active endpoint, and be willing to allow the active endpoint to run +the appropriate command. So: create an account for the active endpoint on the passive. You probably want to use RSAAuthentication, so configure the relevant key @@ -186,8 +187,10 @@ Look at the error messages, they will hopefully be informative. If you see a message from `slattach' about being unable to open /dev/2 or some such, then you need to upgrade your `slattach'. In Debian GNU/Linux it's in the `netbase' package, and the fix is in 3.16-3 and -later. The relevant Debian bug reports are #45515 and #45944, and Ian -Jackson can supply the patch to slattach or a working binary. +later; however the bug has regressed, and is known to be in 3.18-4 and +earlier. The relevant Debian bug reports are #45515 (now closed) and +#45944. A patch to correct 3.18-4 is in this directory as +`slattach.diff'. $Id$ diff --git a/ipif/slattach.diff b/ipif/slattach.diff new file mode 100644 index 0000000..2107e2d --- /dev/null +++ b/ipif/slattach.diff @@ -0,0 +1,121 @@ +--- net-tools/slattach.c~ Sun Sep 19 19:04:28 1999 ++++ net-tools/slattach.c Sun Sep 19 19:35:56 1999 +@@ -451,27 +451,39 @@ + static int + tty_open(char *name, char *speed) + { +- char path[PATH_MAX]; +- register char *sp; ++ char pathbuf[PATH_MAX]; ++ register char *path_open, *path_lock; + int fd; + + /* Try opening the TTY device. */ + if (name != NULL) { +- if ((sp = strrchr(name, '/')) != (char *)NULL) *sp++ = '\0'; +- else sp = name; +- sprintf(path, "/dev/%s", sp); +- if (tty_lock(sp, 1)) return(-1); /* can we lock the device? */ +- if ((fd = open(path, O_RDWR)) < 0) { ++ if (name[0] != '/') { ++ if (strlen(name) + 6 > sizeof(pathbuf)) { ++ if (opt_q == 0) fprintf(stderr, ++ _("slattach: tty name too long\n")); ++ return(-1); ++ } ++ sprintf(pathbuf, "/dev/%s", name); ++ path_open = pathbuf; ++ path_lock = name; ++ } else if (!strncmp(name,"/dev/",5)) { ++ path_open = name; ++ path_lock = name+5; ++ } else { ++ path_open = name; ++ path_lock = name; ++ } ++ if (tty_lock(path_lock, 1)) return(-1); /* can we lock the device? */ ++ if ((fd = open(path_open, O_RDWR)) < 0) { + if (opt_q == 0) fprintf(stderr, + "slattach: tty_open(%s, RW): %s\n", +- path, strerror(errno)); ++ path_open, strerror(errno)); + return(-errno); + } + tty_fd = fd; +- if (opt_d) printf("slattach: tty_open: %s (%d) ", path, fd); ++ if (opt_d) printf("slattach: tty_open: %s (%d) ", path_open, fd); + } else { + tty_fd = 0; +- sp = (char *)NULL; + } + + /* Fetch the current state of the terminal. */ +@@ -562,20 +574,21 @@ + int + main(int argc, char *argv[]) + { +- char path[128]; ++ char path_buf[128]; ++ char *path_dev; + char buff[128]; + char *speed = NULL; + char *proto = DEF_PROTO; + char *extcmd = (char *)0; + struct hwtype *ht; +- char *sp; + int s; + static struct option longopts[] = { + { "version", 0, NULL, 'V' }, + { NULL, 0, NULL, 0 } + }; + +- strcpy(path, ""); ++ strcpy(path_buf, ""); ++ path_dev= path_buf; + + /* Scan command line for any arguments. */ + opterr = 0; +@@ -649,6 +662,12 @@ + /*NOTREACHED*/ + } + ++ if (setvbuf(stdout,0,_IOLBF,0)) { ++ if (opt_q == 0) fprintf(stderr, _("slattach: setvbuf(stdout,0,_IOLBF,0): %s\n"), ++ strerror(errno)); ++ exit(1); ++ } ++ + activate_init(); + + /* Check the protocol. */ +@@ -660,15 +679,14 @@ + + /* Is a terminal given? */ + if (optind != (argc - 1)) usage(); +- safe_strncpy(path, argv[optind], sizeof(path)); +- if (!strcmp(path, "-")) { ++ safe_strncpy(path_buf, argv[optind], sizeof(path_buf)); ++ if (!strcmp(path_buf, "-")) { + opt_e = 1; +- sp = NULL; ++ path_dev = NULL; + if (tty_open(NULL, speed) < 0) { return(3); } + } else { +- if ((sp = strrchr(path, '/')) != NULL) *sp++ = '\0'; +- else sp = path; +- if (tty_open(sp, speed) < 0) { return(3); } ++ path_dev = path_buf; ++ if (tty_open(path_dev, speed) < 0) { return(3); } + } + + /* Start the correct protocol. */ +@@ -681,7 +699,7 @@ + if (opt_v == 1) { + tty_get_name(buff); + printf(_("%s started"), proto); +- if (sp != NULL) printf(_(" on %s"), sp); ++ if (path_dev != NULL) printf(_(" on %s"), path_dev); + printf(_(" interface %s\n"), buff); + } + +