OpenAFS
OpenAFS distributed network file system
/cygdrive/c/src/openafs/openafs.git/repo/src/auth/auth.p.h
00001 /*
00002  * Copyright 2000, International Business Machines Corporation and others.
00003  * All Rights Reserved.
00004  *
00005  * This software has been released under the terms of the IBM Public
00006  * License.  For details, see the LICENSE file in the top-level source
00007  * directory or online at http://www.openafs.org/dl/license10.html
00008  */
00009 
00010 #ifndef __AUTH_AFS_INCL_
00011 #define __AUTH_AFS_INCL_    1
00012 
00013 #include <rx/rxkad.h>           /* to get ticket parameters/contents */
00014 
00015 /* super-user pincipal used by servers when talking to other servers */
00016 #define AUTH_SUPERUSER        "afs"
00017 
00018 struct ktc_token {
00019     afs_int32 startTime;
00020     afs_int32 endTime;
00021     struct ktc_encryptionKey sessionKey;
00022     short kvno;                 /* XXX UNALIGNED */
00023     int ticketLen;
00024     char ticket[MAXKTCTICKETLEN];
00025 };
00026 
00027 int ktc_SetToken(struct ktc_principal *, struct ktc_token *,
00028     struct ktc_principal *, afs_int32);
00029 int ktc_GetToken(struct ktc_principal *, struct ktc_token *,
00030     int, struct ktc_principal *);
00031 
00032 struct ktc_setTokenData;
00033 int ktc_SetTokenEx(struct ktc_setTokenData *);
00034 int ktc_GetTokenEx(char *, struct ktc_setTokenData **);
00035 int ktc_ListTokensEx(int, int *, char **cellName);
00036 
00037 int ktc_ListTokens(int, int *, struct ktc_principal *);
00038 int ktc_ForgetToken(struct ktc_principal *);
00039 int ktc_ForgetAllTokens(void);
00040 afs_uint32 ktc_curpag(void);
00041 
00042 #ifdef AFS_KERBEROS_ENV
00043 int ktc_newpag(void);
00044 #endif
00045 
00046 #ifdef AFS_NT40_ENV
00047 
00048 /* Flags for the flag word sent along with a token */
00049 #define PIOCTL_LOGON            0x1     /* invoked from integrated logon */
00050 
00051 #endif /* AFS_NT40_ENV */
00052 
00053 /* Flags for ktc_SetToken() */
00054 #define AFS_SETTOK_SETPAG       0x1
00055 #define AFS_SETTOK_LOGON        0x2     /* invoked from integrated logon */
00056 
00057 #endif /* __AUTH_AFS_INCL_ */
 All Data Structures Files Functions Variables