Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tools/compat Fine-grain checking somewhat:



details:   https://anonhg.NetBSD.org/src/rev/322234f15d8c
branches:  trunk
changeset: 533535:322234f15d8c
user:      pooka <pooka%NetBSD.org@localhost>
date:      Wed Jul 03 17:16:26 2002 +0000

description:
Fine-grain checking somewhat:
* check for user_from_uid() in addition to pwcache_userdb()
* check for svis() in addition to vis()

diffstat:

 tools/compat/compat_defs.h |    9 ++-
 tools/compat/config.h.in   |    6 +-
 tools/compat/configure     |  107 ++++++++++++++++++++++----------------------
 tools/compat/configure.ac  |    7 +-
 4 files changed, 68 insertions(+), 61 deletions(-)

diffs (truncated from 470 to 300 lines):

diff -r f3fbd306b319 -r 322234f15d8c tools/compat/compat_defs.h
--- a/tools/compat/compat_defs.h        Wed Jul 03 16:51:36 2002 +0000
+++ b/tools/compat/compat_defs.h        Wed Jul 03 17:16:26 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: compat_defs.h,v 1.15 2002/04/24 19:41:58 bjh21 Exp $   */
+/*     $NetBSD: compat_defs.h,v 1.16 2002/07/03 17:16:27 pooka Exp $   */
 
 #ifndef        __NETBSD_COMPAT_DEFS_H__
 #define        __NETBSD_COMPAT_DEFS_H__
@@ -193,11 +193,9 @@
 #endif
 
 #if !HAVE_PWCACHE_USERDB
-const char *user_from_uid(uid_t, int);
 int uid_from_user(const char *, uid_t *);
 int pwcache_userdb(int (*)(int), void (*)(void),
                struct passwd * (*)(const char *), struct passwd * (*)(uid_t));
-const char *group_from_gid(gid_t, int);
 int gid_from_group(const char *, gid_t *);
 int pwcache_groupdb(int (*)(int), void (*)(void),
                struct group * (*)(const char *), struct group * (*)(gid_t));
@@ -240,6 +238,11 @@
 char *strsep(char **, const char *);
 #endif
 
+#if !HAVE_USER_FROM_UID
+const char *user_from_uid(uid_t, int);
+const char *group_from_gid(gid_t, int);
+#endif
+
 #if !HAVE_VASPRINTF
 int vasprintf(char **, const char *, va_list);
 #endif
diff -r f3fbd306b319 -r 322234f15d8c tools/compat/config.h.in
--- a/tools/compat/config.h.in  Wed Jul 03 16:51:36 2002 +0000
+++ b/tools/compat/config.h.in  Wed Jul 03 17:16:26 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: config.h.in,v 1.18 2002/04/24 19:41:58 bjh21 Exp $     */
+/*     $NetBSD: config.h.in,v 1.19 2002/07/03 17:16:27 pooka Exp $     */
 
 #ifndef        __NETBSD_COMPAT_CONFIG_H__
 #define        __NETBSD_COMPAT_CONFIG_H__
@@ -32,7 +32,6 @@
 #undef HAVE_SYS_SYSMACROS_H
 #undef HAVE_SYS_TYPES_H
 #undef HAVE_UNISTD_H
-#undef HAVE_VIS_H
 #undef STDC_HEADERS
 
 #undef HAVE_ID_T
@@ -78,8 +77,11 @@
 #undef HAVE_STRLCAT
 #undef HAVE_STRLCPY
 #undef HAVE_STRSEP
+#undef HAVE_SVIS
+#undef HAVE_USER_FROM_UID
 #undef HAVE_VASPRINTF
 #undef HAVE_VASNPRINTF
+#undef HAVE_VIS
 #undef HAVE_VSNPRINTF
 
 #undef HAVE_DECL_SETGROUPENT
diff -r f3fbd306b319 -r 322234f15d8c tools/compat/configure
--- a/tools/compat/configure    Wed Jul 03 16:51:36 2002 +0000
+++ b/tools/compat/configure    Wed Jul 03 17:16:26 2002 +0000
@@ -2614,7 +2614,7 @@
 done
 
 for ac_header in rpc/types.h fts.h getopt.h md2.h md4.h md5.h netconfig.h \
-       rmd160.h sha1.h vis.h
+       rmd160.h sha1.h
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
 echo "$as_me:2620: checking for $ac_header" >&5
@@ -4586,16 +4586,17 @@
        fgetln flock fparseln futimes getopt getopt_long \
        isblank issetugid lchmod lchown lutimes pread pwcache_userdb \
        pwrite setenv setgroupent setprogname setpassent \
-       snprintf strlcat strlcpy strsep vasprintf vasnprintf vsnprintf
+       snprintf strlcat strlcpy strsep svis user_from_uid \
+       vasprintf vasnprintf vis vsnprintf
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:4592: checking for $ac_func" >&5
+echo "$as_me:4593: checking for $ac_func" >&5
 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
 if eval "test \"\${$as_ac_var+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 4598 "configure"
