Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tools/compat Add a stub issetugid() for platforms that don't...
details: https://anonhg.NetBSD.org/src/rev/bb0422a8f586
branches: trunk
changeset: 525839:bb0422a8f586
user: bjh21 <bjh21%NetBSD.org@localhost>
date: Thu Apr 18 15:31:51 2002 +0000
description:
Add a stub issetugid() for platforms that don't have it. For now, we assume
that no host program will be installed set-id, so the stub function always
returns 0.
diffstat:
tools/compat/Makefile | 4 ++--
tools/compat/compat_defs.h | 6 +++++-
tools/compat/config.h.in | 3 ++-
tools/compat/configure | 2 +-
tools/compat/configure.ac | 4 ++--
tools/compat/issetugid.c | 21 +++++++++++++++++++++
6 files changed, 33 insertions(+), 7 deletions(-)
diffs (107 lines):
diff -r 655bfcb0c9ab -r bb0422a8f586 tools/compat/Makefile
--- a/tools/compat/Makefile Thu Apr 18 14:54:38 2002 +0000
+++ b/tools/compat/Makefile Thu Apr 18 15:31:51 2002 +0000
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.11 2002/04/01 13:59:35 bjh21 Exp $
+# $NetBSD: Makefile,v 1.12 2002/04/18 15:31:51 bjh21 Exp $
HOSTLIB= nbcompat
SRCS= basename.c dirname.c fgetln.c flock.c fparseln.c \
- getmode.c getopt_long.c libyywrap.c \
+ getmode.c getopt_long.c issetugid.c libyywrap.c \
md2c.c md2hl.c md4c.c md4hl.c md5c.c md5hl.c pread.c \
pwcache.c pwrite.c pw_scan.c rmd160.c rmd160hl.c setenv.c \
setgroupent.c setpassent.c setprogname.c sha1.c sha1hl.c \
diff -r 655bfcb0c9ab -r bb0422a8f586 tools/compat/compat_defs.h
--- a/tools/compat/compat_defs.h Thu Apr 18 14:54:38 2002 +0000
+++ b/tools/compat/compat_defs.h Thu Apr 18 15:31:51 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: compat_defs.h,v 1.9 2002/04/04 17:49:20 bjh21 Exp $ */
+/* $NetBSD: compat_defs.h,v 1.10 2002/04/18 15:31:51 bjh21 Exp $ */
#ifndef __NETBSD_COMPAT_DEFS_H__
#define __NETBSD_COMPAT_DEFS_H__
@@ -165,6 +165,10 @@
char *fparseln(FILE *, size_t *, size_t *, const char [3], int);
#endif
+#if !HAVE_ISSETUGID
+int issetugid(void);
+#endif
+
#if !HAVE_ISBLANK && !defined(isblank)
#define isblank(x) ((x) == ' ' || (x) == '\t')
#endif
diff -r 655bfcb0c9ab -r bb0422a8f586 tools/compat/config.h.in
--- a/tools/compat/config.h.in Thu Apr 18 14:54:38 2002 +0000
+++ b/tools/compat/config.h.in Thu Apr 18 15:31:51 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: config.h.in,v 1.15 2002/04/04 17:52:04 bjh21 Exp $ */
+/* $NetBSD: config.h.in,v 1.16 2002/04/18 15:31:52 bjh21 Exp $ */
#ifndef __NETBSD_COMPAT_CONFIG_H__
#define __NETBSD_COMPAT_CONFIG_H__
@@ -60,6 +60,7 @@
#undef HAVE_GETOPT
#undef HAVE_GETOPT_LONG
#undef HAVE_ISBLANK
+#undef HAVE_ISSETUGID
#undef HAVE_LCHMOD
#undef HAVE_LCHOWN
#undef HAVE_LUTIMES
diff -r 655bfcb0c9ab -r bb0422a8f586 tools/compat/configure
--- a/tools/compat/configure Thu Apr 18 14:54:38 2002 +0000
+++ b/tools/compat/configure Thu Apr 18 15:31:51 2002 +0000
@@ -4250,7 +4250,7 @@
for ac_func in asprintf asnprintf basename dirfd dirname \
fgetln flock fparseln futimes getopt getopt_long \
- isblank lchmod lchown lutimes pread pwcache_userdb \
+ isblank issetugid lchmod lchown lutimes pread pwcache_userdb \
pwrite setenv setgroupent setprogname setpassent \
snprintf strlcat strlcpy strsep vasprintf vasnprintf vsnprintf
do
diff -r 655bfcb0c9ab -r bb0422a8f586 tools/compat/configure.ac
--- a/tools/compat/configure.ac Thu Apr 18 14:54:38 2002 +0000
+++ b/tools/compat/configure.ac Thu Apr 18 15:31:51 2002 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: configure.ac,v 1.14 2002/04/01 13:59:35 bjh21 Exp $
+# $NetBSD: configure.ac,v 1.15 2002/04/18 15:31:52 bjh21 Exp $
#
# Autoconf definition file for libnbcompat.
#
@@ -88,7 +88,7 @@
AC_SEARCH_LIBS(fparseln, util)
AC_CHECK_FUNCS(asprintf asnprintf basename dirfd dirname \
fgetln flock fparseln futimes getopt getopt_long \
- isblank lchmod lchown lutimes pread pwcache_userdb \
+ isblank issetugid lchmod lchown lutimes pread pwcache_userdb \
pwrite setenv setgroupent setprogname setpassent \
snprintf strlcat strlcpy strsep vasprintf vasnprintf vsnprintf)
diff -r 655bfcb0c9ab -r bb0422a8f586 tools/compat/issetugid.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/compat/issetugid.c Thu Apr 18 15:31:51 2002 +0000
@@ -0,0 +1,21 @@
+/* $NetBSD: issetugid.c,v 1.1 2002/04/18 15:31:53 bjh21 Exp $ */
+
+/*
+ * Written by Ben Harris, 2002
+ * This file is in the Public Domain
+ */
+
+#include "config.h"
+
+#if !HAVE_ISSETUGID
+int
+issetugid(void)
+{
+
+ /*
+ * Assume that anything linked against libnbcompat will be installed
+ * without special privileges.
+ */
+ return 0;
+}
+#endif
Home |
Main Index |
Thread Index |
Old Index