summaryrefslogtreecommitdiff
path: root/libexec/getty
diff options
context:
space:
mode:
authorcvs2svn <cvs2svn@FreeBSD.org>1995-06-13 18:05:17 +0000
committercvs2svn <cvs2svn@FreeBSD.org>1995-06-13 18:05:17 +0000
commite506c6f0ea9f3b267e874555538b2f22b5778b8f (patch)
tree667af903b5ab768677daab8b52896b8663cb0543 /libexec/getty
parentd3628763db3974826e46a036aa54333147fbe238 (diff)
Notes
Diffstat (limited to 'libexec/getty')
-rw-r--r--libexec/getty/extern.h56
-rw-r--r--libexec/getty/fbtab_stuff.c93
-rw-r--r--libexec/getty/ttydefaults.c54
3 files changed, 0 insertions, 203 deletions
diff --git a/libexec/getty/extern.h b/libexec/getty/extern.h
deleted file mode 100644
index 644f93f10747..000000000000
--- a/libexec/getty/extern.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)extern.h 8.1 (Berkeley) 6/4/93
- */
-
-struct delayval;
-
-int adelay __P((int, struct delayval *));
-char *autobaud __P((void));
-int delaybits __P((void));
-void edithost __P((char *));
-void gendefaults __P((void));
-int getent __P((char *, char *));
-int getflag __P((char *));
-long getnum __P((char *));
-char *getstr __P((char *, char **));
-void gettable __P((char *, char *));
-void makeenv __P((char *[]));
-char *portselector __P((void));
-void set_ttydefaults __P((int));
-void setchars __P((void));
-void setdefaults __P((void));
-long setflags __P((int));
-int speed __P((int));
-
-int login_tty __P((int)); /* From libutil. */
diff --git a/libexec/getty/fbtab_stuff.c b/libexec/getty/fbtab_stuff.c
deleted file mode 100644
index 2ae5394dbc34..000000000000
--- a/libexec/getty/fbtab_stuff.c
+++ /dev/null
@@ -1,93 +0,0 @@
-#include <sys/types.h>
-#include <stdio.h>
-#include <syslog.h>
-#include <string.h>
-#include <errno.h>
-#include <dirent.h>
-
-#include "pathnames.h"
-
-#define WSPACE " \t\n"
-
-void reset_fbtab __P((char *tty));
-void reset_protect __P((char *table, char *path, int mask));
-
-/*
- * reset_fbtab - reset ownership to root/wheel and apply protections
- * specified in /etc/fbtab or logindevperm
- */
-
-void
-reset_fbtab(tty)
-char *tty;
-{
- FILE *fp;
- char buf[BUFSIZ];
- char *devname;
- char *cp;
- int prot;
- char *table;
-
- if ((fp = fopen(table = _PATH_FBTAB, "r")) == 0
- && (fp = fopen(table = _PATH_LOGINDEVPERM, "r")) == 0)
- return;
-
- while (fgets(buf, sizeof(buf), fp)) {
- if (cp = strchr(buf, '#'))
- *cp = 0; /* strip comment */
- if ((cp = devname = strtok(buf, WSPACE)) == 0)
- continue; /* empty or comment */
- if (strncmp(devname, "/dev/", 5) != 0
- || (cp = strtok((char *) 0, WSPACE)) == 0
- || *cp != '0'
- || sscanf(cp, "%o", &prot) == 0
- || prot == 0
- || (prot & 0777) != prot
- || (cp = strtok((char *) 0, WSPACE)) == 0) {
- syslog(LOG_ERR, "%s: bad entry: %s", table, cp ? cp : "(null)");
- continue;
- }
- if (strcmp(devname, tty) == 0) {
- for (cp = strtok(cp, ":"); cp; cp = strtok((char *) 0, ":")) {
- reset_protect(table, cp, prot);
- }
- }
- }
- fclose(fp);
-}
-
-/* reset_protect - protect one device entry */
-
-void
-reset_protect(table, path, mask)
-char *table;
-char *path;
-int mask;
-{
- char buf[BUFSIZ];
- int pathlen = strlen(path);
- struct dirent *ent;
- DIR *dir;
-
- if (strcmp("/*", path + pathlen - 2) != 0) {
- if (chmod(path, mask) && errno != ENOENT)
- syslog(LOG_ERR, "%s: chmod(%s): %m", table, path);
- if (chown(path, 0, 0) && errno != ENOENT)
- syslog(LOG_ERR, "%s: chown(%s): %m", table, path);
- } else {
- strcpy(buf, path);
- buf[pathlen - 1] = 0;
- if ((dir = opendir(buf)) == 0) {
- syslog(LOG_ERR, "%s: opendir(%s): %m", table, path);
- } else {
- while ((ent = readdir(dir)) != 0) {
- if (strcmp(ent->d_name, ".") != 0
- && strcmp(ent->d_name, "..") != 0) {
- strcpy(buf + pathlen - 1, ent->d_name);
- reset_protect(table, buf, mask);
- }
- }
- closedir(dir);
- }
- }
-}
diff --git a/libexec/getty/ttydefaults.c b/libexec/getty/ttydefaults.c
deleted file mode 100644
index 518f41ba0f60..000000000000
--- a/libexec/getty/ttydefaults.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)ttydefaults.c 8.1 (Berkeley) 6/4/93";
-#endif /* not lint */
-
-#include <sys/termios.h>
-
-#include "extern.h"
-
-void
-set_ttydefaults(fd)
- int fd;
-{
- struct termios term;
-
- tcgetattr(fd, &term);
- term.c_iflag = TTYDEF_IFLAG;
- term.c_oflag = TTYDEF_OFLAG;
- term.c_lflag = TTYDEF_LFLAG;
- term.c_cflag = TTYDEF_CFLAG;
- tcsetattr(fd, TCSAFLUSH, &term);
-}