diff options
author | Todd C. Miller <Todd.Miller@courtesan.com> | 1998-10-22 01:00:27 +0000 |
---|---|---|
committer | Todd C. Miller <Todd.Miller@courtesan.com> | 1998-10-22 01:00:27 +0000 |
commit | a65802585dc236c9f5d9d6df980ad87ac1840848 (patch) | |
tree | 6c88dd9e29786a33edaef884d3f38410a47e9aba /aclocal.m4 | |
parent | 7c6a13f6fd0485bbeb9c4a6c968a8ed7073a6611 (diff) | |
download | sudo-a65802585dc236c9f5d9d6df980ad87ac1840848.tar.gz |
don't trust UID_MAX or MAXUID
Diffstat (limited to 'aclocal.m4')
-rw-r--r-- | aclocal.m4 | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/aclocal.m4 b/aclocal.m4 index d0311fdea..ee471b13d 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -269,8 +269,8 @@ fi dnl dnl check for max length of uid_t in string representation. -dnl if MAXUID exists there is no real way to see if uid_t is -dnl signed or not so we add one on the off chance that it is. +dnl we can't really trust UID_MAX or MAXUID since they may exist +dnl only for backwards compatibility. dnl AC_DEFUN(SUDO_UID_T_LEN, [AC_REQUIRE([AC_TYPE_UID_T]) @@ -285,16 +285,8 @@ AC_TRY_RUN( #include <sys/param.h> main() { FILE *f; - char b[BUFSIZ]; -#ifdef UID_MAX - uid_t u = UID_MAX; -#else -# ifdef MAXUID - uid_t u = MAXUID; -# else + char b[1024]; uid_t u = (uid_t) -1; -# endif -#endif if ((f = fopen("conftestdata", "w")) == NULL) exit(1); |