Windows: Add new token interface with stub for ktc_GetTokenEx
authorJeffrey Altman <jaltman@your-file-system.com>
Thu, 16 Sep 2010 00:48:30 +0000 (02:48 +0200)
committerDerrick Brashear <shadow@dementia.org>
Mon, 20 Sep 2010 06:48:34 +0000 (23:48 -0700)
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 <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

src/auth/NTMakefile
src/auth/ktc_nt.c
src/auth/token.c
src/libafsauthent/NTMakefile
src/libafsauthent/afsauthent.def

index f59a09e..c4b5fd4 100644 (file)
@@ -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 =\
index 610ba9c..79ba04b 100644 (file)
@@ -28,6 +28,7 @@
 #include <afs/vice.h>
 #include "auth.h"
 #include <afs/afsutil.h>
+#include "token.h"
 
 /* TBUFFERSIZE must be at least 512 larger than KTCMAXTICKETSIZE */
 #define TBUFFERSIZE 12512
@@ -432,6 +433,13 @@ ktc_SetToken(struct ktc_principal *server, struct ktc_token *token,
 }
 
 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)
 {
index 59d323b..0745f99 100644 (file)
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <sys/errno.h>
-
 #include <afsconfig.h>
 #include <afs/param.h>
 #include <afs/auth.h>
 #include <rx/rxkad.h>
+#include <errno.h>
+
 #include "ktc.h"
 #include "token.h"
 
index 9b2df91..36b782b 100644 (file)
@@ -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 = \
index ccf9a07..e9a1bb5 100644 (file)
@@ -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