--- usr.sbin/gssd/gssd.c.sav0 2012-12-30 19:04:19.000000000 -0500 +++ usr.sbin/gssd/gssd.c 2012-12-31 07:03:33.614516000 -0500 @@ -37,7 +37,9 @@ __FBSDID("$FreeBSD: head/usr.sbin/gssd/g #include #include #include +#ifndef WITHOUT_KERBEROS #include +#endif #include #include #include @@ -102,12 +104,17 @@ main(int argc, char **argv) debug_level++; break; case 's': +#ifndef WITHOUT_KERBEROS /* * Set the directory search list. This enables use of * find_ccache_file() to search the directories for a * suitable credentials cache file. */ strlcpy(ccfile_dirlist, optarg, sizeof(ccfile_dirlist)); +#else + errx(1, "This option not available when built" + " without MK_KERBEROS\n"); +#endif break; case 'c': /* @@ -814,6 +821,7 @@ static int is_a_valid_tgt_cache(const char *filepath, uid_t uid, int *retrating, time_t *retexptime) { +#ifndef WITHOUT_KERBEROS krb5_context context; krb5_principal princ; krb5_ccache ccache; @@ -913,5 +921,8 @@ is_a_valid_tgt_cache(const char *filepat *retexptime = exptime; } return (ret); +#else /* WITHOUT_KERBEROS */ + return (0); +#endif /* !WITHOUT_KERBEROS */ } --- usr.sbin/gssd/Makefile.sav0 2012-12-30 19:18:00.000000000 -0500 +++ usr.sbin/gssd/Makefile 2012-12-31 07:02:45.000000000 -0500 @@ -1,5 +1,7 @@ # $FreeBSD: head/usr.sbin/gssd/Makefile 244638 2012-12-23 20:12:57Z rmacklem $ +.include + PROG= gssd MAN= gssd.8 SRCS= gssd.c gssd.h gssd_svc.c gssd_xdr.c gssd_prot.c @@ -7,8 +9,14 @@ SRCS= gssd.c gssd.h gssd_svc.c gssd_xdr. CFLAGS+= -I. WARNS?= 1 -DPADD= ${LIBGSSAPI} ${LIBKRB5} ${LIBHX509} ${LIBASN1} ${LIBROKEN} ${LIBCOM_ERR} ${LIBCRYPT} ${LIBCRYPTO} -LDADD= -lgssapi -lkrb5 -lhx509 -lasn1 -lroken -lcom_err -lcrypt -lcrypto +DPADD= ${LIBGSSAPI} +LDADD= -lgssapi +.if ${MK_KERBEROS} != "no" +DPADD+= ${LIBKRB5} ${LIBHX509} ${LIBASN1} ${LIBROKEN} ${LIBCOM_ERR} ${LIBCRYPT} ${LIBCRYPTO} +LDADD+= -lkrb5 -lhx509 -lasn1 -lroken -lcom_err -lcrypt -lcrypto +.else +CFLAGS+= -DWITHOUT_KERBEROS +.endif CLEANFILES= gssd_svc.c gssd.h