From 209d8c367756cf0e0bad5b3d35bdc6b25d7b485d Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Thu, 16 Sep 2010 02:48:30 +0200 Subject: [PATCH] Windows: Add new token interface with stub for ktc_GetTokenEx The Windows build was broken by the addition of dependencies on token_FreeSet, ktc_GetTokenEx, etc. Permit the build to continue. The ktc_GetTokenEx implementation will depend on the creation of a new Windows pioctl for the call. Change-Id: I1c486af0beda10a2d846dc6bdff8c6195031dbe7 Reviewed-on: http://gerrit.openafs.org/2765 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- src/auth/NTMakefile | 14 +++++++++++++- src/auth/ktc_nt.c | 20 ++++++++++++++++++++ src/auth/token.c | 4 ++-- src/libafsauthent/NTMakefile | 2 ++ src/libafsauthent/afsauthent.def | 7 ++++++- 5 files changed, 43 insertions(+), 4 deletions(-) diff --git a/src/auth/NTMakefile b/src/auth/NTMakefile index f59a09e6f..c4b5fd4fb 100644 --- a/src/auth/NTMakefile +++ b/src/auth/NTMakefile @@ -14,7 +14,17 @@ INCFILEDIR = $(DESTDIR)\include\afs # header file install directory INCFILES =\ $(INCFILEDIR)\auth.h \ $(INCFILEDIR)\cellconfig.h \ - $(INCFILEDIR)\keys.h + $(INCFILEDIR)\keys.h \ + $(INCFILEDIR)\token.h + +############################################################################ +# rxgen on token.xg + +token.xdr.c: token.xg token.h + $(RXGEN) -x -c -o $@ token.xg + +token.h: token.xg + $(RXGEN) -x -h -u -o $@ token.xg ############################################################################ @@ -32,6 +42,8 @@ AFSAUTH_LIBOBJS =\ $(OUT)\acfg_errors.obj \ $(OUT)\ktc_errors.obj \ $(OUT)\ktc_nt.obj \ + $(OUT)\token.obj \ + $(OUT)\token.xdr.obj \ $(OUT)\AFS_component_version_number.obj AFSDOBJS =\ diff --git a/src/auth/ktc_nt.c b/src/auth/ktc_nt.c index 610ba9c25..79ba04b0b 100644 --- a/src/auth/ktc_nt.c +++ b/src/auth/ktc_nt.c @@ -28,6 +28,7 @@ #include #include "auth.h" #include +#include "token.h" /* TBUFFERSIZE must be at least 512 larger than KTCMAXTICKETSIZE */ #define TBUFFERSIZE 12512 @@ -431,6 +432,13 @@ ktc_SetToken(struct ktc_principal *server, struct ktc_token *token, return 0; } +int +ktc_SetTokenEx(struct ktc_setTokenData *token) +{ + /* Not yet implemented */ + return KTC_PIOCTLFAIL; +} + int ktc_GetToken(struct ktc_principal *server, struct ktc_token *token, int tokenLen, struct ktc_principal *client) @@ -611,6 +619,18 @@ ktc_GetToken(struct ktc_principal *server, struct ktc_token *token, return 0; } +/*! + * Get a token, given the cell that we need to get information for + * + * @param cellName + * The name of the cell we're getting the token for - if NULL, we'll + * get information for the primary cell + */ +int +ktc_GetTokenEx(char *cellName, struct ktc_setTokenData **tokenSet) { + return KTC_PIOCTLFAIL; +} + int ktc_ListTokens(int cellNum, int *cellNumP, struct ktc_principal *server) { diff --git a/src/auth/token.c b/src/auth/token.c index 59d323b3d..0745f9969 100644 --- a/src/auth/token.c +++ b/src/auth/token.c @@ -22,12 +22,12 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include - #include #include #include #include +#include + #include "ktc.h" #include "token.h" diff --git a/src/libafsauthent/NTMakefile b/src/libafsauthent/NTMakefile index 9b2df9146..36b782b15 100644 --- a/src/libafsauthent/NTMakefile +++ b/src/libafsauthent/NTMakefile @@ -40,6 +40,8 @@ AUTHOBJS = \ $(OUT)\authcon.obj \ $(OUT)\ktc_errors.obj \ $(OUT)\ktc_nt.obj \ + $(OUT)\token.obj \ + $(OUT)\token.xdr.obj \ $(OUT)\acfg_errors.obj KAUTHOBJS = \ diff --git a/src/libafsauthent/afsauthent.def b/src/libafsauthent/afsauthent.def index ccf9a0797..e9a1bb5f9 100644 --- a/src/libafsauthent/afsauthent.def +++ b/src/libafsauthent/afsauthent.def @@ -142,4 +142,9 @@ EXPORTS ugen_ClientInit @140 afsconf_BuildServerSecurityObjects @141 afsconf_ClientAuthToken @142 - + ktc_GetTokenEx @143 + ktc_SetTokenEx @144 + token_extractRxkad @145 + token_FreeSet @146 + xdr_ktc_tokenUnion @147 + xdr_ktc_setTokenData @148 -- 2.39.5