+#line 4599 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func (); below.  */
@@ -4626,16 +4627,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:4629: \"$ac_link\"") >&5
+if { (eval echo "$as_me:4630: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:4632: \$? = $ac_status" >&5
+  echo "$as_me:4633: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:4635: \"$ac_try\"") >&5
+  { (eval echo "$as_me:4636: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:4638: \$? = $ac_status" >&5
+  echo "$as_me:4639: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   eval "$as_ac_var=yes"
 else
@@ -4645,7 +4646,7 @@
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:4648: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "$as_me:4649: result: `eval echo '${'$as_ac_var'}'`" >&5
 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
 if test `eval echo '${'$as_ac_var'}'` = yes; then
   cat >>confdefs.h <<EOF
@@ -4655,13 +4656,13 @@
 fi
 done
 
-echo "$as_me:4658: checking whether setgroupent is declared" >&5
+echo "$as_me:4659: checking whether setgroupent is declared" >&5
 echo $ECHO_N "checking whether setgroupent is declared... $ECHO_C" >&6
 if test "${ac_cv_have_decl_setgroupent+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 4664 "configure"
+#line 4665 "configure"
 #include "confdefs.h"
 
 #include <grp.h>
@@ -4679,16 +4680,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:4682: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:4683: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:4685: \$? = $ac_status" >&5
+  echo "$as_me:4686: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:4688: \"$ac_try\"") >&5
+  { (eval echo "$as_me:4689: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:4691: \$? = $ac_status" >&5
+  echo "$as_me:4692: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_have_decl_setgroupent=yes
 else
@@ -4698,7 +4699,7 @@
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:4701: result: $ac_cv_have_decl_setgroupent" >&5
+echo "$as_me:4702: result: $ac_cv_have_decl_setgroupent" >&5
 echo "${ECHO_T}$ac_cv_have_decl_setgroupent" >&6
 if test $ac_cv_have_decl_setgroupent = yes; then
 
@@ -4712,13 +4713,13 @@
 EOF
 
 fi
-echo "$as_me:4715: checking whether setpassent is declared" >&5
+echo "$as_me:4716: checking whether setpassent is declared" >&5
 echo $ECHO_N "checking whether setpassent is declared... $ECHO_C" >&6
 if test "${ac_cv_have_decl_setpassent+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 4721 "configure"
+#line 4722 "configure"
 #include "confdefs.h"
 
 #include <grp.h>
@@ -4736,16 +4737,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:4739: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:4740: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:4742: \$? = $ac_status" >&5
+  echo "$as_me:4743: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:4745: \"$ac_try\"") >&5
+  { (eval echo "$as_me:4746: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:4748: \$? = $ac_status" >&5
+  echo "$as_me:4749: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_have_decl_setpassent=yes
 else
@@ -4755,7 +4756,7 @@
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:4758: result: $ac_cv_have_decl_setpassent" >&5
+echo "$as_me:4759: result: $ac_cv_have_decl_setpassent" >&5
 echo "${ECHO_T}$ac_cv_have_decl_setpassent" >&6
 if test $ac_cv_have_decl_setpassent = yes; then
 
@@ -4773,7 +4774,7 @@
 # regcomp() and regexec() are also names of functions in the old V8
 # regexp package.  To avoid them, we need to find out who has regfree().
 
-echo "$as_me:4776: checking for regfree in -lregex" >&5
+echo "$as_me:4777: checking for regfree in -lregex" >&5
 echo $ECHO_N "checking for regfree in -lregex... $ECHO_C" >&6
 if test "${ac_cv_lib_regex_regfree+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -4781,7 +4782,7 @@
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lregex  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 4784 "configure"
+#line 4785 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -4800,16 +4801,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:4803: \"$ac_link\"") >&5
+if { (eval echo "$as_me:4804: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:4806: \$? = $ac_status" >&5
+  echo "$as_me:4807: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:4809: \"$ac_try\"") >&5
+  { (eval echo "$as_me:4810: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:4812: \$? = $ac_status" >&5
+  echo "$as_me:4813: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_regex_regfree=yes
 else
@@ -4820,7 +4821,7 @@
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:4823: result: $ac_cv_lib_regex_regfree" >&5
+echo "$as_me:4824: result: $ac_cv_lib_regex_regfree" >&5
 echo "${ECHO_T}$ac_cv_lib_regex_regfree" >&6
 if test $ac_cv_lib_regex_regfree = yes; then
   cat >>confdefs.h <<EOF
@@ -4831,7 +4832,7 @@
 
 fi
 
-echo "$as_me:4834: checking for library containing regfree" >&5
+echo "$as_me:4835: checking for library containing regfree" >&5
 echo $ECHO_N "checking for library containing regfree... $ECHO_C" >&6
 if test "${ac_cv_search_regfree+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -4839,7 +4840,7 @@
   ac_func_search_save_LIBS=$LIBS
 ac_cv_search_regfree=no
 cat >conftest.$ac_ext <<_ACEOF
-#line 4842 "configure"
+#line 4843 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -4858,16 +4859,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:4861: \"$ac_link\"") >&5
+if { (eval echo "$as_me:4862: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:4864: \$? = $ac_status" >&5
+  echo "$as_me:4865: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:4867: \"$ac_try\"") >&5
+  { (eval echo "$as_me:4868: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:4870: \$? = $ac_status" >&5



Home | Main Index | Thread Index | Old Index