Logo ROOT   6.12/07
Reference Guide
Typedefs | Functions
AFSAuth.cxx File Reference
#include <string.h>
#include "AFSAuth.h"
#include <afs/stds.h>
#include <afs/kautils.h>
#include <afs/com_err.h>
Include dependency graph for AFSAuth.cxx:

Typedefs

typedef struct ktc_token AFStoken_t
 

Functions

char * AFSLocalCell ()
 Returns a pointer to a string with the local cell. More...
 
void DeleteAFSToken (void *token)
 Delete an AFS token returned by a successful call to GetAFSToken. More...
 
char * GetAFSErrorString (afs_int32 rc)
 Decode the error code returning a pointer to a human readable string. More...
 
voidGetAFSToken (const char *usr, const char *pwd, int pwlen, int life, char **emsg)
 Get AFS token for the local cell for 'usr'. More...
 
afs_int32 ka_Authenticate (char *name, char *instance, char *cell, struct ubik_client *conn, int service, struct ktc_encryptionKey *key, Date start, Date end, struct ktc_token *token, afs_int32 *pwexpires)
 
afs_int32 ka_AuthServerConn (char *cell, int service, struct ktc_token *token, struct ubik_client **conn)
 
afs_int32 ka_GetAFSTicket (char *name, char *instance, char *realm, Date lifetime, afs_int32 flags)
 
afs_int32 ka_GetAuthToken (char *name, char *instance, char *cell, struct ktc_encryptionKey *key, afs_int32 lifetime, afs_int32 *pwexpires)
 
char * ka_LocalCell ()
 
void ka_StringToKey (char *str, char *cell, struct ktc_encryptionKey *key)
 
int ktc_GetToken (struct ktc_principal *server, struct ktc_token *token, int tokenLen, struct ktc_principal *client)
 
int VerifyAFSToken (void *token)
 Verify validity an AFS token. More...
 

Typedef Documentation

◆ AFStoken_t

typedef struct ktc_token AFStoken_t

Definition at line 49 of file AFSAuth.cxx.

Function Documentation

◆ AFSLocalCell()

char* AFSLocalCell ( )

Returns a pointer to a string with the local cell.

The string must not be freed or deleted.

Definition at line 239 of file AFSAuth.cxx.

◆ DeleteAFSToken()

void DeleteAFSToken ( void token)

Delete an AFS token returned by a successful call to GetAFSToken.

Definition at line 229 of file AFSAuth.cxx.

◆ GetAFSErrorString()

char* GetAFSErrorString ( afs_int32  rc)

Decode the error code returning a pointer to a human readable string.

The two additional messages are taken from the OpenAFS source (src/kauth/user.c).

Definition at line 56 of file AFSAuth.cxx.

◆ GetAFSToken()

void* GetAFSToken ( const char *  usr,
const char *  pwd,
int  pwlen,
int  life,
char **  emsg 
)

Get AFS token for the local cell for 'usr'.

The meaning of the information passed at 'pwd' depends on 'pwlen'. For 'pwlen <= 0' 'pwd' is interpreted as the plain password (null terminated string). For 'pwlen > 0', the 'pwlen' bytes at 'pwd' contain the password in for of encryption key (struct ktc_encryptionKey). On success a token is returned as opaque information. On error / failure, 0 is returned; if emsg != 0, *emsg points to an error message.

Definition at line 93 of file AFSAuth.cxx.

◆ ka_Authenticate()

afs_int32 ka_Authenticate ( char *  name,
char *  instance,
char *  cell,
struct ubik_client *  conn,
int  service,
struct ktc_encryptionKey *  key,
Date  start,
Date  end,
struct ktc_token *  token,
afs_int32 *  pwexpires 
)

◆ ka_AuthServerConn()

afs_int32 ka_AuthServerConn ( char *  cell,
int  service,
struct ktc_token *  token,
struct ubik_client **  conn 
)

◆ ka_GetAFSTicket()

afs_int32 ka_GetAFSTicket ( char *  name,
char *  instance,
char *  realm,
Date  lifetime,
afs_int32  flags 
)

◆ ka_GetAuthToken()

afs_int32 ka_GetAuthToken ( char *  name,
char *  instance,
char *  cell,
struct ktc_encryptionKey *  key,
afs_int32  lifetime,
afs_int32 *  pwexpires 
)

◆ ka_LocalCell()

char* ka_LocalCell ( )

◆ ka_StringToKey()

void ka_StringToKey ( char *  str,
char *  cell,
struct ktc_encryptionKey *  key 
)

◆ ktc_GetToken()

int ktc_GetToken ( struct ktc_principal *  server,
struct ktc_token *  token,
int  tokenLen,
struct ktc_principal *  client 
)

◆ VerifyAFSToken()

int VerifyAFSToken ( void token)

Verify validity an AFS token.

The opaque input information is the one returned by a successful call to GetAFSToken. The remaining lifetime is returned, i.e. <=0 if expired.

Definition at line 212 of file AFSAuth.cxx.