diff options
Diffstat (limited to 'libexec')
| -rw-r--r-- | libexec/Makefile | 19 | ||||
| -rw-r--r-- | libexec/bootpd/bootpd.c | 6 | ||||
| -rw-r--r-- | libexec/ftpd/Makefile | 4 | ||||
| -rw-r--r-- | libexec/ftpd/ftpd.8 | 8 | ||||
| -rw-r--r-- | libexec/rlogind/rlogind.8 | 4 | ||||
| -rw-r--r-- | libexec/rlogind/rlogind.c | 68 | ||||
| -rw-r--r-- | libexec/rshd/rshd.8 | 26 | ||||
| -rw-r--r-- | libexec/rshd/rshd.c | 91 | ||||
| -rw-r--r-- | libexec/rtld-aout/rtld.c | 47 | ||||
| -rw-r--r-- | libexec/rtld-elf/rtld.c | 4 | ||||
| -rw-r--r-- | libexec/talkd/talkd.c | 7 | ||||
| -rw-r--r-- | libexec/telnetd/telnetd.c | 12 | ||||
| -rw-r--r-- | libexec/tftpd/tftpd.c | 10 |
13 files changed, 167 insertions, 139 deletions
diff --git a/libexec/Makefile b/libexec/Makefile index 991501ac4f08..92a9f13d4fc2 100644 --- a/libexec/Makefile +++ b/libexec/Makefile @@ -1,19 +1,22 @@ # @(#)Makefile 8.1 (Berkeley) 6/4/93 -# $Id: Makefile,v 1.36 1998/09/05 08:33:10 jb Exp $ +# $Id: Makefile,v 1.35 1998/09/04 22:55:17 jb Exp $ -# Present but disabled: kpasswdd SUBDIR= atrun bootpd comsat fingerd ftpd getNAME getty \ - makekey mknetid named-xfer rbootd revnetgroup rexecd \ - rlogind rpc.rquotad rpc.rstatd rpc.rusersd rpc.rwalld \ - rpc.sprayd rshd talkd tftpd uucpd xtend ypxfr + makekey mknetid revnetgroup rexecd rlogind \ + rpc.rquotad rpc.rstatd \ + rpc.rusersd rpc.rwalld rpc.sprayd rshd talkd tftpd uucpd \ + xtend ypxfr .if !defined(NO_SENDMAIL) SUBDIR+=mail.local smrsh .endif +.if ${MACHINE_ARCH} == i386 +SUBDIR+=named-xfer .if ${OBJFORMAT} == aout SUBDIR+=rtld-aout .endif +.endif .if ${OBJFORMAT} == elf SUBDIR+=rtld-elf @@ -24,4 +27,10 @@ SUBDIR+=rtld-elf SUBDIR+=telnetd .endif +# Present but disabled: kpasswdd + +.if ${MACHINE_ARCH} == "i386" +SUBDIR+=rbootd +.endif + .include <bsd.subdir.mk> diff --git a/libexec/bootpd/bootpd.c b/libexec/bootpd/bootpd.c index 6d6a74fed6c6..68e35d50223a 100644 --- a/libexec/bootpd/bootpd.c +++ b/libexec/bootpd/bootpd.c @@ -19,7 +19,7 @@ PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - $Id: bootpd.c,v 1.9 1998/12/12 20:56:53 dillon Exp $ + $Id: bootpd.c,v 1.7 1997/05/11 14:27:03 phk Exp $ ************************************************************************/ @@ -635,8 +635,6 @@ handle_request() char *homedir, *bootfile; int n; - bp->bp_file[sizeof(bp->bp_file)-1] = '\0'; - /* XXX - SLIP init: Set bp_ciaddr = recv_addr here? */ /* @@ -835,7 +833,7 @@ HW addr type is IEEE 802. convert to %s and check again\n", * daemon chroot directory (i.e. /tftpboot). */ if (hp->flags.tftpdir) { - snprintf(realpath, sizeof(realpath), "%s", hp->tftpdir->string); + strcpy(realpath, hp->tftpdir->string); clntpath = &realpath[strlen(realpath)]; } else { realpath[0] = '\0'; diff --git a/libexec/ftpd/Makefile b/libexec/ftpd/Makefile index 79956125c51d..59cd2de010ab 100644 --- a/libexec/ftpd/Makefile +++ b/libexec/ftpd/Makefile @@ -1,5 +1,5 @@ # @(#)Makefile 8.2 (Berkeley) 4/4/94 -# $Id: Makefile,v 1.24 1998/05/04 18:20:18 bde Exp $ +# $Id: Makefile,v 1.23 1997/10/05 09:39:27 jkh Exp $ PROG= ftpd MAN8= ftpd.8 @@ -20,7 +20,7 @@ CFLAGS+=-DINTERNAL_LS -Dmain=ls_main -I${.CURDIR}/${LSDIR} .endif .if exists(${DESTDIR}/usr/lib/libkrb.a) && defined(MAKE_KERBEROS4) -.PATH: ${.CURDIR}/../../lib/libpam/modules/pam_kerberosIV +.PATH: ${.CURDIR}/../../usr.bin/login SRCS+= klogin.c LDADD+= -lkrb -ldes DPADD+= ${LIBKRB} ${LIBDES} diff --git a/libexec/ftpd/ftpd.8 b/libexec/ftpd/ftpd.8 index df639327564d..2f52338073a2 100644 --- a/libexec/ftpd/ftpd.8 +++ b/libexec/ftpd/ftpd.8 @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)ftpd.8 8.2 (Berkeley) 4/19/94 -.\" $Id: ftpd.8,v 1.24 1998/12/02 22:11:02 billf Exp $ +.\" $Id: ftpd.8,v 1.22 1998/07/09 11:38:21 jkoshy Exp $ .\" .Dd April 19, 1994 .Dt FTPD 8 @@ -109,7 +109,7 @@ In previous versions of .Nm Ns , when a passive mode client requested a data connection to the server, the server would use data ports in the range 1024..4999. Now, by default, -the server will use data ports in the range 49152..65535. Specifying this +the server will use data ports in the range 40000..44999. Specifying this option will revert to the old behavior. .It Fl T A client may also request a different timeout period; @@ -138,7 +138,7 @@ Allow only anonymous ftp access. .El .Pp The file -.Pa /var/run/nologin +.Pa /etc/nologin can be used to disable ftp access. If the file exists, .Nm @@ -436,7 +436,7 @@ Virtual hosting configuration file. Welcome notice. .It Pa /etc/ftpmotd Welcome notice after login. -.It Pa /var/run/nologin +.It Pa /etc/nologin Displayed and access refused. .It Pa /var/log/ftpd Log file for anonymous transfers. diff --git a/libexec/rlogind/rlogind.8 b/libexec/rlogind/rlogind.8 index 4f8ae93e0cb6..e3f359392318 100644 --- a/libexec/rlogind/rlogind.8 +++ b/libexec/rlogind/rlogind.8 @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)rlogind.8 8.1 (Berkeley) 6/4/93 -.\" $Id: rlogind.8,v 1.9 1997/11/25 07:17:13 charnier Exp $ +.\" $Id: rlogind.8,v 1.8 1997/02/22 14:22:07 peter Exp $ .\" .Dd June 4, 1993 .Dt RLOGIND 8 @@ -177,7 +177,7 @@ by the server failed. .It Pa /etc/hosts .It Pa /etc/hosts.equiv .It Pa $HOME/.rhosts -.It Pa /var/run/nologin +.It Pa /etc/nologin .El .Sh BUGS diff --git a/libexec/rlogind/rlogind.c b/libexec/rlogind/rlogind.c index 64cf70fa68c7..b0227e6db13b 100644 --- a/libexec/rlogind/rlogind.c +++ b/libexec/rlogind/rlogind.c @@ -42,7 +42,7 @@ static const char copyright[] = static const char sccsid[] = "@(#)rlogind.c 8.1 (Berkeley) 6/4/93"; #endif static const char rcsid[] = - "$Id: rlogind.c,v 1.19 1997/11/25 07:17:15 charnier Exp $"; + "$Id$"; #endif /* not lint */ /* @@ -122,6 +122,8 @@ void getstr __P((char *, int, char *)); void setup_term __P((int)); int do_krb_login __P((struct sockaddr_in *)); void usage __P((void)); +int local_domain __P((char *)); +char *topdomain __P((char *)); int main(argc, argv) @@ -230,27 +232,9 @@ doit(f, fromp) hp = gethostbyaddr((char *)&fromp->sin_addr, sizeof(struct in_addr), fromp->sin_family); if (hp) { - strncpy(hostname, hp->h_name, sizeof(hostname) - 1); - hostname[sizeof(hostname) - 1] = '\0'; - hp = gethostbyname(hostname); - if (hp == NULL) { - strncpy(hostname, inet_ntoa(fromp->sin_addr), - sizeof(hostname) - 1); - } else for (; ; hp->h_addr_list++) { - if (hp->h_addr_list[0] == NULL) { - /* End of list - ditch it */ - strncpy(hostname, inet_ntoa(fromp->sin_addr), - sizeof(hostname) - 1); - break; - } - if (!bcmp(hp->h_addr_list[0], - (caddr_t)&fromp->sin_addr, - sizeof(fromp->sin_addr))) - break; /* OK! */ - } + (void)strncpy(hostname, hp->h_name, sizeof(hostname)); } else { - strncpy(hostname, inet_ntoa(fromp->sin_addr), - sizeof(hostname) - 1); + (void)strncpy(hostname, inet_ntoa(fromp->sin_addr), sizeof(hostname)); } hostname[sizeof(hostname) - 1] = '\0'; @@ -758,3 +742,45 @@ usage() syslog(LOG_ERR, "usage: rlogind [-Daln]"); #endif } + +/* + * Check whether host h is in our local domain, + * defined as sharing the last two components of the domain part, + * or the entire domain part if the local domain has only one component. + * If either name is unqualified (contains no '.'), + * assume that the host is local, as it will be + * interpreted as such. + */ +int +local_domain(h) + char *h; +{ + char localhost[MAXHOSTNAMELEN]; + char *p1, *p2; + + localhost[0] = 0; + (void) gethostname(localhost, sizeof(localhost)); + p1 = topdomain(localhost); + p2 = topdomain(h); + if (p1 == NULL || p2 == NULL || !strcasecmp(p1, p2)) + return (1); + return (0); +} + +char * +topdomain(h) + char *h; +{ + register char *p; + char *maybe = NULL; + int dots = 0; + + for (p = h + strlen(h); p >= h; p--) { + if (*p == '.') { + if (++dots == 2) + return (p); + maybe = p; + } + } + return (maybe); +} diff --git a/libexec/rshd/rshd.8 b/libexec/rshd/rshd.8 index 7af12ecccb2f..86041e040d90 100644 --- a/libexec/rshd/rshd.8 +++ b/libexec/rshd/rshd.8 @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)rshd.8 8.1 (Berkeley) 6/4/93 -.\" $Id: rshd.8,v 1.14 1998/12/16 07:20:44 peter Exp $ +.\" $Id: rshd.8,v 1.10 1997/12/02 12:29:56 charnier Exp $ .\" .Dd June 4, 1993 .Dt RSHD 8 @@ -40,7 +40,7 @@ .Nd remote shell server .Sh SYNOPSIS .Nm rshd -.Op Fl alnDL +.Op Fl alnL .Sh DESCRIPTION The .Nm @@ -88,9 +88,17 @@ and requests the corresponding host name (see .Xr hosts 5 and .Xr named 8 ). -If the hostname cannot be determined or the hostname and address do -not match after verification, +If the hostname cannot be determined, the dot-notation representation of the host address is used. +If the hostname is in the same domain as the server (according to +the last two components of the domain name), +or if the +.Fl a +option is given, +the addresses for the hostname are requested, +verifying that the name and address correspond. +If address verification fails, the connection is aborted +with the message: ``Host address mismatch.''. .It A null terminated user name of at most 16 characters is retrieved on the initial socket. This user name @@ -126,7 +134,7 @@ file, unless the user is the superuser. .It If the file -.Pa /var/run/nologin +.Pa /etc/nologin exists and the user is not the superuser, the connection is closed. The name of the nologin file may be overridden @@ -156,12 +164,6 @@ The use of keepalive messages allows sessions to be timed out if the client crashes or becomes unreachable. .Pp The -.Fl D -option sets the TCP_NODELAY socket option which improves -performance of small back-to-back -writes at the expense of additional network traffic. -.Pp -The .Fl L option causes all successful accesses to be logged to .Xr syslogd 8 @@ -231,7 +233,7 @@ and is not preceded by a flag byte. .It Pa /etc/hosts.equiv .It Pa /etc/login.conf .It Pa $HOME/.rhosts -.It Pa /var/run/nologin +.It Pa /etc/nologin .El .Sh BUGS The authentication procedure used here assumes the integrity diff --git a/libexec/rshd/rshd.c b/libexec/rshd/rshd.c index cd2f57c36a1f..da0318935797 100644 --- a/libexec/rshd/rshd.c +++ b/libexec/rshd/rshd.c @@ -42,7 +42,7 @@ static const char copyright[] = static const char sccsid[] = "@(#)rshd.c 8.2 (Berkeley) 4/6/94"; #endif static const char rcsid[] = - "$Id: rshd.c,v 1.22 1998/12/01 23:27:24 dg Exp $"; + "$Id: rshd.c,v 1.20 1997/12/02 12:30:04 charnier Exp $"; #endif /* not lint */ /* @@ -61,7 +61,6 @@ static const char rcsid[] = #include <netinet/in_systm.h> #include <netinet/in.h> #include <netinet/ip.h> -#include <netinet/tcp.h> #include <arpa/inet.h> #include <netdb.h> @@ -80,9 +79,9 @@ static const char rcsid[] = #endif int keepalive = 1; +int check_all; int log_success; /* If TRUE, log all successful accesses */ int sent_null; -int no_delay; void doit __P((struct sockaddr_in *)); void error __P((const char *, ...)); @@ -96,13 +95,13 @@ void usage __P((void)); #include <krb.h> #define VERSION_SIZE 9 #define SECURE_MESSAGE "This rsh session is using DES encryption for all transmissions.\r\n" -#define OPTIONS "alnkvxDL" +#define OPTIONS "alnkvxL" char authbuf[sizeof(AUTH_DAT)]; char tickbuf[sizeof(KTEXT_ST)]; int doencrypt, use_kerberos, vacuous; Key_schedule schedule; #else -#define OPTIONS "alnDL" +#define OPTIONS "alnL" #endif int @@ -121,7 +120,7 @@ main(argc, argv) while ((ch = getopt(argc, argv, OPTIONS)) != -1) switch (ch) { case 'a': - /* ignored for compatability */ + check_all = 1; break; case 'l': __check_rhosts_file = 0; @@ -144,9 +143,6 @@ main(argc, argv) break; #endif #endif - case 'D': - no_delay = 1; - break; case 'L': log_success = 1; break; @@ -186,9 +182,6 @@ main(argc, argv) if (setsockopt(0, SOL_SOCKET, SO_LINGER, (char *)&linger, sizeof (linger)) < 0) syslog(LOG_WARNING, "setsockopt (SO_LINGER): %m"); - if (no_delay && - setsockopt(0, IPPROTO_TCP, TCP_NODELAY, &on, sizeof(on)) < 0) - syslog(LOG_WARNING, "setsockopt (TCP_NODELAY): %m"); doit(&from); /* NOTREACHED */ return(0); @@ -213,9 +206,10 @@ doit(fromp) fd_set ready, readfrom; int cc, nfd, pv[2], pid, s; int one = 1; - char *hostname, *errorstr; + char *hostname, *errorstr, *errorhost; char *cp, sig, buf[BUFSIZ]; char cmdbuf[NCARGS+1], locuser[16], remuser[16]; + char remotehost[2 * MAXHOSTNAMELEN + 1]; char fromhost[2 * MAXHOSTNAMELEN + 1]; #ifdef LOGIN_CAP login_cap_t *lc; @@ -294,7 +288,6 @@ doit(fromp) (void) alarm(60); port = 0; - s = 0; /* not set or used if port == 0 */ for (;;) { char c; if ((cc = read(STDIN_FILENO, &c, 1)) != 1) { @@ -303,7 +296,7 @@ doit(fromp) shutdown(0, 1+1); exit(1); } - if (c == 0) + if (c== 0) break; port = port * 10 + c - '0'; } @@ -348,38 +341,64 @@ doit(fromp) dup2(f, 2); #endif errorstr = NULL; - strncpy(fromhost, inet_ntoa(fromp->sin_addr), - sizeof(fromhost) - 1); - hostname = fromhost; hp = gethostbyaddr((char *)&fromp->sin_addr, sizeof (struct in_addr), fromp->sin_family); if (hp) { /* - * OK, it looks like a DNS name is attached.. Lets see if - * it looks like we can use it. If it doesn't check out, - * ditch it and use the IP address for logging instead. - * Note that iruserok() does it's own hostname checking!! + * If name returned by gethostbyaddr is in our domain, + * attempt to verify that we haven't been fooled by someone + * in a remote net; look up the name and check that this + * address corresponds to the name. */ strncpy(fromhost, hp->h_name, sizeof(fromhost) - 1); fromhost[sizeof(fromhost) - 1] = 0; - hp = gethostbyname(fromhost); - if (hp == NULL) { - strncpy(fromhost, inet_ntoa(fromp->sin_addr), - sizeof(fromhost) - 1); - } else for (; ; hp->h_addr_list++) { - if (hp->h_addr_list[0] == NULL) { - /* End of list - ditch it */ + hostname = fromhost; +#ifdef KERBEROS + if (!use_kerberos) +#endif + if (check_all || local_domain(hp->h_name)) { + strncpy(remotehost, hp->h_name, sizeof(remotehost) - 1); + remotehost[sizeof(remotehost) - 1] = 0; + errorhost = remotehost; + hp = gethostbyname(remotehost); + if (hp == NULL) { + syslog(LOG_INFO, + "couldn't look up address for %s", + remotehost); + errorstr = + "Couldn't look up address for your host (%s)\n"; strncpy(fromhost, inet_ntoa(fromp->sin_addr), sizeof(fromhost) - 1); - break; + fromhost[sizeof(fromhost) - 1] = 0; + hostname = fromhost; + } else for (; ; hp->h_addr_list++) { + if (hp->h_addr_list[0] == NULL) { + syslog(LOG_NOTICE, + "host addr %s not listed for host %s", + inet_ntoa(fromp->sin_addr), + hp->h_name); + errorstr = + "Host address mismatch for %s\n"; + strncpy(fromhost, inet_ntoa(fromp->sin_addr), + sizeof(fromhost) - 1); + fromhost[sizeof(fromhost) - 1] = 0; + hostname = fromhost; + break; + } + if (!bcmp(hp->h_addr_list[0], + (caddr_t)&fromp->sin_addr, + sizeof(fromp->sin_addr))) { + hostname = remotehost; + break; + } } - if (!bcmp(hp->h_addr_list[0], - (caddr_t)&fromp->sin_addr, - sizeof(fromp->sin_addr))) - break; /* OK! */ } + } else { + strncpy(fromhost, inet_ntoa(fromp->sin_addr), + sizeof(fromhost) - 1); + fromhost[sizeof(fromhost) - 1] = 0; + errorhost = hostname = fromhost; } - fromhost[sizeof(fromhost) - 1] = 0; #ifdef KERBEROS if (use_kerberos) { @@ -488,7 +507,7 @@ doit(fromp) fail: if (errorstr == NULL) errorstr = "Login incorrect.\n"; - error(errorstr, hostname); + error(errorstr, errorhost); exit(1); } diff --git a/libexec/rtld-aout/rtld.c b/libexec/rtld-aout/rtld.c index eff59b6a2a20..5e7843ef3868 100644 --- a/libexec/rtld-aout/rtld.c +++ b/libexec/rtld-aout/rtld.c @@ -27,7 +27,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: rtld.c,v 1.56 1998/08/22 15:51:41 mckay Exp $ + * $Id: rtld.c,v 1.55 1998/06/21 14:22:29 mckay Exp $ */ #include <sys/param.h> @@ -241,7 +241,7 @@ static void init_internal_malloc __P((void)); static void init_external_malloc __P((void)); static int call_map __P((struct so_map *, char *)); static char *findhint __P((char *, int, int *)); -static char *rtfindlib __P((char *, int, int, int)); +static char *rtfindlib __P((char *, int, int)); static char *rtfindfile __P((const char *)); void binder_entry __P((void)); long binder __P((jmpslot_t *)); @@ -890,21 +890,8 @@ map_sods(parent) struct so_map *smp = NULL; if(sodp->sod_library) { - /* - * First try for a match with an adequate minor - * number. - */ path = rtfindlib(name, sodp->sod_major, - sodp->sod_minor, 1); - /* - * If none was found, try for just a major version - * match. A warning is issued by rtfindlib in - * this case, since the minor version number isn't - * really high enough. - */ - if (path == NULL) - path = rtfindlib(name, sodp->sod_major, - sodp->sod_minor, 0); + sodp->sod_minor); if(path == NULL && !ld_tracing) { generror ("Can't find shared library" " \"lib%s.so.%d.%d\"", name, @@ -1840,11 +1827,8 @@ hinthash(cp, vmajor) * returns the full pathname of the matching library. This string is * always dynamically allocated on the heap. * - * MINORP is an in/out parameter. If the incoming value of *MINORP is - * >= 0, then no library will be considered a match unless its minor - * version number is at least that large. Otherwise, only the major - * version number is checked. In any case, the minor number of the - * matching library is stored into *MINORP. + * Returns the minor number of the matching library via the pointer + * argument MINORP. * * Returns NULL if the library cannot be found. */ @@ -1867,23 +1851,20 @@ findhint(name, major, minorp) warnx("Bad path index: %#x\n", bp->hi_pathx); break; } + /* - * For a given major number, the hints file has only one - * entry -- namely, the one with the highest minor number. - * If we find an entry with a matching major number, we - * know it is the best one. + * We accept the current hints entry if its name matches + * and its major number matches. We don't have to search + * for the best minor number, because that was already + * done by "ldconfig" when it built the hints file. */ if (strcmp(name, hstrtab + bp->hi_namex) == 0 && bp->hi_major == major) { struct stat s; - int realminor; - realminor = bp->hi_ndewey >= 2 ? bp->hi_minor : 0; - if (realminor < *minorp) /* Not good enough */ - return NULL; if (stat(hstrtab + bp->hi_pathx, &s) == -1) return NULL; /* Doesn't actually exist */ - *minorp = realminor; + *minorp = bp->hi_ndewey >= 2 ? bp->hi_minor : -1; return strdup(hstrtab + bp->hi_pathx); } @@ -1906,16 +1887,14 @@ findhint(name, major, minorp) * Returns NULL if the library cannot be found. */ static char * -rtfindlib(name, major, minor, strictminor) +rtfindlib(name, major, minor) char *name; int major, minor; - int strictminor; { char *ld_path = ld_library_path; char *path = NULL; - int realminor; + int realminor = -1; - realminor = strictminor ? minor : -1; if (ld_path != NULL) { /* First, search the directories in ld_path */ /* * There is no point in trying to use the hints file for this. diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index 9b4a9cf9b67a..1698ed02860c 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -22,7 +22,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: rtld.c,v 1.12 1998/10/13 03:31:59 jdp Exp $ + * $Id: rtld.c,v 1.11 1998/09/22 02:09:56 jdp Exp $ */ /* @@ -1182,7 +1182,7 @@ dlopen(const char *name, int mode) if (name == NULL) obj = obj_main; else { - char *path = find_library(name, obj_main); + char *path = find_library(name, NULL); if (path != NULL) obj = load_object(path); } diff --git a/libexec/talkd/talkd.c b/libexec/talkd/talkd.c index bb61f7e50402..dcb262483d5c 100644 --- a/libexec/talkd/talkd.c +++ b/libexec/talkd/talkd.c @@ -42,7 +42,7 @@ static const char copyright[] = static char sccsid[] = "@(#)talkd.c 8.1 (Berkeley) 6/4/93"; #endif static const char rcsid[] = - "$Id: talkd.c,v 1.8 1997/12/02 12:33:42 charnier Exp $"; + "$Id$"; #endif /* not lint */ /* @@ -89,13 +89,8 @@ main(argc, argv) register CTL_MSG *mp = &request; int cc; -#ifdef NOTDEF - /* - * removed so ntalkd can run in tty sandbox - */ if (getuid()) errx(1, "getuid: not super-user"); -#endif openlog("talkd", LOG_PID, LOG_DAEMON); if (gethostname(hostname, sizeof (hostname) - 1) < 0) { syslog(LOG_ERR, "gethostname: %m"); diff --git a/libexec/telnetd/telnetd.c b/libexec/telnetd/telnetd.c index 37564e343518..7018fdc12dae 100644 --- a/libexec/telnetd/telnetd.c +++ b/libexec/telnetd/telnetd.c @@ -42,7 +42,7 @@ static const char copyright[] = static char sccsid[] = "@(#)telnetd.c 8.2 (Berkeley) 12/15/93"; #endif static const char rcsid[] = - "$Id: telnetd.c,v 1.14 1998/04/26 06:51:36 phk Exp $"; + "$Id: telnetd.c,v 1.13 1997/12/03 07:16:05 charnier Exp $"; #endif /* not lint */ #include "telnetd.h" @@ -1091,13 +1091,13 @@ telnet(f, p, host) #endif if (getent(defent, "default") == 1) { - char *Getstr(); + char *getstr(); char *cp=defstrs; - HE = Getstr("he", &cp); - HN = Getstr("hn", &cp); - IM = Getstr("im", &cp); - IF = Getstr("if", &cp); + HE = getstr("he", &cp); + HN = getstr("hn", &cp); + IM = getstr("im", &cp); + IF = getstr("if", &cp); if (HN && *HN) (void) strcpy(host_name, HN); if (IF && (if_fd = open(IF, O_RDONLY, 000)) != -1) diff --git a/libexec/tftpd/tftpd.c b/libexec/tftpd/tftpd.c index d0499c9b19ce..63496a738f82 100644 --- a/libexec/tftpd/tftpd.c +++ b/libexec/tftpd/tftpd.c @@ -42,7 +42,7 @@ static const char copyright[] = static char sccsid[] = "@(#)tftpd.c 8.1 (Berkeley) 6/4/93"; #endif static const char rcsid[] = - "$Id: tftpd.c,v 1.11 1998/04/12 11:15:54 phk Exp $"; + "$Id: tftpd.c,v 1.10 1997/12/03 07:19:58 charnier Exp $"; #endif /* not lint */ /* @@ -266,7 +266,7 @@ main(argc, argv) struct formats; int validate_access __P((char **, int)); -void xmitfile __P((struct formats *)); +void sendfile __P((struct formats *)); void recvfile __P((struct formats *)); struct formats { @@ -276,8 +276,8 @@ struct formats { void (*f_recv) __P((struct formats *)); int f_convert; } formats[] = { - { "netascii", validate_access, xmitfile, recvfile, 1 }, - { "octet", validate_access, xmitfile, recvfile, 0 }, + { "netascii", validate_access, sendfile, recvfile, 1 }, + { "octet", validate_access, sendfile, recvfile, 0 }, #ifdef notdef { "mail", validate_user, sendmail, recvmail, 1 }, #endif @@ -465,7 +465,7 @@ timer() * Send the requested file. */ void -xmitfile(pf) +sendfile(pf) struct formats *pf; { struct tftphdr *dp, *r_init(); |
