return 0;
}
-#if !defined(UKERNEL)
static int _afsconf_GetRxkadKrb5Key(void *arock, int kvno, int enctype, void *outkey,
size_t *keylen)
{
return 2;
}
}
-#endif /* !defined(UKERNEL) */
static afs_int32
GenericAuth(struct afsconf_dir *adir,
afs_int32 *aindex,
rxkad_level enclevel)
{
-#ifdef UKERNEL
- return QuickAuth(astr, aindex);
-#else
int enctype_preflist[]={18, 17, 23, 16, 0};
char tbuffer[512];
struct ktc_encryptionKey key, session;
*astr = tclass;
*aindex = RX_SECIDX_KAD;
return 0;
-#endif
}
/* build a fake ticket for 'afs' using keys from adir, returning an
* Build a set of security classes suitable for a server accepting
* incoming connections
*/
-#if !defined(UKERNEL)
void
afsconf_BuildServerSecurityObjects(void *rock,
struct rx_securityClass ***classes,
rxkad_NewKrb5ServerSecurityObject(rxkad_crypt, dir, afsconf_GetKey,
_afsconf_GetRxkadKrb5Key, NULL);
}
-#endif
/*!
* Pick a security class to use for an outgoing connection
strcompose(buffer, len, adir->name, "/", AFSDIR_ULIST_FILE, (char *)NULL);
}
-#if !defined(UKERNEL)
int
afsconf_CheckAuth(void *arock, struct rx_call *acall)
{
UNLOCK_GLOBAL_MUTEX;
return rc;
}
-#endif /* !defined(UKERNEL) */
static int
GetNoAuthFlag(struct afsconf_dir *adir)
#include "kauth.h"
#include "kautils.h"
-#ifdef UKERNEL
-#include "afs_usrops.h"
-#endif
-
static struct afsconf_dir *conf = 0;
static struct afsconf_cell explicit_cell_server_list;
static struct afsconf_cell debug_cell_server_list;
cell = lcstring(cellname, cell, sizeof(cellname));
if (!conf) {
-#ifdef UKERNEL
- conf = afs_cdir;
-#else /* UKERNEL */
conf = afsconf_Open(AFSDIR_CLIENT_ETC_DIRPATH);
-#endif /* UKERNEL */
if (!conf) {
UNLOCK_GLOBAL_MUTEX;
return KANOCELLS;
#include "kauth.h"
#include "kautils.h"
-#ifdef UKERNEL
-#include "afs_usrops.h"
-#endif
-
/* This is a utility routine that many parts of kauth use but it invokes the
afsconf package so its best to have it in a separate .o file to make the
linker happy. */
int
ka_CellConfig(const char *dir)
{
-#ifdef UKERNEL
- conf = afs_cdir;
- strcpy(cell_name, afs_LclCellName);
- return 0;
-#else /* UKERNEL */
int code;
LOCK_GLOBAL_MUTEX;
code = afsconf_GetLocalCell(conf, cell_name, sizeof(cell_name));
UNLOCK_GLOBAL_MUTEX;
return code;
-#endif /* UKERNEL */
}
char *
ka_LocalCell(void)
{
-#ifndef UKERNEL
int code = 0;
-#endif
LOCK_GLOBAL_MUTEX;
if (conf) {
UNLOCK_GLOBAL_MUTEX;
return cell_name;
}
-#ifdef UKERNEL
- conf = afs_cdir;
- strcpy(cell_name, afs_LclCellName);
-#else /* UKERNEL */
if ((conf = afsconf_Open(AFSDIR_CLIENT_ETC_DIRPATH))) {
code = afsconf_GetLocalCell(conf, cell_name, sizeof(cell_name));
/* leave conf open so we can lookup other cells */
UNLOCK_GLOBAL_MUTEX;
return 0;
}
-#endif /* UKERNEL */
UNLOCK_GLOBAL_MUTEX;
return cell_name;
}
#include <roken.h>
#include <afs/opr.h>
-#ifdef UKERNEL
-# include "afsincludes.h"
-#endif
-
#include <rx/xdr.h>
#include <afs/pthread_glock.h>
#include <afs/cellconfig.h>
#include <afs/ptuser.h>
#include <afs/ptserver.h>
#include <afs/afsutil.h>
-
-#ifndef UKERNEL
#include <afs/sys_prototypes.h>
-#endif
#include <rx/rx.h>
#include <rx/rx_globals.h>
if (flags & KA_USERAUTH_DOSETPAG)
afs_setpag();
#else
-#if !defined(UKERNEL) && !defined(AFS_NT40_ENV)
+#if !defined(AFS_NT40_ENV)
if (flags & KA_USERAUTH_DOSETPAG)
setpag();
#endif
reasonP);
}
-#if !defined(UKERNEL)
afs_int32
ka_UserReadPassword(char *prompt, char *password, int plen, char **reasonP)
{
}
return code;
}
-#endif /* !defined(UKERNEL) */
afs_int32
ka_VerifyUserPassword(afs_int32 version, char *name, char *instance,
#include "ptuser.h"
#include "pterror.h"
-#ifdef UKERNEL
-# include "afs_usrops.h"
-#endif
-
struct ubik_client *pruclient = 0;
static afs_int32 lastLevel; /* security level pruclient, if any */
afs_int32 secFlags;
static struct afsconf_cell info;
afs_int32 i;
-#if !defined(UKERNEL)
char cellstr[64];
-#endif
afs_int32 gottdir = 0;
afs_int32 refresh = 0;
initialize_ACFG_error_table();
initialize_KTC_error_table();
-#if defined(UKERNEL)
- if (!cell) {
- cell = afs_LclCellName;
- }
-#else /* defined(UKERNEL) */
if (!cell) {
if (!tdir)
tdir = afsconf_Open(confDir);
}
cell = cellstr;
}
-#endif /* defined(UKERNEL) */
if (tdir == NULL || strcmp(confDir, tconfDir) || strcmp(cell, tcell)) {
/*
strncpy(tconfDir, confDir, sizeof(tconfDir));
strncpy(tcell, cell, sizeof(tcell));
-#if defined(UKERNEL)
- tdir = afs_cdir;
-#else /* defined(UKERNEL) */
if (!gottdir)
tdir = afsconf_Open(confDir);
if (!tdir) {
"libprot: No configuration directory specified.\n");
return -1;
}
-#endif /* defined(UKERNEL) */
code = afsconf_GetCellInfo(tdir, cell, "afsprot", &info);
if (code) {
afs_int32 mtime;
};
-#if defined(UKERNEL)
-#include "afs/lock.h"
-#else /* defined(UKERNEL) */
#include <lock.h> /* just to make sure we've got this */
-#endif /* defined(UKERNEL) */
/*!
* \brief representation of a ubik database.
struct ubik_version version; /*!< version number */
#ifdef AFS_PTHREAD_ENV
pthread_mutex_t versionLock; /*!< lock on version number */
-#elif defined(UKERNEL)
- struct afs_lock versionLock; /*!< lock on version number */
-#else /* defined(UKERNEL) */
+#else
struct Lock versionLock; /*!< lock on version number */
-#endif /* defined(UKERNEL) */
+#endif
afs_int32 tidCounter; /*!< last RW or RO trans tid counter */
afs_int32 writeTidCounter; /*!< last write trans tid counter */
afs_int32 flags; /*!< flags */
int (*getnfiles) (struct ubik_dbase * adbase); /*!< find out number of files */
short readers; /*!< number of current read transactions */
struct ubik_version cachedVersion; /*!< version of caller's cached data */
-#ifdef UKERNEL
- struct afs_lock cache_lock;
-#else
struct Lock cache_lock; /*!< protects cached application data */
-#endif
#ifdef AFS_PTHREAD_ENV
pthread_cond_t version_cond; /*!< condition variable to manage changes to version */
pthread_cond_t flags_cond; /*!< condition variable to manage changes to flags */
# pragma GCC diagnostic warning "-Wstrict-prototypes"
#endif
-#ifdef UKERNEL
-#include "afsincludes.h"
-#endif
-
#include <afs/pthread_glock.h>
#include <rx/xdr.h>
#include <rx/rx.h>
#endif
-#if !defined(UKERNEL)
/*!
* \brief use time and pid to try to get some initial randomness.
*/
return temp;
}
-#endif /* !defined(UKERNEL) */
#ifdef abs
#undef abs