* sysdeps/unix/bsd/bsd4.4/revoke.S: New file.
authorRoland McGrath <roland@gnu.org>
Mon, 27 Mar 1995 10:24:00 +0000 (10:24 +0000)
committerRoland McGrath <roland@gnu.org>
Mon, 27 Mar 1995 10:24:00 +0000 (10:24 +0000)
* 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.

ChangeLog
NEWS
misc/Makefile
misc/logwtmp.c
posix/unistd.h
sysdeps/generic/pty.c
sysdeps/stub/revoke.c [new file with mode: 0644]
sysdeps/unix/bsd/bsd4.4/revoke.S [new file with mode: 0644]

index 6006bcb..10e8ad1 100644 (file)
--- 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 49cfc03..be5eb46 100644 (file)
--- 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.
 \f
 Version 1.09
 
index 3c87abf..53489c6 100644 (file)
@@ -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 \
index d55ac9e..5b3c8de 100644 (file)
@@ -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;
 {
index 4468541..db95288 100644 (file)
@@ -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,
index 1644aee..a539a9b 100644 (file)
@@ -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 (file)
index 0000000..295dc2b
--- /dev/null
@@ -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 (file)
index 0000000..ee0cb4d
--- /dev/null
@@ -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