2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-31 14:25:15 +00:00

UCB-derived snprintf + asprintf support. Supports quads if the compiler

does.  No floating point yet, perhaps later...
This commit is contained in:
Todd C. Miller
1999-08-21 19:00:53 +00:00
parent 275c2fc980
commit ab0c1eae13
6 changed files with 847 additions and 815 deletions

44
LICENSE
View File

@@ -35,11 +35,11 @@ Sudo is distributed under the following BSD-style license:
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
Additionally, lsearch.c, fnmatch.c, getcwd.c, and fnmatch.3 bear
Additionally, lsearch.c, fnmatch.c, getcwd.c, snprintf.c and fnmatch.3 bear
the following UCB license:
/*
* Copyright (c) 1989, 1991, 1993, 1994
* Copyright (c) 1989, 1990, 1991, 1993, 1994
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -70,43 +70,3 @@ the following UCB license:
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
Also, snprintf.c bears the following KTH license:
/*
* Copyright (c) 1995-1997, 1999 Kungliga Tekniska H<>gskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* 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 Kungliga Tekniska
* H<>gskolan and its contributors.
*
* 4. Neither the name of the Institute 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 INSTITUTE 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 INSTITUTE 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.
*/

8
aclocal.m4 vendored
View File

@@ -150,7 +150,6 @@ else
fi
])dnl
dnl
dnl
dnl check for fullly working void
dnl
@@ -324,3 +323,10 @@ if test $sudo_cv_syslog_names = yes; then
AC_DEFINE(HAVE_SYSLOG_NAMES)
fi
])
dnl
dnl check for "long long"
dnl
AC_DEFUN(SUDO_LONG_LONG, [AC_MSG_CHECKING(for long long support)
AC_TRY_COMPILE(, [long long foo; foo = 1;], AC_DEFINE(HAVE_LONG_LONG)
AC_MSG_RESULT(yes), AC_MSG_RESULT(no))])

View File

@@ -96,6 +96,9 @@
/* Define to be nil if C compiler doesn't support "const." */
#undef const
/* Define if your compiler supports the "long long" type. */
#undef HAVE_LONG_LONG
/* Solaris doesn't use const qualifiers in PAM. */
#ifdef sun
#define PAM_CONST
@@ -199,6 +202,9 @@
# define strrchr rindex
#endif
/* Define if you have memchr(3). */
#undef HAVE_MEMCHR
/* Define if you have memcpy(3). */
#undef HAVE_MEMCPY
#if !defined(HAVE_MEMCPY) && !defined(memcpy)

340
configure vendored

File diff suppressed because it is too large Load Diff

View File

@@ -1391,6 +1391,7 @@ SUDO_TYPE_DEV_T
SUDO_TYPE_INO_T
SUDO_FULL_VOID
SUDO_UID_T_LEN
SUDO_LONG_LONG
SUDO_SOCK_SA_LEN
dnl
dnl only set RETSIGTYPE if it is not set already
@@ -1402,7 +1403,7 @@ esac
dnl
dnl Function checks
dnl
AC_CHECK_FUNCS(strchr strrchr memcpy memset sysconf sigaction tzset strcasecmp seteuid ftruncate)
AC_CHECK_FUNCS(strchr strrchr memchr memcpy memset sysconf sigaction tzset strcasecmp seteuid ftruncate)
if test -n "$SECUREWARE"; then
AC_CHECK_FUNCS(bigcrypt)
AC_CHECK_FUNCS(set_auth_parameters)

1261
snprintf.c

File diff suppressed because it is too large Load Diff