diff options
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | NEWS | 7 | ||||
-rw-r--r-- | misc/Makefile | 4 | ||||
-rw-r--r-- | misc/logwtmp.c | 1 | ||||
-rw-r--r-- | posix/unistd.h | 3 | ||||
-rw-r--r-- | sysdeps/generic/pty.c | 3 | ||||
-rw-r--r-- | sysdeps/stub/revoke.c | 30 | ||||
-rw-r--r-- | sysdeps/unix/bsd/bsd4.4/revoke.S | 23 |
8 files changed, 77 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog index 6006bcb991..10e8ad181d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,14 @@ Mon Mar 27 02:23:15 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu> + * sysdeps/unix/bsd/bsd4.4/revoke.S: New file. + * sysdeps/stub/revoke.c: New file. + * misc/Makefile (routines): Add revoke. + * posix/unistd.h [__USE_BSD] (revoke): Declare it. + * sysdeps/generic/pty.c (openpty, forkpty): Declare return types. + (forkpty): Declare login_tty. + * misc/logwtmp.c (logwtmp): Declare to return void. + * misc/login_tty.c (login_tty): Include unistd.h. Declare return type. + * posix/unistd.h [__USE_BSD] (ttyslot): Declare it. * posix/unistd.h [__USE_BSD] (L_SET, L_INCR, L_XTND): Define diff --git a/NEWS b/NEWS index 49cfc032e7..be5eb46a21 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,4 @@ -GNU C Library NEWS -- history of user-visible changes. 21 March 1995 +GNU C Library NEWS -- history of user-visible changes. 27 March 1995 Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc. See the end for copying conditions. @@ -98,6 +98,11 @@ Version 1.10 * The new functions `ecvt', `fcvt', and `gcvt' provide an obsolete interface for formatting floating-point numbers. They are provided only for compatibility; new programs should use `sprintf' instead. + +* The new auxiliary library `-lutil' from 4.4 BSD contains various + functions for maintaining the login-record files (primarily of use to + system programs such as `login'), and convenient functions for + allocating and initializing a pseudo-terminal (pty) device. Version 1.09 diff --git a/misc/Makefile b/misc/Makefile index 3c87abf9ec..53489c68cd 100644 --- a/misc/Makefile +++ b/misc/Makefile @@ -37,8 +37,8 @@ routines := brk sbrk sstk ioctl \ select \ acct chroot fsync sync reboot \ gethostid sethostid \ - mknod \ - swapon vhangup mktemp mkstemp \ + revoke vhangup mknod \ + swapon mktemp mkstemp \ ualarm usleep \ gtty stty \ ptrace \ diff --git a/misc/logwtmp.c b/misc/logwtmp.c index d55ac9e941..5b3c8ded11 100644 --- a/misc/logwtmp.c +++ b/misc/logwtmp.c @@ -43,6 +43,7 @@ static char sccsid[] = "@(#)logwtmp.c 8.1 (Berkeley) 6/4/93"; #include <unistd.h> #include <utmp.h> +void logwtmp(line, name, host) char *line, *name, *host; { diff --git a/posix/unistd.h b/posix/unistd.h index 4468541e3a..db952883f2 100644 --- a/posix/unistd.h +++ b/posix/unistd.h @@ -559,6 +559,9 @@ extern int sync __P ((void)); group of the control terminal. */ extern int vhangup __P ((void)); +/* Revoke the access of all descriptors currently open on FILE. */ +extern int revoke __P ((const char *__file)); + /* Turn accounting on if NAME is an existing file. The system will then write a record for each process as it terminates, to this file. If NAME is NULL, diff --git a/sysdeps/generic/pty.c b/sysdeps/generic/pty.c index 1644aee39b..a539a9bb8b 100644 --- a/sysdeps/generic/pty.c +++ b/sysdeps/generic/pty.c @@ -47,6 +47,7 @@ static char sccsid[] = "@(#)pty.c 8.1 (Berkeley) 6/4/93"; #include <string.h> #include <grp.h> +int openpty(amaster, aslave, name, termp, winp) int *amaster, *aslave; char *name; @@ -97,12 +98,14 @@ openpty(amaster, aslave, name, termp, winp) return (-1); } +int forkpty(amaster, name, termp, winp) int *amaster; char *name; struct termios *termp; struct winsize *winp; { + extern int login_tty(); int master, slave, pid; if (openpty(&master, &slave, name, termp, winp) == -1) diff --git a/sysdeps/stub/revoke.c b/sysdeps/stub/revoke.c new file mode 100644 index 0000000000..295dc2bb5e --- /dev/null +++ b/sysdeps/stub/revoke.c @@ -0,0 +1,30 @@ +/* Revoke the access of all descriptors currently open on a file. +Copyright (C) 1995 Free Software Foundation, Inc. +This file is part of the GNU C Library. + +The GNU C Library is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +The GNU C Library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include <unistd.h> +#include <errno.h> + +int +revoke (file) + const char *file; +{ + errno = ENOSYS; + return -1; +} +stub_warning (revoke) diff --git a/sysdeps/unix/bsd/bsd4.4/revoke.S b/sysdeps/unix/bsd/bsd4.4/revoke.S new file mode 100644 index 0000000000..ee0cb4dec7 --- /dev/null +++ b/sysdeps/unix/bsd/bsd4.4/revoke.S @@ -0,0 +1,23 @@ +/* Revoke the access of all descriptors currently open on a file. +Copyright (C) 1995 Free Software Foundation, Inc. +This file is part of the GNU C Library. + +The GNU C Library is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +The GNU C Library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include <sysdep.h> + +SYSCALL (revoke, 1) + ret |