From de6fe00f6f8949c842930c803a8aee0fab295a82 Mon Sep 17 00:00:00 2001 From: deraadt <> Date: Wed, 4 Dec 2013 22:58:24 +0000 Subject: [PATCH] express final disapproval of the interfaces in libcompat, such as them ftime(), gtty(), stty(), re_comp(), cuserid() and others. Discussion and ongoing work to fix the ports tree from many, especially naddy. ok naddy [There is a bit more cleanup possible after that, but this is considered the current safe step] --- src/include/Makefile | 31 ++++++++++++++----------------- src/include/re_comp.h | 42 ------------------------------------------ src/include/sgtty.h | 7 ++----- src/include/stdio.h | 4 +--- src/include/unistd.h | 6 +----- 5 files changed, 18 insertions(+), 72 deletions(-) delete mode 100644 src/include/re_comp.h diff --git a/src/include/Makefile b/src/include/Makefile index 617e7efd..f3b53e53 100644 --- a/src/include/Makefile +++ b/src/include/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.178 2013/11/03 11:48:49 sthen Exp $ +# $OpenBSD: Makefile,v 1.179 2013/12/04 22:58:24 deraadt Exp $ # $NetBSD: Makefile,v 1.59 1996/05/15 21:36:43 jtc Exp $ # @(#)Makefile 5.45.1.1 (Berkeley) 5/6/91 @@ -15,13 +15,11 @@ FILES= a.out.h ar.h assert.h bitstring.h blf.h bm.h bsd_auth.h \ ftw.h getopt.h glob.h grp.h ifaddrs.h inttypes.h iso646.h kvm.h \ langinfo.h libgen.h limits.h locale.h login_cap.h malloc.h math.h md4.h \ md5.h memory.h mpool.h ndbm.h netdb.h netgroup.h nlist.h nl_types.h \ - ohash.h paths.h poll.h pwd.h ranlib.h re_comp.h \ - readpassphrase.h regex.h resolv.h rmd160.h search.h setjmp.h \ - sgtty.h sha1.h sha2.h signal.h sndio.h spawn.h \ - stdbool.h stddef.h stdio.h stdlib.h \ - string.h strings.h struct.h sysexits.h tar.h tgmath.h \ - time.h ttyent.h tzfile.h unistd.h utime.h utmp.h vis.h \ - wchar.h wctype.h + ohash.h paths.h poll.h pwd.h ranlib.h readpassphrase.h regex.h \ + resolv.h rmd160.h search.h setjmp.h sha1.h sha2.h signal.h sndio.h \ + spawn.h stdbool.h stddef.h stdio.h stdlib.h string.h strings.h struct.h \ + sysexits.h tar.h tgmath.h time.h ttyent.h tzfile.h unistd.h utime.h \ + utmp.h vis.h wchar.h wctype.h FILES+= link.h link_elf.h @@ -40,15 +38,14 @@ LDIRS= altq crypto ddb dev isofs miscfs msdosfs net netinet netinet6 \ PRDIRS= # Directories with an includes target -RDIRS= ../lib/librthread ../lib/libcompat ../lib/libcurses \ - ../lib/libform ../lib/libssl ../lib/libmenu \ - ../lib/libocurses ../lib/libossaudio ../lib/libpanel ../lib/librpcsvc \ - ../lib/libskey ../lib/libedit ../lib/libexpat ../lib/libfuse \ - ../lib/libpcap ../lib/libsqlite3 ../lib/libutil ../lib/libusbhid \ - ../lib/libwrap \ - ../lib/libz ../lib/libkeynote ../lib/libevent ../usr.bin/lex \ - ../gnu/lib/libreadline ../gnu/usr.sbin/sendmail/libmilter \ - ../sys/arch/${MACHINE} ../usr.sbin/httpd +RDIRS= ../lib/librthread ../lib/libcurses ../lib/libform ../lib/libssl \ + ../lib/libmenu ../lib/libocurses ../lib/libossaudio ../lib/libpanel \ + ../lib/librpcsvc ../lib/libskey ../lib/libedit ../lib/libexpat \ + ../lib/libfuse ../lib/libpcap ../lib/libsqlite3 ../lib/libutil \ + ../lib/libusbhid ../lib/libwrap ../lib/libz ../lib/libkeynote \ + ../lib/libevent ../usr.bin/lex ../gnu/lib/libreadline \ + ../gnu/usr.sbin/sendmail/libmilter ../usr.sbin/httpd \ + ../sys/arch/${MACHINE} .if ${COMPILER_VERSION:L} == "gcc3" RDIRS+= ../gnu/usr.bin/gcc ../gnu/lib/libobjc diff --git a/src/include/re_comp.h b/src/include/re_comp.h deleted file mode 100644 index 3e4d7c51..00000000 --- a/src/include/re_comp.h +++ /dev/null @@ -1,42 +0,0 @@ -/* $OpenBSD: re_comp.h,v 1.4 2008/06/26 05:42:04 ray Exp $ */ -/* $NetBSD: re_comp.h,v 1.1 1996/02/05 22:34:12 jtc Exp $ */ - -/*- - * Copyright (c) 1996 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by J.T. Conklin. - * - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 _RE_COMP_H_ -#define _RE_COMP_H_ -#include - -__BEGIN_DECLS -char *re_comp(const char *); -int re_exec(const char *); -__END_DECLS - -#endif /* _RE_COMP_H_ */ diff --git a/src/include/sgtty.h b/src/include/sgtty.h index 09f626f0..7c0684f3 100644 --- a/src/include/sgtty.h +++ b/src/include/sgtty.h @@ -1,4 +1,4 @@ -/* $OpenBSD: sgtty.h,v 1.5 2012/12/05 23:19:57 deraadt Exp $ */ +/* $OpenBSD: sgtty.h,v 1.6 2013/12/04 22:58:24 deraadt Exp $ */ /* $NetBSD: sgtty.h,v 1.4 1995/06/05 19:40:33 pk Exp $ */ /* @@ -37,7 +37,4 @@ #endif #include -__BEGIN_DECLS -int gtty(int, struct sgttyb *); -int stty(int, struct sgttyb *); -__END_DECLS +#warning " is obsolete" diff --git a/src/include/stdio.h b/src/include/stdio.h index 67d85d79..76d2ad21 100644 --- a/src/include/stdio.h +++ b/src/include/stdio.h @@ -1,4 +1,4 @@ -/* $OpenBSD: stdio.h,v 1.44 2013/03/28 16:37:14 eric Exp $ */ +/* $OpenBSD: stdio.h,v 1.45 2013/12/04 22:58:24 deraadt Exp $ */ /* $NetBSD: stdio.h,v 1.18 1996/04/25 18:29:21 jtc Exp $ */ /*- @@ -307,11 +307,9 @@ __END_DECLS */ #if __BSD_VISIBLE || __POSIX_VISIBLE || __XPG_VISIBLE #define L_ctermid 1024 /* size for ctermid(); PATH_MAX */ -#define L_cuserid 9 /* size for cuserid(); UT_NAMESIZE + 1 */ __BEGIN_DECLS char *ctermid(char *); -char *cuserid(char *); FILE *fdopen(int, const char *); int fileno(FILE *); diff --git a/src/include/unistd.h b/src/include/unistd.h index 0f1aa048..bc621998 100644 --- a/src/include/unistd.h +++ b/src/include/unistd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: unistd.h,v 1.81 2013/11/22 21:32:49 millert Exp $ */ +/* $OpenBSD: unistd.h,v 1.82 2013/12/04 22:58:24 deraadt Exp $ */ /* $NetBSD: unistd.h,v 1.26.4.1 1996/05/28 02:31:51 mrg Exp $ */ /*- @@ -505,8 +505,6 @@ int rcmd_af(char **, int, const char *, const char *, const char *, int *, int); int rcmdsh(char **, int, const char *, const char *, const char *, char *); -char *re_comp(const char *); -int re_exec(const char *); int reboot(int); int revoke(const char *); int rresvport(int *); @@ -525,8 +523,6 @@ int setlogin(const char *); void *setmode(const char *); int setresgid(gid_t, gid_t, gid_t); int setresuid(uid_t, uid_t, uid_t); -int setrgid(gid_t); -int setruid(uid_t); void setusershell(void); int strtofflags(char **, u_int32_t *, u_int32_t *); int swapctl(int cmd, const void *arg, int misc);