Fix r244604 so that it builds when MK_KERBEROS_SUPPORT == "no".
Reported by: bf Tested by: bf Reviewed by: gcooper MFC after: 3 days
This commit is contained in:
parent
6f1b440f45
commit
8ac5ae563b
@ -1,5 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
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.c gssd_prot.c
|
||||
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_SUPPORT} != "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
|
||||
|
||||
|
@ -37,7 +37,9 @@ __FBSDID("$FreeBSD$");
|
||||
#include <ctype.h>
|
||||
#include <dirent.h>
|
||||
#include <err.h>
|
||||
#ifndef WITHOUT_KERBEROS
|
||||
#include <krb5.h>
|
||||
#endif
|
||||
#include <pwd.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@ -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 *filepath, uid_t uid, int *retrating,
|
||||
*retexptime = exptime;
|
||||
}
|
||||
return (ret);
|
||||
#else /* WITHOUT_KERBEROS */
|
||||
return (0);
|
||||
#endif /* !WITHOUT_KERBEROS */
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user