diff options
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/Makefile | 30 | ||||
-rw-r--r-- | usr.sbin/amd/Makefile.inc | 3 | ||||
-rw-r--r-- | usr.sbin/amd/amd/Makefile | 6 | ||||
-rw-r--r-- | usr.sbin/amd/include/Makefile | 8 | ||||
-rw-r--r-- | usr.sbin/bootparamd/bootparamd/Makefile | 3 | ||||
-rw-r--r-- | usr.sbin/bootparamd/bootparamd/bootparamd.c | 14 | ||||
-rw-r--r-- | usr.sbin/sendmail/Makefile | 2 |
7 files changed, 56 insertions, 10 deletions
diff --git a/usr.sbin/Makefile b/usr.sbin/Makefile index a976e53..28d6bbb 100644 --- a/usr.sbin/Makefile +++ b/usr.sbin/Makefile @@ -136,9 +136,9 @@ SUBDIR= ac \ rpc.lockd \ rpc.statd \ rpc.umntall \ - rpc.yppasswdd \ - rpc.ypupdated \ - rpc.ypxfrd \ + ${_rpc.yppasswdd} \ + ${_rpc.ypupdated} \ + ${_rpc.ypxfrd} \ rrenumd \ rtadvd \ rtprio \ @@ -175,12 +175,12 @@ SUBDIR= ac \ watchdogd \ wicontrol \ ${_wlconfig} \ - ypbind \ - yp_mkdb \ - yppoll \ - yppush \ - ypserv \ - ypset \ + ${_ypbind} \ + ${_yp_mkdb} \ + ${_yppoll} \ + ${_yppush} \ + ${_ypserv} \ + ${_ypset} \ zic \ ${_zzz} @@ -229,6 +229,18 @@ _ipsend= ipsend _iptest= iptest .endif +.if !defined(NO_NIS) +_rpc.yppasswdd= rpc.yppasswdd +_rpc.ypupdated= rpc.ypupdated +_rpc.ypxfrd= rpc.ypxfrd +_ypbind= ypbind +_yp_mkdb= yp_mkdb +_yppoll= yppoll +_yppush= yppush +_ypserv= ypserv +_ypset= ypset +.endif + .if !defined(NO_PF) && !defined(NO_AUTHPF) _authpf= authpf .endif diff --git a/usr.sbin/amd/Makefile.inc b/usr.sbin/amd/Makefile.inc index dd65ed3..612f9f7 100644 --- a/usr.sbin/amd/Makefile.inc +++ b/usr.sbin/amd/Makefile.inc @@ -17,6 +17,9 @@ CFLAGS+= -I${.OBJDIR}/../include CFLAGS+= -I${.CURDIR}/../../../contrib/amd/include CFLAGS+= -I${.CURDIR}/../../../contrib/amd CFLAGS+= -DHAVE_CONFIG_H +.if defined(NO_NIS) +CFLAGS+= -DHAVE_LOCALCONFIG_H +.endif CFLAGS+= -DHOST_CPU=\"${MACHINE_ARCH}\" -DHOST_ARCH=\"${MACHINE_ARCH}\" diff --git a/usr.sbin/amd/amd/Makefile b/usr.sbin/amd/amd/Makefile index eb30395..5922688 100644 --- a/usr.sbin/amd/amd/Makefile +++ b/usr.sbin/amd/amd/Makefile @@ -15,7 +15,7 @@ SRCS+= am_ops.c amd.c amfs_auto.c amfs_direct.c amfs_error.c SRCS+= amfs_host.c amfs_inherit.c amfs_link.c amfs_linkx.c amfs_nfsl.c SRCS+= amfs_nfsx.c amfs_program.c amfs_root.c amfs_toplvl.c SRCS+= amfs_union.c amq_subr.c amq_svc.c autil.c clock.c conf.c -SRCS+= get_args.c info_file.c info_hesiod.c info_ndbm.c info_nis.c info_passwd.c +SRCS+= get_args.c info_file.c info_hesiod.c info_ndbm.c info_passwd.c SRCS+= info_union.c map.c mapc.c mntfs.c nfs_prot_svc.c nfs_start.c SRCS+= nfs_subr.c ops_cdfs.c ops_mfs.c ops_nfs.c ops_nfs3.c SRCS+= ops_nullfs.c ops_pcfs.c ops_tfs.c ops_ufs.c ops_umapfs.c @@ -39,4 +39,8 @@ CLEANFILES+= mount_xdr.c mount_xdr.c: ${MOUNT_X} ${RPCCOM} -c -DWANT_NFS3 ${MOUNT_X} -o ${.TARGET} +.if !defined(NO_NIS) +SRCS+= info_nis.c +.endif + .include <bsd.prog.mk> diff --git a/usr.sbin/amd/include/Makefile b/usr.sbin/amd/include/Makefile index d3cf000..7fa54ae 100644 --- a/usr.sbin/amd/include/Makefile +++ b/usr.sbin/amd/include/Makefile @@ -8,6 +8,9 @@ # $NetBSD: Makefile,v 1.8 1998/08/08 22:33:37 christos Exp $ SRCS= config_local.h +.if defined(NO_NIS) +SRCS+= localconfig.h +.endif CLEANFILES= ${SRCS} all depend: ${SRCS} @@ -16,4 +19,9 @@ config_local.h: newvers.sh @rm -f ${.TARGET} sh ${.ALLSRC} ${.CURDIR}/../../../sys/conf/newvers.sh > ${.TARGET} +localconfig.h: + @rm -f ${.TARGET} + @echo "/* NIS disabled by NO_NIS make.conf option */" >> ${.TARGET} + @echo "#undef HAVE_MAP_NIS" >> ${.TARGET} + .include <bsd.prog.mk> diff --git a/usr.sbin/bootparamd/bootparamd/Makefile b/usr.sbin/bootparamd/bootparamd/Makefile index 11c6390..af8a0dc 100644 --- a/usr.sbin/bootparamd/bootparamd/Makefile +++ b/usr.sbin/bootparamd/bootparamd/Makefile @@ -7,6 +7,9 @@ SRCS= bootparamd.c main.c ${GENSRCS} GENSRCS=bootparam_prot.h bootparam_prot_svc.c bootparam_prot_xdr.c CFLAGS+= -DTFTP_DIR=\"/tftpboot\" -I. +.if !defined(NO_NIS) +CFLAGS+= -DYP +.endif CLEANFILES= ${GENSRCS} diff --git a/usr.sbin/bootparamd/bootparamd/bootparamd.c b/usr.sbin/bootparamd/bootparamd/bootparamd.c index 159124e..238686b 100644 --- a/usr.sbin/bootparamd/bootparamd/bootparamd.c +++ b/usr.sbin/bootparamd/bootparamd/bootparamd.c @@ -12,9 +12,11 @@ static const char rcsid[] = "$FreeBSD$"; #endif /* not lint */ +#ifdef YP #include <rpc/rpc.h> #include <rpcsvc/yp_prot.h> #include <rpcsvc/ypclnt.h> +#endif #include "bootparam_prot.h" #include <ctype.h> #include <err.h> @@ -191,7 +193,9 @@ int blen; char *where; static char *result; int resultlen; +#ifdef YP static char *yp_domain; +#endif int ch, pch, fid_len, res = 0; int match = 0; @@ -212,6 +216,7 @@ int blen; } } if (*hostname == '+' ) { /* NIS */ +#ifdef YP if (yp_get_default_domain(&yp_domain)) { if (debug) warn("NIS"); return(0); @@ -230,6 +235,9 @@ int blen; if (fclose(bpf)) warnx("could not close %s", bootpfile); return(1); +#else + return(0); /* ENOTSUP */ +#endif } /* skip to next entry */ if ( match ) break; @@ -288,7 +296,9 @@ int len; int res = 0; static char *result; int resultlen; +#ifdef YP static char *yp_domain; +#endif /* struct hostent *cmp_he;*/ @@ -315,6 +325,7 @@ int len; } } if (*hostname == '+' ) { /* NIS */ +#ifdef YP if (yp_get_default_domain(&yp_domain)) { if (debug) warn("NIS"); return(0); @@ -332,6 +343,9 @@ int len; if (fclose(bpf)) warnx("could not close %s", bootpfile); return(res); +#else + return(0); /* ENOTSUP */ +#endif } /* skip to next entry */ pch = ch = getc(bpf); diff --git a/usr.sbin/sendmail/Makefile b/usr.sbin/sendmail/Makefile index 86e7eda..6dd1509 100644 --- a/usr.sbin/sendmail/Makefile +++ b/usr.sbin/sendmail/Makefile @@ -26,7 +26,9 @@ BINMODE=2555 # Define the database format to use for aliases et al. DBMDEF= -DNEWDB # If you don't want NIS alias/map support, comment out this line +.if !defined(NO_NIS) NIS= -DNIS +.endif # Map extensions MAPS= -DMAP_REGEX -DDNSMAP |