which included commits to RCS files with non-trunk default branches.
chmod a+w ${DEST}/root.afsweb/install/${APACHE_INSTALL_SCRIPT}
${INSTALL} $(BINARIES) ${DEST}/root.afsweb/bin
+netscape_afs_web_secure:
+ ${INSTALL} ${NETSCAPE_INSTALL_SCRIPT} ${DEST}/root.afsweb/install
+ chmod a+x ${DEST}/root.afsweb/install/${NETSCAPE_INSTALL_SCRIPT}
+ chmod a+w ${DEST}/root.afsweb/install/${NETSCAPE_INSTALL_SCRIPT}
+
all: kinstall ukinstall
install:
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/bozo/bosserver.c,v 1.1.1.11 2002/01/22 19:52:32 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/bozo/bosserver.c,v 1.1.1.12 2002/05/10 23:57:25 hartmans Exp $");
#include <afs/stds.h>
#include <sys/types.h>
bozo_rxsc[2] = (struct rx_securityClass *) rxkad_NewServerSecurityObject(
0, tdir, afsconf_GetKey, (char *) 0);
- /* These two lines disallow jumbograms */
- rx_maxReceiveSize = OLD_MAX_PACKET_SIZE;
- rxi_nSendFrags = rxi_nRecvFrags = 1;
+ /* Disable jumbograms */
+ rx_SetNoJumbo();
tservice = rx_NewService(/* port */ 0, /* service id */ 1,
/*service name */ "bozo", /* security classes */ bozo_rxsc,
);
proc DeleteDump
- ( IN afs_uint32 dumpId,
+ ( IN afs_uint32 aDumpId,
OUT afs_uint32 *taskId
);
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/budb/server.c,v 1.1.1.7 2001/10/14 18:04:15 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/budb/server.c,v 1.1.1.8 2002/05/10 23:57:52 hartmans Exp $");
#ifdef AFS_NT40_ENV
#include <winsock2.h>
afsconf_GetKey,
(char *) 0);
- /* These two lines disallow jumbograms */
- rx_maxReceiveSize = OLD_MAX_PACKET_SIZE;
- rxi_nSendFrags = rxi_nRecvFrags = 1;
+ /* Disable jumbograms */
+ rx_SetNoJumbo();
tservice = rx_NewService(0, BUDB_SERVICE, "BackupDatabase",
sca, 3, BUDB_ExecuteRequest);
#define AFS_HAVE_STATVFS 1 /* System supports statvfs */
#define AFS_GCPAGS 1 /* if nonzero, garbage collect PAGs */
+
+#ifdef AFS_NAMEI_ENV
+#define AFS_64BIT_IOPS_ENV 1 /* needed for NAMEI... */
+#else
#define AFS_3DISPARES 1 /* Utilize the 3 available disk inode spares */
+#endif
+
#define AFS_USE_GETTIMEOFDAY 1 /* use gettimeofday to implement rx clock */
#if !defined(ASSEMBLER) && !defined(__LANGUAGE_ASSEMBLY__)
#define AFS_DARWIN14_ENV
#define AFS_NONFSTRANS
#define AFS_SYSCALL 230
+#define AFS_NAMEI_ENV 1
/* File system entry (used if mount.h doesn't define MOUNT_AFS */
#define AFS_MOUNT_AFS "afs"
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/dir/buffer.c,v 1.1.1.7 2001/10/14 18:04:51 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/dir/buffer.c,v 1.1.1.8 2002/05/10 23:58:41 hartmans Exp $");
#include <stdlib.h>
#include <lock.h>
*/
register struct buffer *tb;
ObtainWriteLock(&afs_bufferLock);
- if ((tb = newslot(fid,page,0)) == 0) {
- ReleaseWriteLock(&afs_bufferLock);
- return 0;
- }
+ tb = newslot(fid,page,0);
ObtainWriteLock(&tb->lock);
ReleaseWriteLock(&afs_bufferLock);
tb->lockers++;
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/fsprobe/fsprobe_callback.c,v 1.1.1.4 2001/07/14 22:21:56 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/fsprobe/fsprobe_callback.c,v 1.1.1.5 2002/05/10 23:58:47 hartmans Exp $");
#include <errno.h>
#include <stdio.h> /*Standard I/O stuff*/
struct rx_call *a_call,
afs_int32 a_index,
char **a_name,
- afs_int32 *a_hosts)
+ serverList *a_hosts)
{
return RXGEN_OPCODE;
}
#include <afs/param.h>
#endif
-RCSID("$Header: /tmp/cvstemp/openafs/src/kauth/client.c,v 1.1.1.8 2001/10/14 18:05:03 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/kauth/client.c,v 1.1.1.9 2002/05/10 23:59:01 hartmans Exp $");
#if defined(UKERNEL)
#include "../afs/sysincludes.h"
#include <strings.h>
#endif
#endif
+#ifdef HAVE_UNISTD_H
+#define __USE_XOPEN
+#include <unistd.h>
+#endif
#include <afs/cellconfig.h>
#include <afs/auth.h>
#include <afs/afsutil.h>
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/kauth/kaprocs.c,v 1.1.1.9 2001/10/14 18:05:06 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/kauth/kaprocs.c,v 1.1.1.10 2002/05/10 23:59:04 hartmans Exp $");
#include <afs/stds.h>
#include <errno.h>
/* Put actual stub routines here */
-afs_int32 KAM_CreateUser (call, aname, ainstance, ainitpw)
+afs_int32 SKAM_CreateUser (call, aname, ainstance, ainitpw)
struct rx_call *call;
char *aname;
char *ainstance;
return code;
}
-afs_int32 KAA_ChangePassword (call, aname, ainstance, arequest, oanswer)
+afs_int32 SKAA_ChangePassword (call, aname, ainstance, arequest, oanswer)
struct rx_call *call;
char *aname;
char *ainstance;
return(0);
}
-afs_int32 KAM_SetPassword (call, aname, ainstance, akvno, apassword)
+afs_int32 SKAM_SetPassword (call, aname, ainstance, akvno, apassword)
struct rx_call *call;
char *aname;
char *ainstance;
return code;
}
-afs_int32 KAA_Authenticate_old (call, aname, ainstance, start, end,
+afs_int32 SKAA_Authenticate_old (call, aname, ainstance, start, end,
arequest, oanswer)
struct rx_call *call;
char *aname;
return code;
}
-afs_int32 KAA_Authenticate (call, aname, ainstance, start, end, arequest, oanswer)
+afs_int32 SKAA_Authenticate (call, aname, ainstance, start, end, arequest, oanswer)
struct rx_call *call;
char *aname;
char *ainstance;
return code;
}
-afs_int32 KAA_AuthenticateV2 (call, aname, ainstance, start, end, arequest, oanswer)
+afs_int32 SKAA_AuthenticateV2 (call, aname, ainstance, start, end, arequest, oanswer)
struct rx_call *call;
char *aname;
char *ainstance;
return code;
}
-afs_int32 KAM_SetFields (call, aname, ainstance, aflags,
+afs_int32 SKAM_SetFields (call, aname, ainstance, aflags,
aexpiration, alifetime, amaxAssociates, misc_auth_bytes, spare2)
struct rx_call *call;
char *aname;
/* delete a user */
-afs_int32 KAM_DeleteUser(call, aname, ainstance)
+afs_int32 SKAM_DeleteUser(call, aname, ainstance)
struct rx_call *call;
char *aname;
char *ainstance;
* report that the ID is not locked, or else to find out when the ID
* will be unlocked.
*/
-afs_int32 KAM_GetEntry (call, aname, ainstance, aversion, aentry)
+afs_int32 SKAM_GetEntry (call, aname, ainstance, aversion, aentry)
struct rx_call *call;
char *aname;
char *ainstance;
return code;
}
-afs_int32 KAM_ListEntry (call, previous_index, index, count, name)
+afs_int32 SKAM_ListEntry (call, previous_index, index, count, name)
struct rx_call *call;
afs_int32 previous_index; /* last entry ret'd or 0 for first */
afs_int32 *index; /* index of this entry */
return code;
}
-afs_int32 KAT_GetTicket_old (call, kvno, authDomain, aticket,
+afs_int32 SKAT_GetTicket_old (call, kvno, authDomain, aticket,
sname, sinstance, atimes, oanswer)
struct rx_call *call;
afs_int32 kvno;
return code;
}
-afs_int32 KAT_GetTicket (call, kvno, authDomain, aticket,
+afs_int32 SKAT_GetTicket (call, kvno, authDomain, aticket,
sname, sinstance, atimes, oanswer)
struct rx_call *call;
afs_int32 kvno;
return code;
}
-afs_int32 KAM_GetStats (call, version, admin_accounts, statics, dynamics)
+afs_int32 SKAM_GetStats (call, version, admin_accounts, statics, dynamics)
struct rx_call *call;
afs_int32 version;
afs_int32 *admin_accounts;
return code;
}
-afs_int32 KAM_GetPassword (call, name, password)
+afs_int32 SKAM_GetPassword (call, name, password)
struct rx_call *call;
char *name;
EncryptionKey *password;
return code;
}
-afs_int32 KAM_GetRandomKey (call, key)
+afs_int32 SKAM_GetRandomKey (call, key)
struct rx_call *call;
EncryptionKey *key;
{
return 0;
}
-afs_int32 KAM_Debug (call, version, checkDB, info)
+afs_int32 SKAM_Debug (call, version, checkDB, info)
struct rx_call *call;
afs_int32 version;
int checkDB; /* start a transaction to examine DB */
* prob'ly ought to check the noauth flag.
*/
#define ABORTIF(A) {if(code= A){goto abort;}}
-afs_int32 KAM_Unlock (call, aname, ainstance, spare1, spare2, spare3, spare4)
+afs_int32 SKAM_Unlock (call, aname, ainstance, spare1, spare2, spare3, spare4)
struct rx_call *call;
char *aname;
char *ainstance;
return code;
}
-afs_int32 KAM_LockStatus (call, aname, ainstance, lockeduntil, spare1, spare2, spare3, spare4)
+afs_int32 SKAM_LockStatus (call, aname, ainstance, lockeduntil, spare1, spare2, spare3, spare4)
struct rx_call *call;
char *aname;
char *ainstance;
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/kauth/kaserver.c,v 1.1.1.9 2001/10/14 18:05:07 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/kauth/kaserver.c,v 1.1.1.10 2002/05/10 23:59:05 hartmans Exp $");
#include <afs/stds.h>
#include <sys/types.h>
sca[RX_SCINDEX_NULL] = rxnull_NewServerSecurityObject();
- /* These two lines disallow jumbograms */
- rx_maxReceiveSize = OLD_MAX_PACKET_SIZE;
- rxi_nSendFrags = rxi_nRecvFrags = 1;
+ /* Disable jumbograms */
+ rx_SetNoJumbo();
tservice =
rx_NewService (0, KA_AUTHENTICATION_SERVICE, "AuthenticationService",
/* finally the procedural definitions */
package KAA_
+prefix S
statindex 18
proc Authenticate_old(
) = 2;
package KAT_
+prefix S
statindex 19
proc GetTicket_old(
) = 23;
package KAM_
+prefix S
statindex 20
proc SetPassword(
IN Date user_expiration,
IN afs_int32 max_ticket_lifetime,
IN afs_int32 maxAssociates,
- IN afs_int32 spare1,
+ IN afs_uint32 misc_auth_bytes,
IN afs_int32 spare2
) = 5;
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/libadmin/bos/afs_bosAdmin.c,v 1.1.1.7 2001/09/11 14:33:08 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/libadmin/bos/afs_bosAdmin.c,v 1.1.1.8 2002/05/10 23:59:18 hartmans Exp $");
#include <stdio.h>
#include <afs/stds.h>
extern int BOZO_SetCellName();
extern int BOZO_SetNoAuthFlag();
extern int BOZO_SetRestartTime();
-extern int BOZO_SetStatus(struct rx_connection *, const char *, long);
-extern int BOZO_SetTStatus(struct rx_connection *, const char *, long);
+extern int BOZO_SetStatus(struct rx_connection *, char *, afs_int32);
+extern int BOZO_SetTStatus(struct rx_connection *, char *, afs_int32);
extern int BOZO_ShutdownAll();
extern int BOZO_StartupAll();
extern int BOZO_UnInstall();
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/libadmin/pts/afs_ptsAdmin.c,v 1.1.1.4 2001/07/14 22:22:33 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/libadmin/pts/afs_ptsAdmin.c,v 1.1.1.5 2002/05/10 23:59:34 hartmans Exp $");
#include <stdio.h>
#include <afs/stds.h>
extern int PR_IsAMemberOf();
extern int PR_ListMax();
extern int PR_ListOwned();
+extern int PR_ListEntries();
/*
* IsValidCellHandle - validate the cell handle for making pts
}
return rc;
}
+
+typedef struct pts_list {
+ prlistentries *names; /* the current list of pts names in this cell */
+ prlistentries *currName; /* the current pts entry */
+ afs_int32 index; /* the index into names for the next pts entry */
+ afs_int32 nextstartindex; /* the next start index for the RPC */
+ afs_int32 nentries; /* the number of entries in names */
+ afs_int32 flag; /* the type of the list */
+ int finished_retrieving; /* set when we've processed the last owned_names */
+ afs_cell_handle_p c_handle; /* ubik client to pts server's from c_handle */
+ char entries[CACHED_ITEMS][PTS_MAX_NAME_LEN]; /* cache of pts names */
+} pts_list_t, *pts_list_p;
+
+static int DeletePTSSpecificData(
+ void *rpc_specific,
+ afs_status_p st)
+{
+ int rc = 0;
+ afs_status_t tst = 0;
+ pts_list_p list = (pts_list_p) rpc_specific;
+
+ if (list->names) {
+ free(list->names);
+ }
+
+ rc = 1;
+
+ if (st != NULL) {
+ *st = tst;
+ }
+ return rc;
+}
+
+static int GetPTSRPC(
+ void *rpc_specific,
+ int slot,
+ int *last_item,
+ int *last_item_contains_data,
+ afs_status_p st)
+{
+ int rc = 0;
+ afs_status_t tst = 0;
+ pts_list_p list = (pts_list_p) rpc_specific;
+
+ /*
+ * We really don't make an rpc for every entry we return here
+ * since the pts interface allows several members to be returned
+ * with one rpc, but we fake it to make the iterator happy.
+ */
+
+ /*
+ * Check to see if we are done retrieving data
+ */
+
+ if (list->finished_retrieving) {
+ *last_item = 1;
+ *last_item_contains_data = 0;
+ goto fail_GetPTSRPC;
+ }
+
+ /*
+ * Check to see if we really need to make an rpc
+ */
+
+ if ((!list->finished_retrieving) && (list->index >= list->nentries) ) {
+ afs_int32 start = list->nextstartindex;
+ prentries bulkentries;
+ list->nextstartindex = -1;
+ bulkentries.prentries_val = 0;
+ bulkentries.prentries_len = 0;
+
+ tst = ubik_Call(PR_ListEntries, list->c_handle->pts, 0, list->flag, start,
+ &bulkentries, &(list->nextstartindex) );
+
+ if (tst != 0) {
+ goto fail_GetPTSRPC;
+ }
+
+ list->nentries = bulkentries.prentries_len;
+ list->names = bulkentries.prentries_val;
+
+ list->index = 0;
+ list->currName = list->names;
+
+ }
+
+ /*
+ * We can retrieve the next entry from data we already received
+ */
+
+ strcpy(&list->entries[slot], list->currName->name);
+ list->index++;
+ list->currName++;
+
+
+ /*
+ * Check to see if there is more data to be retrieved
+ * We need to free up the previously retrieved data here
+ * and then check to see if the last rpc indicated that there
+ * were more items to retrieve.
+ */
+
+ if (list->index >= list->nentries) {
+ if( list->names ) {
+ free(list->names);
+ }
+ list->names = NULL;
+
+ if (list->nextstartindex == -1) {
+ list->finished_retrieving = 1;
+ }
+ }
+ rc = 1;
+
+fail_GetPTSRPC:
+
+ if (st != NULL) {
+ *st = tst;
+ }
+
+ return rc;
+}
+
+static int GetPTSFromCache(
+ void *rpc_specific,
+ int slot,
+ void *dest,
+ afs_status_p st)
+{
+ int rc = 0;
+ afs_status_t tst = 0;
+ pts_list_p list = (pts_list_p) rpc_specific;
+
+ strcpy((char *) dest, &list->entries[slot]);
+ rc = 1;
+
+ if (st != NULL) {
+ *st = tst;
+ }
+
+ return rc;
+}
+
+/*
+ * pts_UserListBegin - begin iterating over the list of users
+ * in a particular cell
+ *
+ * PARAMETERS
+ *
+ * IN cellHandle - a previously opened cellHandle that corresponds
+ * to the cell where the users exist.
+ *
+ * OUT iterationIdP - upon successful completion contains a iterator that
+ * can be passed to pts_UserListNext.
+ *
+ * LOCKS
+ *
+ * No locks are held by this function
+ *
+ * RETURN CODES
+ *
+ * Returns != 0 upon successful completion.
+ *
+ */
+
+int ADMINAPI pts_UserListBegin(
+ const void *cellHandle,
+ void **iterationIdP,
+ afs_status_p st)
+{
+ int rc = 0;
+ afs_status_t tst = 0;
+ afs_cell_handle_p c_handle = (afs_cell_handle_p) cellHandle;
+ afs_admin_iterator_p iter = (afs_admin_iterator_p) malloc(sizeof(afs_admin_iterator_t));
+ pts_list_p list = (pts_list_p) malloc(sizeof(pts_list_t));
+
+ /*
+ * Validate arguments
+ */
+
+ if (!IsValidCellHandle(c_handle, &tst)) {
+ goto fail_pts_UserListBegin;
+ }
+
+ if (iterationIdP == NULL) {
+ tst = ADMITERATORNULL;
+ goto fail_pts_UserListBegin;
+ }
+
+ if ((iter == NULL) || (list == NULL)) {
+ tst = ADMNOMEM;
+ goto fail_pts_UserListBegin;
+ }
+
+ /*
+ * Initialize the iterator specific data
+ */
+
+ list->index = 0;
+ list->finished_retrieving = 0;
+ list->c_handle = c_handle;
+ list->names = NULL;
+ list->nextstartindex = 0;
+ list->nentries = 0;
+ list->flag = PRUSERS;
+
+ if (IteratorInit(iter, (void *) list, GetPTSRPC,
+ GetPTSFromCache, NULL,
+ DeletePTSSpecificData, &tst)) {
+ *iterationIdP = (void *) iter;
+ rc = 1;
+ }
+
+fail_pts_UserListBegin:
+
+ if (rc == 0) {
+ if (iter != NULL) {
+ free(iter);
+ }
+ if (list != NULL) {
+ free(list);
+ }
+ }
+
+ if (st != NULL) {
+ *st = tst;
+ }
+ return rc;
+}
+
+/*
+ * pts_UserListNext - get the next user in the cell.
+ *
+ * PARAMETERS
+ *
+ * IN iterationId - an iterator previously returned by pts_UserListBegin
+ *
+ * OUT groupName - upon successful completion contains the next user
+ *
+ * LOCKS
+ *
+ * The iterator mutex is held during the retrieval of the next member.
+ *
+ * RETURN CODES
+ *
+ * Returns != 0 upon successful completion.
+ *
+ */
+
+int ADMINAPI pts_UserListNext(
+ const void *iterationId,
+ char *userName,
+ afs_status_p st)
+{
+ int rc = 0;
+ afs_status_t tst = 0;
+ afs_admin_iterator_p iter = (afs_admin_iterator_p) iterationId;
+
+ /*
+ * Validate arguments
+ */
+
+ if (iterationId == NULL) {
+ tst = ADMITERATORNULL;
+ goto fail_pts_UserListNext;
+ }
+
+ if (userName == NULL) {
+ tst = ADMPTSUSERNAMENULL;
+ goto fail_pts_UserListNext;
+ }
+
+ rc = IteratorNext(iter, (void *) userName, &tst);
+
+fail_pts_UserListNext:
+
+ if (st != NULL) {
+ *st = tst;
+ }
+ return rc;
+}
+
+/*
+ * pts_UserListDone - finish using a user list iterator
+ *
+ * PARAMETERS
+ *
+ * IN iterationId - an iterator previously returned by pts_UserListBegin
+ *
+ * LOCKS
+ *
+ * The iterator is locked and then destroyed
+ *
+ * RETURN CODES
+ *
+ * Returns != 0 upon successful completion.
+ *
+ * ASSUMPTIONS
+ *
+ * It is the user's responsibility to make sure pts_UserListDone
+ * is called only once for each iterator.
+ */
+
+int ADMINAPI pts_UserListDone(
+ const void *iterationId,
+ afs_status_p st)
+{
+ int rc = 0;
+ afs_status_t tst = 0;
+ afs_admin_iterator_p iter = (afs_admin_iterator_p) iterationId;
+
+ /*
+ * Validate arguments
+ */
+
+ if (iterationId == NULL) {
+ tst = ADMITERATORNULL;
+ goto fail_pts_UserListDone;
+ }
+
+ rc = IteratorDone(iter, &tst);
+
+fail_pts_UserListDone:
+
+ if (st != NULL) {
+ *st = tst;
+ }
+ return rc;
+}
+
+/*
+ * pts_GroupListBegin - begin iterating over the list of groups
+ * in a particular cell.
+ *
+ * PARAMETERS
+ *
+ * IN cellHandle - a previously opened cellHandle that corresponds
+ * to the cell where the groups exist.
+ *
+ * OUT iterationIdP - upon successful completion contains a iterator that
+ * can be passed to pts_GroupListNext.
+ *
+ * LOCKS
+ *
+ * No locks are held by this function
+ *
+ * RETURN CODES
+ *
+ * Returns != 0 upon successful completion.
+ *
+ */
+
+int ADMINAPI pts_GroupListBegin(
+ const void *cellHandle,
+ void **iterationIdP,
+ afs_status_p st)
+{
+ int rc = 0;
+ afs_status_t tst = 0;
+ afs_cell_handle_p c_handle = (afs_cell_handle_p) cellHandle;
+ afs_admin_iterator_p iter = (afs_admin_iterator_p) malloc(sizeof(afs_admin_iterator_t));
+ pts_list_p list = (pts_list_p) malloc(sizeof(pts_list_t));
+
+ /*
+ * Validate arguments
+ */
+
+ if (!IsValidCellHandle(c_handle, &tst)) {
+ goto fail_pts_GroupListBegin;
+ }
+
+ if (iterationIdP == NULL) {
+ tst = ADMITERATORNULL;
+ goto fail_pts_GroupListBegin;
+ }
+
+ if ((iter == NULL) || (list == NULL)) {
+ tst = ADMNOMEM;
+ goto fail_pts_GroupListBegin;
+ }
+
+ /*
+ * Initialize the iterator specific data
+ */
+
+ list->index = 0;
+ list->finished_retrieving = 0;
+ list->c_handle = c_handle;
+ list->names = NULL;
+ list->nextstartindex = 0;
+ list->nentries = 0;
+ list->flag = PRGROUPS;
+
+ if (IteratorInit(iter, (void *) list, GetPTSRPC,
+ GetPTSFromCache, NULL,
+ DeletePTSSpecificData, &tst)) {
+ *iterationIdP = (void *) iter;
+ rc = 1;
+ }
+
+fail_pts_GroupListBegin:
+
+ if (rc == 0) {
+ if (iter != NULL) {
+ free(iter);
+ }
+ if (list != NULL) {
+ free(list);
+ }
+ }
+
+ if (st != NULL) {
+ *st = tst;
+ }
+ return rc;
+}
+
+/*
+ * pts_UserListNext - get the next group in a cell.
+ *
+ * PARAMETERS
+ *
+ * IN iterationId - an iterator previously returned by pts_GroupListBegin
+ *
+ * OUT groupName - upon successful completion contains the next group
+ *
+ * LOCKS
+ *
+ * The iterator mutex is held during the retrieval of the next member.
+ *
+ * RETURN CODES
+ *
+ * Returns != 0 upon successful completion.
+ *
+ */
+
+int ADMINAPI pts_GroupListNext(
+ const void *iterationId,
+ char *groupName,
+ afs_status_p st)
+{
+ int rc = 0;
+ afs_status_t tst = 0;
+ afs_admin_iterator_p iter = (afs_admin_iterator_p) iterationId;
+
+ /*
+ * Validate arguments
+ */
+
+ if (iterationId == NULL) {
+ tst = ADMITERATORNULL;
+ goto fail_pts_GroupListNext;
+ }
+
+ if (groupName == NULL) {
+ tst = ADMPTSGROUPNAMENULL;
+ goto fail_pts_GroupListNext;
+ }
+
+ rc = IteratorNext(iter, (void *) groupName, &tst);
+
+fail_pts_GroupListNext:
+
+ if (st != NULL) {
+ *st = tst;
+ }
+ return rc;
+}
+
+/*
+ * pts_GroupListDone - finish using a group list iterator
+ *
+ * PARAMETERS
+ *
+ * IN iterationId - an iterator previously returned by pts_GroupListBegin
+ *
+ * LOCKS
+ *
+ * The iterator is locked and then destroyed
+ *
+ * RETURN CODES
+ *
+ * Returns != 0 upon successful completion.
+ *
+ * ASSUMPTIONS
+ *
+ * It is the user's responsibility to make sure pts_GroupListDone
+ * is called only once for each iterator.
+ */
+
+int ADMINAPI pts_GroupListDone(
+ const void *iterationId,
+ afs_status_p st)
+{
+ int rc = 0;
+ afs_status_t tst = 0;
+ afs_admin_iterator_p iter = (afs_admin_iterator_p) iterationId;
+
+ /*
+ * Validate arguments
+ */
+
+ if (iterationId == NULL) {
+ tst = ADMITERATORNULL;
+ goto fail_pts_GroupListDone;
+ }
+
+ rc = IteratorDone(iter, &tst);
+
+fail_pts_GroupListDone:
+
+ if (st != NULL) {
+ *st = tst;
+ }
+ return rc;
+}
+
afs_status_p st
);
+extern int ADMINAPI pts_UserListBegin(
+ const void *cellHandle,
+ void **iterationIdP,
+ afs_status_p st
+);
+
+extern int ADMINAPI pts_UserListNext(
+ const void *iterationId,
+ char *userName,
+ afs_status_p st
+);
+
+extern int ADMINAPI pts_UserListDone(
+ const void *iterationId,
+ afs_status_p st
+);
+
+extern int ADMINAPI pts_GroupListBegin(
+ const void *cellHandle,
+ void **iterationIdP,
+ afs_status_p st
+);
+
+extern int ADMINAPI pts_GroupListNext(
+ const void *iterationId,
+ char *groupName,
+ afs_status_p st
+);
+
+extern int ADMINAPI pts_GroupListDone(
+ const void *iterationId,
+ afs_status_p st
+);
+
#endif /* TRANSARC_AFS_PTS_ADMIN_H */
${DEST}/lib/pam_afs.krb.so.1: pam_afs.krb.so.1
${INSTALL} $? $@
-afs_auth.o: afs_auth.c afs_pam_msg.h afs_message.h afs_util.h
afs_pam_msg.o: afs_pam_msg.c afs_pam_msg.h afs_message.h
afs_message.o: afs_message.c afs_message.h
-afs_util.o: afs_util.c afs_util.h
#
# Misc. targets
*/
package PR_
+prefix S
statindex 8
#include "ptopcodes.h"
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/ptserver/ptprocs.c,v 1.1.1.8 2001/10/14 18:06:11 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/ptserver/ptprocs.c,v 1.1.1.9 2002/05/11 00:00:47 hartmans Exp $");
#include <afs/stds.h>
#include <ctype.h>
return 0;
}
-afs_int32 PR_INewEntry (call,aname,aid,oid)
+afs_int32 SPR_INewEntry (call,aname,aid,oid)
struct rx_call *call;
char aname[PR_MAXNAMELEN];
afs_int32 aid;
}
-afs_int32 PR_NewEntry (call, aname, flag, oid, aid)
+afs_int32 SPR_NewEntry (call, aname, flag, oid, aid)
struct rx_call *call;
char aname[PR_MAXNAMELEN];
afs_int32 flag;
if (code) ABORT_WITH(tt,code);
/* this is for cross-cell self registration. It is not added in the
- * PR_INewEntry because we want self-registration to only do
+ * SPR_INewEntry because we want self-registration to only do
* automatic id assignment.
*/
code = WhoIsThisWithName(call,tt,&cid,cname);
-afs_int32 PR_WhereIsIt (call,aid,apos)
+afs_int32 SPR_WhereIsIt (call,aid,apos)
struct rx_call *call;
afs_int32 aid;
afs_int32 *apos;
}
-afs_int32 PR_DumpEntry (call,apos, aentry)
+afs_int32 SPR_DumpEntry (call,apos, aentry)
struct rx_call *call;
afs_int32 apos;
struct prdebugentry *aentry;
return PRSUCCESS;
}
-afs_int32 PR_AddToGroup (call,aid,gid)
+afs_int32 SPR_AddToGroup (call,aid,gid)
struct rx_call *call;
afs_int32 aid;
afs_int32 gid;
return PRSUCCESS;
}
-afs_int32 PR_NameToID (call, aname, aid)
+afs_int32 SPR_NameToID (call, aname, aid)
struct rx_call *call;
namelist *aname;
idlist *aid;
}
/*
- * PR_IDToName
+ * SPR_IDToName
* Given an array of ids, find the name for each of them.
* The array of ids and names is unlimited.
*/
-afs_int32 PR_IDToName (call, aid, aname)
+afs_int32 SPR_IDToName (call, aid, aname)
struct rx_call *call;
idlist *aid;
namelist *aname;
if (size <= 0) size = 0;
aname->namelist_val = (prname *)malloc(size*PR_MAXNAMELEN);
aname->namelist_len = 0;
+ if (aname->namelist_val == 0) return PRNOMEM;
if (aid->idlist_len == 0) return 0;
if (size == 0) return PRTOOMANY; /* rxgen will probably handle this */
return PRSUCCESS;
}
-afs_int32 PR_Delete (call, aid)
+afs_int32 SPR_Delete (call, aid)
struct rx_call *call;
afs_int32 aid;
{
return PRSUCCESS;
}
-afs_int32 PR_UpdateEntry (call, aid, name, uentry)
+afs_int32 SPR_UpdateEntry (call, aid, name, uentry)
struct rx_call *call;
afs_int32 aid;
char *name;
return PRSUCCESS;
}
-afs_int32 PR_RemoveFromGroup (call,aid,gid)
+afs_int32 SPR_RemoveFromGroup (call,aid,gid)
struct rx_call *call;
afs_int32 aid;
afs_int32 gid;
}
-afs_int32 PR_GetCPS (call, aid, alist, over)
+afs_int32 SPR_GetCPS (call, aid, alist, over)
struct rx_call *call;
afs_int32 aid;
prlist *alist;
#endif /* IP_WILDCARDS */
-afs_int32 PR_GetCPS2 (call, aid, ahost, alist, over)
+afs_int32 SPR_GetCPS2 (call, aid, ahost, alist, over)
struct rx_call *call;
afs_int32 aid;
afs_int32 ahost;
}
-afs_int32 PR_GetHostCPS (call, ahost, alist, over)
+afs_int32 SPR_GetHostCPS (call, ahost, alist, over)
struct rx_call *call;
afs_int32 ahost;
prlist *alist;
}
-afs_int32 PR_ListMax (call,uid,gid)
+afs_int32 SPR_ListMax (call,uid,gid)
struct rx_call *call;
afs_int32 *uid;
afs_int32 *gid;
return PRSUCCESS;
}
-afs_int32 PR_SetMax (call,aid,gflag)
+afs_int32 SPR_SetMax (call,aid,gflag)
struct rx_call *call;
afs_int32 aid;
afs_int32 gflag;
return PRSUCCESS;
}
-afs_int32 PR_ListEntry (call,aid,aentry)
+afs_int32 SPR_ListEntry (call,aid,aentry)
struct rx_call *call;
afs_int32 aid;
struct prcheckentry *aentry;
return PRSUCCESS;
}
-afs_int32 PR_ListEntries(call, flag, startindex, bulkentries, nextstartindex)
+afs_int32 SPR_ListEntries(call, flag, startindex, bulkentries, nextstartindex)
struct rx_call *call;
afs_int32 flag;
afs_int32 startindex;
return 0;
}
-afs_int32 PR_ChangeEntry (call,aid,name,oid,newid)
+afs_int32 SPR_ChangeEntry (call,aid,name,oid,newid)
struct rx_call *call;
afs_int32 aid;
char *name;
return code;
}
-afs_int32 PR_SetFieldsEntry (call, id, mask, flags, ngroups, nusers, spare1, spare2)
+afs_int32 SPR_SetFieldsEntry (call, id, mask, flags, ngroups, nusers, spare1, spare2)
struct rx_call *call;
afs_int32 id;
afs_int32 mask; /* specify which fields to update */
return code;
}
-afs_int32 PR_ListElements (call, aid, alist, over)
+afs_int32 SPR_ListElements (call, aid, alist, over)
struct rx_call *call;
afs_int32 aid;
prlist *alist;
}
/*
- * PR_istOwned
+ * SPR_ListOwned
* List the entries owned by this id. If the id is zero,
* return the orphans list. This will return up to PR_MAXGROUPS
* at a time with the lastP available to get the rest. The
* maximum value is enforced in GetOwnedChain().
*/
-afs_int32 PR_ListOwned (call, aid, alist, lastP)
+afs_int32 SPR_ListOwned (call, aid, alist, lastP)
struct rx_call *call;
afs_int32 aid;
prlist *alist;
return code;
}
-afs_int32 PR_IsAMemberOf (call,uid,gid,flag)
+afs_int32 SPR_IsAMemberOf (call,uid,gid,flag)
struct rx_call *call;
afs_int32 uid;
afs_int32 gid;
#include <afsconfig.h>
#include "../afs/param.h"
-RCSID("$Header: /tmp/cvstemp/openafs/src/rx/SOLARIS/rx_knet.c,v 1.1.1.8 2002/01/28 00:30:31 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/rx/SOLARIS/rx_knet.c,v 1.1.1.9 2002/05/11 00:01:39 hartmans Exp $");
#ifdef AFS_SUN5_ENV
#include "../rx/rx_kcommon.h"
(struct sonode *, struct nmsghdr *, struct uio *) = NULL;
int (*sockfs_sosetsockopt)
(struct sonode *, int, int, void *, int) = NULL;
+int (*sockfs_sounbind)
+ (struct sonode *, int);
+void (*sockfs_sockfree)
+ (struct sonode *);
static afs_uint32 myNetAddrs[ADDRSPERSITE];
static int myNetMTUs[ADDRSPERSITE];
return NULL;
}
}
+ if (sockfs_sounbind == NULL) {
+ sockfs_sounbind = (int (*)())modlookup("sockfs", "sounbind");
+ if (sockfs_sounbind == NULL)
+ return NULL;
+ }
+ if (sockfs_sockfree == NULL) {
+ sockfs_sockfree = (void (*)())modlookup("sockfs", "sockfree");
+ if (sockfs_sockfree == NULL)
+ return NULL;
+ }
accessvp = sockfs_solookup(AF_INET, SOCK_DGRAM, 0, "/dev/udp", &error);
if (accessvp == NULL) {
kill(rxk_ListenerPid, SIGUSR1);
afs_osi_Sleep(&rxk_ListenerPid);
}
+
+ sockfs_sounbind(so, 0);
+ sockfs_sockfree(so);
return 0;
}
#include <afs/param.h>
#endif
-RCSID("$Header: /tmp/cvstemp/openafs/src/rx/rx_event.c,v 1.1.1.5 2001/09/11 14:34:16 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/rx/rx_event.c,v 1.1.1.6 2002/05/11 00:01:25 hartmans Exp $");
#ifdef KERNEL
#ifndef UKERNEL
{
register struct rxepoch *ep;
register struct rxevent *ev;
- struct clock now;
+ volatile struct clock now;
MUTEX_ENTER(&rxevent_lock);
#include <afsconfig.h>
#include "../afs/param.h"
-RCSID("$Header: /tmp/cvstemp/openafs/src/rx/rx_kcommon.c,v 1.1.1.10 2002/01/28 00:30:24 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/rx/rx_kcommon.c,v 1.1.1.11 2002/05/11 00:01:27 hartmans Exp $");
#include "../rx/rx_kcommon.h"
*/
int rxk_ListenerPid; /* Used to signal process to wakeup at shutdown */
-#ifdef AFS_SUN5_ENV
-/*
- * Run the listener as a kernel process.
- */
void rxk_Listener(void)
-{
- extern id_t syscid;
- void rxk_ListenerProc(void);
- if (newproc(rxk_ListenerProc, syscid, 59))
- osi_Panic("rxk_Listener: failed to fork listener process!\n");
-}
-
-void rxk_ListenerProc(void)
-#else /* AFS_SUN5_ENV */
-void rxk_Listener(void)
-#endif /* AFS_SUN5_ENV */
{
struct rx_packet *rxp = NULL;
int code;
#if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
rxk_ListenerPid = current_proc()->p_pid;
#endif
-#if defined(RX_ENABLE_LOCKS) && !defined(AFS_SUN5_ENV)
+#if defined(RX_ENABLE_LOCKS)
AFS_GUNLOCK();
-#endif /* RX_ENABLE_LOCKS && !AFS_SUN5_ENV */
+#endif /* RX_ENABLE_LOCKS */
while (afs_termState != AFSOP_STOP_RXK_LISTENER) {
if (rxp) {
#if defined(AFS_LINUX22_ENV) || defined(AFS_SUN5_ENV)
afs_osi_Wakeup(&rxk_ListenerPid);
#endif
-#ifdef AFS_SUN5_ENV
- AFS_GUNLOCK();
-#endif /* AFS_SUN5_ENV */
}
#if !defined(AFS_LINUX20_ENV) && !defined(AFS_SUN5_ENV) && !defined(AFS_DARWIN_ENV) && !defined(AFS_XBSD_ENV)
rxkad.h
rxkad_errs.c
sboxes.h
+fc_test
\ No newline at end of file
OBJS=rxkad_client.o rxkad_server.o rxkad_common.o ticket.o rxkad_errs.o \
fcrypt.o crypt_conn.o
-all: kinstall ukinstall ${TOP_LIBDIR}/librxkad.a ${TOP_INCDIR}/rx/rxkad.h
+fc_test_OBJS=fc_test.o
+
+fc_test_LIBS=\
+ ${TOP_LIBDIR}/librxkad.a \
+ ${TOP_LIBDIR}/librx.a \
+ ${TOP_LIBDIR}/liblwp.a \
+ ${TOP_LIBDIR}/libsys.a
+
+all: kinstall ukinstall ${TOP_LIBDIR}/librxkad.a fc_test \
+ ${TOP_INCDIR}/rx/rxkad.h
#
# Install targets
tcrypt.o: tcrypt.c AFS_component_version_number.o
+fc_test: ${fc_test_OBJS}
+ ${CC} ${CFLAGS} -o fc_test ${fc_test_OBJS} ${fc_test_LIBS} ${XLIBS}
+
+fc_test.o: ${INCLS}
+
#
# Misc. targets
#
clean:
$(RM) -f *.o *.a tcrypt core rxkad_errs.c rxkad.h \
AFS_component_version_number.c \
- crypt_conn.c fcrypt.c fcrypt.h sboxes.h
+ crypt_conn.c fcrypt.c fcrypt.h sboxes.h \
+ fc_test
test:
cd test; $(MAKE)
#include <afs/param.h>
#endif
-RCSID("$Header: /tmp/cvstemp/openafs/src/rxkad/rxkad_common.c,v 1.1.1.7 2001/10/14 18:06:36 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/rxkad/rxkad_common.c,v 1.1.1.8 2002/05/11 00:01:51 hartmans Exp $");
#ifdef KERNEL
#ifndef UKERNEL
#ifndef KERNEL
#define osi_Time() time(0)
#endif
-struct rxkad_stats rxkad_stats;
+struct rxkad_stats rxkad_stats = {0};
/* this call sets up an endpoint structure, leaving it in *network* byte
* order so that it can be used quickly for encryption.
blocks-new-file.c fsx.c afscp.c afscp_callback.c \
write-rand.c
-EXTRA_OBJS = err.o errx.o warn.o warnx.o
+EXTRA_OBJS = err.o errx.o warn.o warnx.o vwarn.o vwarnx.o verr.o verrx.o warnerr.o snprintf.o
OpenAFS/OS.pm: OpenAFS/OS-$(MKAFS_OSTYPE).pm
$(CP) OpenAFS/OS-$(MKAFS_OSTYPE).pm OpenAFS/OS.pm
+fsx: fsx.o $(EXTRA_OBJS)
+ $(CC) $(LDFLAGS) -o $@ fsx.o $(EXTRA_OBJS) $(LIBS)
+
write-rand: write-rand.o $(EXTRA_OBJS)
$(CC) $(LDFLAGS) -o $@ write-rand.o $(EXTRA_OBJS) $(LIBS)
# $(CC) -c $(CPPFLAGS) $(DEFS) -I$(srcdir) -I. $(REALCFLAGS) $<
afscp: afscp.o afscp_callback.o $(EXTRA_OBJS)
- $(CC) $(LDFLAGS) -o $@ afscp.o afscp_callback.o $(EXTRA_OBJS) $(INT_LIBS)
+ $(CC) $(LDFLAGS) -o $@ afscp.o afscp_callback.o $(EXTRA_OBJS) $(INT_LIBS) ${XLIBS}
hello-world: hello-world.in
sed -e "s!%CC%!$(CC)!" $(srcdir)/hello-world.in > $@
all: run-tests OpenAFS/OS.pm libxfiles.a libdumpscan.a $(TEST_PROGRAMS)\
afsdump_scan afsdump_dirlist afsdump_extract dumptool
+ @chmod +x run-tests
clean:
-rm -f xf_errs.c xf_errs.h dumpscan_errs.c dumpscan_errs.h *.o \
foreach $this (keys %ret) {
if ($this == 250) {
if ($ret{250} ne 3288840443) {
- exit(1);
+ if ($ret{250} ne 1530169307) {
+ exit(1);
+ }
}
}
}
#!/bin/sh
-# $Id: build-openafs,v 1.1 2002/01/22 19:54:40 hartmans Exp $
+# $Id: build-openafs,v 1.1.1.2 2002/05/11 00:02:11 hartmans Exp $
FS=${FS:-${objdir}/../appl/fs/fs}
${FS} sq . 0
test -f /usr/tmp/openafs-1.2.2-src.tar.gz && cp /usr/tmp/openafs-1.2.2-src.tar.gz openafs-1.2.2-src.tar.gz
test -f openafs-1.2.2-src.tar.gz || wget http://www.openafs.org/dl/1.2.2/openafs-1.2.2-src.tar.gz 2>&4
$SHELL $SHELLVERBOSE $srcdir/generic-build openafs-1.2.2-src.tar.gz openafs-1.2.2
-openafs-1.2.2/src/finale/translate_et 180480 >& /dev/null
+openafs-1.2.2/src/finale/translate_et 180480 >& 4
#ifdef VIOC_SETRXKCRYPT
int
-fs_setcrypt (u_int32_t n)
+fs_setcrypt (afs_uint32 n)
{
struct ViceIoctl a_params;
#ifdef VIOC_GETRXKCRYPT
int
-fs_getcrypt (u_int32_t *level)
+fs_getcrypt (afs_uint32 *level)
{
struct ViceIoctl a_params;
#ifdef VIOCCONNECTMODE
int
-fs_connect(int32_t type, int32_t *flags)
+fs_connect(afs_int32 type, afs_int32 *flags)
{
struct ViceIoctl a_params;
a_params.in_size = sizeof(type);
- a_params.out_size = sizeof (int32_t);
+ a_params.out_size = sizeof (afs_int32);
a_params.in = (char *) &type;
a_params.out = (char *) flags;
#ifdef VIOCGETCACHEPARAMS
int
-fs_getfilecachestats(u_int32_t *max_bytes,
- u_int32_t *used_bytes,
- u_int32_t *max_vnodes,
- u_int32_t *used_vnodes)
+fs_getfilecachestats(afs_uint32 *max_bytes,
+ afs_uint32 *used_bytes,
+ afs_uint32 *max_vnodes,
+ afs_uint32 *used_vnodes)
{
- u_int32_t parms[16];
+ afs_uint32 parms[16];
struct ViceIoctl a_params;
a_params.in_size = 0;
#ifdef VIOC_AVIATOR
int
-fs_getaviatorstats(u_int32_t *max_workers,
- u_int32_t *used_workers)
+fs_getaviatorstats(afs_uint32 *max_workers,
+ afs_uint32 *used_workers)
{
- u_int32_t parms[16];
+ afs_uint32 parms[16];
struct ViceIoctl a_params;
a_params.in_size = 0;
#ifdef VIOC_CALCULATE_CACHE
int
-fs_calculate_cache(u_int32_t *calculated,
- u_int32_t *usedbytes)
+fs_calculate_cache(afs_uint32 *calculated,
+ afs_uint32 *usedbytes)
{
- u_int32_t parms[16];
+ afs_uint32 parms[16];
struct ViceIoctl a_params;
a_params.in_size = 0;
{
struct ViceIoctl a_params;
- int32_t rinflags = inflags;
- int32_t routflags;
+ afs_int32 rinflags = inflags;
+ afs_int32 routflags;
if (inflags != -1) {
a_params.in_size = sizeof(rinflags);
*/
int
-fs_checkservers(char *cell, int32_t flags, u_int32_t *hosts, int numhosts)
+fs_checkservers(char *cell, afs_int32 flags, afs_uint32 *hosts, int numhosts)
{
struct ViceIoctl a_params;
char *in = NULL;
size_t insize;
if (cell != NULL) {
- insize = strlen(cell) + sizeof(int32_t) + 1;
+ insize = strlen(cell) + sizeof(afs_int32) + 1;
in = malloc (insize);
if (in == NULL)
errx (1, "malloc");
memcpy (in, &flags, sizeof(flags));
- memcpy (in + sizeof(int32_t), cell, strlen(cell));
- in[sizeof(int32_t) + strlen(cell)] = '\0';
+ memcpy (in + sizeof(afs_int32), cell, strlen(cell));
+ in[sizeof(afs_int32) + strlen(cell)] = '\0';
a_params.in_size = insize;
a_params.in = in;
a_params.in = (caddr_t )&flags;
}
- a_params.out_size = numhosts * sizeof(u_int32_t);
+ a_params.out_size = numhosts * sizeof(afs_uint32);
a_params.out = (caddr_t)hosts;
ret = 0;
fs_set_sysname (const char *sys)
{
struct ViceIoctl a_params;
- int32_t set = 1;
+ afs_int32 set = 1;
a_params.in_size = sizeof(set) + strlen(sys) + 1;
a_params.in = malloc(a_params.in_size);
fs_setcache(int lv, int hv, int lb, int hb)
{
struct ViceIoctl a_params;
- u_int32_t s[4];
+ afs_uint32 s[4];
s[0] = lv;
s[1] = hv;
s[2] = lb;
s[3] = hb;
- a_params.in_size = ((hv == 0) ? 1 : 4) * sizeof(u_int32_t);
+ a_params.in_size = ((hv == 0) ? 1 : 4) * sizeof(afs_uint32);
a_params.out_size = 0;
a_params.in = (void *)s;
a_params.out = NULL;
fs_venuslog (void)
{
struct ViceIoctl a_params;
- int32_t status = 0; /* XXX not really right, but anyway */
+ afs_int32 status = 0; /* XXX not really right, but anyway */
- a_params.in_size = sizeof(int32_t);
+ a_params.in_size = sizeof(afs_int32);
a_params.out_size = 0;
a_params.in = (caddr_t) &status;
a_params.out = NULL;
*/
int
-fs_getcellstatus (char *cellname, u_int32_t *flags)
+fs_getcellstatus (char *cellname, afs_uint32 *flags)
{
struct ViceIoctl a_params;
a_params.in_size = strlen (cellname) + 1;
- a_params.out_size = sizeof (u_int32_t);
+ a_params.out_size = sizeof (afs_uint32);
a_params.in = cellname;
a_params.out = (caddr_t) flags;
#include <sys/types.h>
#include <sys/stat.h>
-#if defined(_UWIN) || defined(__linux)
+#if defined(sun) || defined(_UWIN) || defined(__linux)
# include <sys/param.h>
# include <limits.h>
# include <time.h>
#include <unistd.h>
#include <stdarg.h>
#include <errno.h>
+#include <fcntl.h>
+
+#if !defined L_SET
+# define L_SET SEEK_SET
+#endif
+#if !defined L_INCR
+# define L_INCR SEEK_CUR
+#endif
+#if !defined L_XTND
+# define L_XTND SEEK_END
+#endif
#define NUMPRINTCOLUMNS 32 /* # columns of data to print on each line */
#include <sys/mman.h>
#include <sys/time.h>
#include <unistd.h>
-
+#include <fcntl.h>
#include <err.h>
use OpenAFS::Dirpath;
use OpenAFS::OS;
use OpenAFS::Auth;
+use File::Copy;
use Getopt::Long;
use vars qw($admin $server $cellname $cachesize $part
$shutdown_needed $csdb);
}
close MOUNT;
-unless ( -f "$openafsdirpath->{'afsconfdir'}/KeyFile") {
- print "You do not have an AFS keyfile. Please create this using asetkey from openafs-krb5 or
-the bos addkey command";
- exit(1);
-}
-
print "If the fileserver is not running, this may hang for 30 seconds.\n";
run("$openafsinitcmd->{'filesrv-stop'}");
$server = `hostname`;
unlink "$openafsdirpath->{'viceetcdir'}/CellServDB";
unlink "$openafsdirpath->{'viceetcdir'}/ThisCell";
+if ($cellname eq "this.thirty.nine.character.name.for.sed") {
+ copy("kaserver.DB0","$openafsdirpath->{'afsdbdir'}/kaserver.DB0");
+ copy("kaserver.DBSYS1","$openafsdirpath->{'afsdbdir'}/kaserver.DBSYS1");
+ copy("KeyFile","$openafsdirpath->{'afsconfdir'}/KeyFile");
+}
+
+unless ( -f "$openafsdirpath->{'afsconfdir'}/KeyFile") {
+ print "You do not have an AFS keyfile. Please create this using asetkey from openafs-krb5 or the bos addkey command";
+ exit(1);
+}
my $lcell = "${cellname}";
#let bosserver create symlinks
run("$openafsinitcmd->{'filesrv-start'}");
unwind("$openafsinitcmd->{'filesrv-stop'}");
+unwind("/bin/rm -f $openafsdirpath->{'afslocaldir'}/BosConfig");
$shutdown_needed = 1;
+
+open(THISCELL, ">$openafsdirpath->{'afsconfdir'}/ThisCell");
+print THISCELL $cellname;
+close THISCELL;
+open(THISCELL, ">$openafsdirpath->{'afsconfdir'}/CellServDB");
+print THISCELL ">$cellname #test cell";
+close THISCELL;
+
run ("$openafsdirpath->{'afssrvbindir'}/bos setcellname $server $lcell -localauth ||true");
run ("$openafsdirpath->{'afssrvbindir'}/bos addhost $server $server -localauth ||true");
run("$openafsdirpath->{'afssrvbindir'}/bos adduser $server $admin -localauth");
print PRDB "system:administrators 130/20 -204 -204 -204\n";
print PRDB" $admin 1\n";
close PRDB;
-unwind( "rm $openafsdirpath->{'afsdbdir'}/prdb* ");
+unwind( "rm $openafsdirpath->{'afsdbdir'}/prdb.DB* ");
# Start up ptserver and vlserver
run("$openafsdirpath->{'afssrvbindir'}/bos create $server ptserver simple $openafsdirpath->{'afssrvlibexecdir'}/ptserver -localauth");
unwind("$openafsdirpath->{'afssrvbindir'}/bos delete $server ptserver -localauth");
unwind("$openafsdirpath->{'afssrvbindir'}/bos stop $server ptserver -localauth -wait");
run("$openafsdirpath->{'afssrvbindir'}/bos create $server vlserver simple $openafsdirpath->{'afssrvlibexecdir'}/vlserver -localauth");
+unwind( "rm $openafsdirpath->{'afsdbdir'}/vldb.DB* ");
unwind("$openafsdirpath->{'afssrvbindir'}/bos delete $server vlserver -localauth");
unwind("$openafsdirpath->{'afssrvbindir'}/bos stop $server vlserver -localauth -wait");
+run("$openafsdirpath->{'afssrvbindir'}/bos create $server kaserver simple $openafsdirpath->{'afssrvlibexecdir'}/kaserver -localauth");
+unwind( "rm $openafsdirpath->{'afsdbdir'}/kaserver.DB* ");
+unwind("$openafsdirpath->{'afssrvbindir'}/bos delete $server kaserver -localauth");
+unwind("$openafsdirpath->{'afssrvbindir'}/bos stop $server kaserver -localauth -wait");
+
run( "$openafsdirpath->{'afssrvbindir'}/bos create $server fs fs ".
"-cmd $openafsdirpath->{'afssrvlibexecdir'}/fileserver ".
"-cmd $openafsdirpath->{'afssrvlibexecdir'}/volserver ".
print "done.\n";
# Past this point we want to control when bos shutdown happens
$shutdown_needed = 0;
+$part = "a" unless $part;
+
unwind( "$openafsdirpath->{'afssrvbindir'}/bos shutdown $server -localauth ");
-run("$openafsdirpath->{'afssrvsbindir'}/vos create $server a root.afs -localauth");
+run("$openafsdirpath->{'afssrvsbindir'}/vos create $server $part root.afs -localauth");
+unwind("$openafsdirpath->{'afssrvsbindir'}/vos remove $server $part root.afs -localauth");
+
# bring up client
$cachesize = $rl->readline("What size cache (in 1k blocks)? ") unless $cachesize;
run("$openafsinitcmd->{'client-forcestart'}");
my $afs_running = 0;
open(MOUNT, "mount |") or die "Failed to run mount: $!\n";
+ if(m:^AFS:) {
+ print "The AFS client is currently running on this workstation.\n";
+ print "Please restart this script after running $openafsinitcmd->{'client-stop'}\n";
+ exit(1);
+ }
while(<MOUNT>) {
-if(m:^AFS:) {
- $afs_running = 1;
+ if(m:^AFS:) {
+ $afs_running = 1;
+ }
+ if(m:^/afs on AFS:) {
+ $afs_running = 1;
+ }
}
- }
unless ($afs_running) {
print "*** The AFS client failed to start.\n";
print "Please fix whatever problem kept it from running.\n";
}
unwind("$openafsinitcmd->{'client-stop'}");
-$part = "a" unless $part;
-
&OpenAFS::Auth::authadmin();
run("$openafsdirpath->{'afssrvbindir'}/fs sa /afs system:anyuser rl");
#!/bin/sh
#
-# $Id: run-tests.in,v 1.1 2002/01/22 19:54:42 hartmans Exp $
+# $Id: run-tests.in,v 1.1.1.2 2002/05/11 00:02:31 hartmans Exp $
#
srcdir=@srcdir@
objdir=`pwd`
SHELL=/bin/sh
+SHELLVERBOSE=
VERSION=@VERSION@
PACKAGE=@PACKAGE@
host=@host@
RUNAS=nobody
FS=@afssrvbindir@/fs
export FS
+export SHELL
AFSROOT=${AFSROOT-/afs}
export AFSROOT
-help|--help) echo $usage;
echo "tests available: $linebreak"; for a in "$ALL_TESTS"; do echo $a ; done;
exit 0;;
- -version|--version) echo "$0 $Id: run-tests.in,v 1.1 2002/01/22 19:54:42 hartmans Exp $"; exit 0;;
+ -version|--version) echo "$0 $Id: run-tests.in,v 1.1.1.2 2002/05/11 00:02:31 hartmans Exp $"; exit 0;;
-*) echo "$0: Bad option $1"; echo $usage; exit 1;;
*) break;;
esac
#include <err.h>
#ifdef RCSID
-RCSID("$Id: write-rand.c,v 1.1 2002/01/22 19:54:43 hartmans Exp $");
+RCSID("$Id: write-rand.c,v 1.1.1.2 2002/05/11 00:02:38 hartmans Exp $");
#endif
static char *
main (int argc, char **argv)
{
const char *file;
- const size_t sz;
+ size_t sz;
char *random_buf;
char *read_buf1;
char *read_buf2;
#define ubik_GetRPCConn(astr,aindex) ((aindex) >= MAXSERVERS? 0 : (astr)->conns[aindex])
#define ubik_GetRPCHost(astr,aindex) ((aindex) >= MAXSERVERS? 0 : (astr)->hosts[aindex])
-/* ubik transaction id representation */
-struct ubik_tid {
- afs_int32 epoch; /* time this server started */
- afs_int32 counter; /* counter within epoch of transactions */
-};
-
-/* ubik version representation */
-struct ubik_version {
- afs_int32 epoch; /* time this server started */
- afs_int32 counter; /* counter within epoch of transactions */
-};
-
/* ubik header file structure */
struct ubik_hdr {
afs_int32 magic; /* magic number */
afs_int32 session;
};
-struct net_version {
+struct ubik_version {
afs_int32 epoch;
afs_int32 counter;
};
-struct net_tid {
+struct ubik_tid {
afs_int32 epoch;
afs_int32 counter;
};
afs_int32 lowestTime; /* time we last chose lowestHost */
afs_int32 syncHost; /* sync site we've heard from last (even if we didn't vote) */
afs_int32 syncTime; /* time of above */
- struct net_version syncVersion; /* sync site's claimed db version */
- struct net_tid syncTid; /* sync site's claimed tid */
+ struct ubik_version syncVersion; /* sync site's claimed db version */
+ struct ubik_tid syncTid; /* sync site's claimed tid */
/* variables from beacon module */
afs_int32 amSyncSite; /* do I think I'm the sync site */
/* variables from disk module */
afs_int32 lockedPages; /* count of read-locked pages */
afs_int32 writeLockedPages; /* count of write-locked pages */
- struct net_version localVersion;
+ struct ubik_version localVersion;
afs_int32 activeWrite; /* is there an active write transaction with this as sync site */
afs_int32 tidCounter; /* tid counter field from dbase, or 0 if no write trans. */
afs_int32 lastVoteTime; /* time last vote received */
afs_int32 lastBeaconSent; /* time last beacon sent */
afs_int32 lastVote; /* was last vote yes? */
- struct net_version remoteVersion;
+ struct ubik_version remoteVersion;
afs_int32 currentDB; /* is current DB up to date? */
afs_int32 beaconSinceDown; /* beacon sent since last noticed up? */
afs_int32 up; /* is site up */
afs_int32 lowestTime; /* time we last chose lowestHost */
afs_int32 syncHost; /* sync site we've heard from last (even if we didn't vote) */
afs_int32 syncTime; /* time of above */
- struct net_version syncVersion; /* sync site's claimed db version */
- struct net_tid syncTid; /* sync site's claimed tid */
+ struct ubik_version syncVersion; /* sync site's claimed db version */
+ struct ubik_tid syncTid; /* sync site's claimed tid */
/* variables from beacon module */
afs_int32 amSyncSite; /* do I think I'm the sync site */
/* variables from disk module */
afs_int32 lockedPages; /* count of read-locked pages */
afs_int32 writeLockedPages; /* count of write-locked pages */
- struct net_version localVersion;
+ struct ubik_version localVersion;
afs_int32 activeWrite; /* is there an active write transaction with this as sync site */
afs_int32 tidCounter; /* tid counter field from dbase, or 0 if no write trans. */
afs_int32 lastVoteTime; /* time last vote received */
afs_int32 lastBeaconSent; /* time last beacon sent */
afs_int32 lastVote; /* was last vote yes? */
- struct net_version remoteVersion;
+ struct ubik_version remoteVersion;
afs_int32 currentDB; /* is current DB up to date? */
afs_int32 beaconSinceDown; /* beacon sent since last noticed up? */
afs_int32 up; /* is site up */
/* Vote package interface calls */
Beacon (IN afs_int32 state,
afs_int32 voteStart,
- net_version *Version,
- net_tid *tid) multi = VOTE_BEACON;
+ ubik_version *Version,
+ ubik_tid *tid) multi = VOTE_BEACON;
DebugOld (OUT ubik_debug_old *db) = VOTE_DEBUG_OLD;
#define DISK_COMMIT 20001
#define DISK_LOCK 20002
#define DISK_WRITE 20003
-#define DISK_GETVERSION 20004
+#define DISK_GETVERSION 20004
#define DISK_GETFILE 20005
#define DISK_SENDFILE 20006
#define DISK_ABORT 20007
#define DISK_RELEASELOCKS 20008
-#define DISK_TRUNCATE 20009
+#define DISK_TRUNCATE 20009
#define DISK_PROBE 20010
#define DISK_WRITEV 20011
#define DISK_INTERFACEADDR 20012
/* Disk package interface calls - the order of
* these declarations is important.
*/
-Begin (IN net_tid *tid) = DISK_BEGIN;
+Begin (IN ubik_tid *tid) = DISK_BEGIN;
-Commit (IN net_tid *tid) = DISK_COMMIT;
+Commit (IN ubik_tid *tid) = DISK_COMMIT;
-Lock (IN net_tid *tid,
+Lock (IN ubik_tid *tid,
afs_int32 file,
afs_int32 position,
afs_int32 length,
afs_int32 type) = DISK_LOCK;
-Write (IN net_tid *tid,
+Write (IN ubik_tid *tid,
afs_int32 file,
afs_int32 position,
bulkdata *data) = DISK_WRITE;
-GetVersion (OUT net_version *Version) = DISK_GETVERSION;
+GetVersion (OUT ubik_version *Version) = DISK_GETVERSION;
GetFile (IN afs_int32 file,
- OUT net_version *Version) split = DISK_GETFILE;
+ OUT ubik_version *Version) split = DISK_GETFILE;
SendFile (IN afs_int32 file,
afs_int32 length,
- net_version *Version) split = DISK_SENDFILE ;
+ ubik_version *Version) split = DISK_SENDFILE ;
-Abort (IN net_tid *tid) = DISK_ABORT;
+Abort (IN ubik_tid *tid) = DISK_ABORT;
-ReleaseLocks (IN net_tid *tid) = DISK_RELEASELOCKS;
+ReleaseLocks (IN ubik_tid *tid) = DISK_RELEASELOCKS;
-Truncate (IN net_tid *tid,
+Truncate (IN ubik_tid *tid,
afs_int32 file,
afs_int32 length) = DISK_TRUNCATE;
Probe () multi = DISK_PROBE;
-WriteV (IN net_tid *tid,
+WriteV (IN ubik_tid *tid,
iovec_wrt *io_vector,
iovec_buf *io_buffer) = DISK_WRITEV;
UpdateInterfaceAddr(IN UbikInterfaceAddr* inAddr,
OUT UbikInterfaceAddr* outAddr) multi = DISK_INTERFACEADDR;
-SetVersion (IN net_tid *tid,
- IN net_version *OldVersion,
- IN net_version *NewVersion) = DISK_SETVERSION;
+SetVersion (IN ubik_tid *tid,
+ IN ubik_version *OldVersion,
+ IN ubik_version *NewVersion) = DISK_SETVERSION;
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/ubik/utst_server.c,v 1.1.1.5 2001/10/14 18:06:48 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/ubik/utst_server.c,v 1.1.1.6 2002/05/11 00:02:50 hartmans Exp $");
#include <afs/stds.h>
#include <sys/types.h>
struct ubik_dbase *dbase;
afs_int32 sleepTime;
-SAMPLE_Inc(rxcall)
-struct rx_call *rxcall;
+SAMPLE_Inc(rxconn)
+struct rx_connection *rxconn;
{
afs_int32 code, temp;
struct ubik_trans *tt;
}
-SAMPLE_Get(rxcall, gnumber)
-struct rx_call *rxcall;
+SAMPLE_Get(rxconn, gnumber)
+struct rx_connection *rxconn;
afs_int32 *gnumber;
{
afs_int32 code, temp;
}
-SAMPLE_QGet(rxcall, gnumber)
-struct rx_call *rxcall;
+SAMPLE_QGet(rxconn, gnumber)
+struct rx_connection *rxconn;
afs_int32 *gnumber;
{
afs_int32 code, temp;
}
-SAMPLE_Trun(rxcall)
-struct rx_call *rxcall;
+SAMPLE_Trun(rxconn)
+struct rx_connection *rxconn;
{
afs_int32 code;
struct ubik_trans *tt;
}
-SAMPLE_Test(rxcall)
-struct rx_call *rxcall;
+SAMPLE_Test(rxconn)
+struct rx_connection *rxconn;
{
afs_int32 code, temp;
struct ubik_trans *tt;
AFS_component_version_number.c
+livesys
Makefile
cmdebug
fs
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/vfsck/pass1.c,v 1.1.1.4 2001/09/11 14:35:28 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/vfsck/pass1.c,v 1.1.1.5 2002/05/11 00:03:19 hartmans Exp $");
#define VICE
#include <sys/param.h>
static daddr_t badblk;
static daddr_t dupblk;
int pass1check();
-
+static int oldreported;
+
pass1()
{
register int c, i, j;
#if defined(AFS_SUN56_ENV)
if ( OLDVICEINODE )
{
- /* This looks like a sol 2.5 AFS inode */
- printf("This vicep partition seems to contain pre Sol2.6 AFS inodes\n");
- printf("You should run the AFS file conversion utility before installing Sol 2.6\n");
- exit(100); /* unique return code? */
+ if (yflag) {
+ if (!oldreported) {
+ printf("This vicep partition seems to contain pre Sol2.6 AFS inodes\n");
+ printf("You should run the AFS file conversion utility before installing Sol 2.6\n");
+ printf("Continuing anyway.\n");
+ oldreported++;
+ }
+ } else {
+ /* This looks like a sol 2.5 AFS inode */
+ printf("This vicep partition seems to contain pre Sol2.6 AFS inodes\n");
+ printf("You should run the AFS file conversion utility before installing Sol 2.6\n");
+ exit(100); /* unique return code? */
+ }
}
#endif
statemap[inumber] =
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/viced/callback.c,v 1.1.1.7 2001/10/14 18:07:13 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/viced/callback.c,v 1.1.1.8 2002/05/11 00:03:26 hartmans Exp $");
#include <stdio.h>
#include <stdlib.h> /* for malloc() */
cbstuff.GSS4++;
if ( ! ClearHostCallbacks_r(hp, 0 /* not locked or held */) )
return;
+ hp1 = hp;
} else {
hp1 = hostp;
cbstuff.GSS1++;
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/viced/host.c,v 1.1.1.8 2002/01/22 19:55:12 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/viced/host.c,v 1.1.1.9 2002/05/11 00:03:28 hartmans Exp $");
#include <stdio.h>
#include <errno.h>
afs_int32 haddr;
afs_int32 hport;
int i, j, count;
+ char hoststr[16], hoststr2[16];
haddr = rxr_HostOf(tcon);
hport = rxr_PortOf(tcon);
/* Another thread is doing initialization */
h_Unlock_r(host);
if ( !held) h_Release_r(host);
- ViceLog(125, ("Host %x starting h_Lookup again\n", host));
+ ViceLog(125, ("Host %s:%d starting h_Lookup again\n",
+ afs_inet_ntoa_r(host->host, hoststr), host->port));
goto retry;
}
host->hostFlags &= ~ALTADDR;
* that we maintain some extra callback state information */
if (host->interface) {
ViceLog(0,
- ("Host %x used to support WhoAreYou, deleting.\n",
- host));
+ ("Host %s:%d used to support WhoAreYou, deleting.\n",
+ afs_inet_ntoa_r(host->host, hoststr), host->port));
host->hostFlags |= HOSTDELETED;
h_Unlock_r(host);
if (!held) h_Release_r(host);
if ( !host->interface
|| !afs_uuid_equal(&interf.uuid, &host->interface->uuid) ) {
ViceLog(25,
- ("Host %x has changed its identity, deleting.\n",
- host));
+ ("Host %s:%d has changed its identity, deleting.\n",
+ afs_inet_ntoa_r(host->host, hoststr), host->port));
host->hostFlags |= HOSTDELETED;
h_Unlock_r(host);
if (!held) h_Release_r(host);
goto retry;
}
} else {
- char hoststr[16];
afs_inet_ntoa_r(host->host, hoststr);
ViceLog(0,("CB: WhoAreYou failed for %s:%d, error %d\n",
hoststr, ntohs(host->port), code));
if ( ! (host->hostFlags & ALTADDR) )
{
/* another thread is doing the initialisation */
- ViceLog(125, ("Host %x waiting for host-init to complete\n",
- host));
+ ViceLog(125, ("Host %s:%d waiting for host-init to complete\n",
+ afs_inet_ntoa_r(host->host, hoststr), host->port));
h_Lock_r(host);
h_Unlock_r(host);
if ( !held) h_Release_r(host);
- ViceLog(125, ("Host %x starting h_Lookup again\n", host));
+ ViceLog(125, ("Host %s:%d starting h_Lookup again\n",
+ afs_inet_ntoa_r(host->host, hoststr), host->port));
goto retry;
}
/* We need to check whether the identity in the host structure
host->hostFlags |= HOSTDELETED;
h_Unlock_r(host);
if (!held) h_Release_r(host);
- ViceLog(0,("CB: new identity for host %x, deleting\n",
- host->host));
+ ViceLog(0, ("CB: new identity for host %s:%d, deleting\n",
+ afs_inet_ntoa_r(host->host, hoststr), host->port));
goto retry;
}
} else {
identP->valid = 0;
rx_SetSpecific(tcon, rxcon_ident_key, identP);
ViceLog(25,
- ("Host %x does not support WhoAreYou.\n",
- host->host));
+ ("Host %s:%d does not support WhoAreYou.\n",
+ afs_inet_ntoa_r(host->host, hoststr), host->port));
code = 0;
} else if (code == 0) {
interfValid = 1;
identP->valid = 1;
identP->uuid = interf.uuid;
rx_SetSpecific(tcon, rxcon_ident_key, identP);
- ViceLog(25,("WhoAreYou success on %x\n", host->host));
+ ViceLog(25, ("WhoAreYou success on %s:%d\n",
+ afs_inet_ntoa_r(host->host, hoststr), host->port));
}
}
if (code == 0 && !identP->valid) {
if (!(held = h_Held_r(oldHost)))
h_Hold_r(oldHost);
h_Lock_r(oldHost);
- ViceLog(25,("CB: new addr %x for old host %x\n",
- host->host, oldHost->host));
+ ViceLog(25, ("CB: new addr %s:%d for old host %s:%d\n",
+ afs_inet_ntoa_r(host->host, hoststr), host->port,
+ afs_inet_ntoa_r(oldHost->host, hoststr2), oldHost->port));
host->hostFlags |= HOSTDELETED;
h_Unlock_r(host);
h_Release_r(host);
&FS_HostUUID);
H_LOCK
if (code == 0) {
- ViceLog(25,("InitCallBackState3 success on %x\n",
- host->host));
+ ViceLog(25, ("InitCallBackState3 success on %s:%d\n",
+ afs_inet_ntoa_r(host->host, hoststr), host->port));
assert(interfValid == 1);
initInterfaceAddr_r(host, &interf);
}
}
}
if (code) {
- char hoststr[16];
afs_inet_ntoa_r(host->host, hoststr);
ViceLog(0,("CB: RCallBackConnectBack failed for %s:%d\n",
hoststr, ntohs(host->port)));
code = pr_GetCPS(viceid, &client->CPS);
H_LOCK
if (code) {
- ViceLog(0, ("pr_GetCPS failed(%d) for user %d, host %x.%d\n",
- code, viceid, client->host->host, ntohs(client->host->port)));
+ char hoststr[16];
+ ViceLog(0, ("pr_GetCPS failed(%d) for user %d, host %s:%d\n",
+ code, viceid,
+ afs_inet_ntoa_r(client->host->host, hoststr),
+ client->host->port));
/* Although ubik_Call (called by pr_GetCPS) traverses thru
* all protection servers and reevaluates things if no
assert(client && client->tcon && rxr_CidOf(client->tcon) == client->sid);
if (client &&
client->LastCall > client->expTime && client->expTime) {
- ViceLog(1, ("Token for %s at %x.%d expired %d\n",
- h_UserName(client), client->host->host, client->host->port, client->expTime));
+ char hoststr[16];
+ ViceLog(1, ("Token for %s at %s:%d expired %d\n",
+ h_UserName(client),
+ afs_inet_ntoa_r(client->host->host, hoststr),
+ client->host->port, client->expTime));
H_UNLOCK
return VICETOKENDEAD;
}
int i;
char tmpStr[256];
char tbuffer[32];
+ char hoststr[16];
H_LOCK
if (host->hostFlags & HOSTDELETED) {
H_UNLOCK
return held;
}
- sprintf(tmpStr,"Host %x.%d down = %d, LastCall %s", host->host,
- host->port, (host->hostFlags & VENUSDOWN),
+ sprintf(tmpStr,"Host %s:%d down = %d, LastCall %s",
+ afs_inet_ntoa_r(host->host, hoststr), host->port,
+ (host->hostFlags & VENUSDOWN),
afs_ctime((time_t *)&host->LastCall, tbuffer, sizeof(tbuffer)));
STREAM_WRITE(tmpStr, strlen(tmpStr), 1, file);
for (client = host->FirstClient; client; client=client->next) {
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/viced/physio.c,v 1.1.1.5 2001/09/11 14:35:35 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/viced/physio.c,v 1.1.1.6 2002/05/11 00:03:29 hartmans Exp $");
#include <stdio.h>
#include <errno.h>
if (fdP == NULL) {
code = errno;
ViceLog (0,
- ("ReallyRead(): open failed device %X inode %X errno %d\n",
+ ("ReallyRead(): open failed device %X inode %s errno %d\n",
file->dirh_handle->ih_dev,
PrintInode(NULL, file->dirh_handle->ih_ino), code));
return code;
if (FDH_SEEK(fdP, block * PAGESIZE, SEEK_SET) < 0) {
code = errno;
ViceLog (0,
- ("ReallyRead(): lseek failed device %X inode %X errno %d\n",
+ ("ReallyRead(): lseek failed device %X inode %s errno %d\n",
file->dirh_handle->ih_dev,
PrintInode(NULL, file->dirh_handle->ih_ino), code));
FDH_REALLYCLOSE(fdP);
else
code = EIO;
ViceLog (0,
- ("ReallyRead(): read failed device %X inode %X errno %d\n",
+ ("ReallyRead(): read failed device %X inode %s errno %d\n",
file->dirh_handle->ih_dev,
PrintInode(NULL, file->dirh_handle->ih_ino), code));
FDH_REALLYCLOSE(fdP);
fdP = IH_OPEN(file->dirh_handle);
if (fdP == NULL) {
ViceLog (0,
- ("ReallyWrite(): open failed device %X inode %X errno %d\n",
+ ("ReallyWrite(): open failed device %X inode %s errno %d\n",
file->dirh_handle->ih_dev,
PrintInode(NULL, file->dirh_handle->ih_ino), errno));
lpErrno = errno;
}
if (FDH_SEEK(fdP, block * PAGESIZE, SEEK_SET) < 0) {
ViceLog (0,
- ("ReallyWrite(): lseek failed device %X inode %X errno %d\n",
+ ("ReallyWrite(): lseek failed device %X inode %s errno %d\n",
file->dirh_handle->ih_dev,
PrintInode(NULL, file->dirh_handle->ih_ino), errno));
lpErrno = errno;
}
if ((count = FDH_WRITE(fdP, data, PAGESIZE)) != PAGESIZE) {
ViceLog (0,
- ("ReallyWrite(): write failed device %X inode %X errno %d\n",
+ ("ReallyWrite(): write failed device %X inode %s errno %d\n",
file->dirh_handle->ih_dev,
PrintInode(NULL, file->dirh_handle->ih_ino), errno));
lpCount = count;
*/
package VL_
+prefix S
statindex 15
#include "vl_opcodes.h"
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/vlserver/vlprocs.c,v 1.1.1.7 2001/10/14 18:07:17 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/vlserver/vlprocs.c,v 1.1.1.8 2002/05/11 00:03:34 hartmans Exp $");
#include <sys/types.h>
#include <stdio.h>
/* Create a new vldb entry; both new volume id and name must be unique (non-existant in vldb). */
-VL_CreateEntry(rxcall, newentry)
+SVL_CreateEntry(rxcall, newentry)
struct rx_call *rxcall;
struct vldbentry *newentry;
{ struct ubik_trans *trans;
}
-VL_CreateEntryN(rxcall, newentry)
+SVL_CreateEntryN(rxcall, newentry)
struct rx_call *rxcall;
struct nvldbentry *newentry;
{ struct ubik_trans *trans;
}
-VL_ChangeAddr(rxcall, ip1, ip2)
+SVL_ChangeAddr(rxcall, ip1, ip2)
struct rx_call *rxcall;
afs_int32 ip1, ip2;
{ struct ubik_trans *trans;
}
/* Delete a vldb entry given the volume id. */
-VL_DeleteEntry(rxcall, volid, voltype)
+SVL_DeleteEntry(rxcall, volid, voltype)
struct rx_call *rxcall;
afs_int32 volid;
afs_int32 voltype;
return(ubik_EndTrans(trans));
}
-VL_GetEntryByID (rxcall, volid, voltype, aentry)
+SVL_GetEntryByID (rxcall, volid, voltype, aentry)
struct rx_call *rxcall;
afs_int32 volid, voltype;
vldbentry *aentry; /* entry data copied here */
return (GetEntryByID(rxcall, volid, voltype, (char *)aentry, 0, this_op));
}
-VL_GetEntryByIDN (rxcall, volid, voltype, aentry)
+SVL_GetEntryByIDN (rxcall, volid, voltype, aentry)
struct rx_call *rxcall;
afs_int32 volid, voltype;
nvldbentry *aentry; /* entry data copied here */
return (GetEntryByID(rxcall, volid, voltype, (char *)aentry, 1, this_op));
}
-VL_GetEntryByIDU (rxcall, volid, voltype, aentry)
+SVL_GetEntryByIDU (rxcall, volid, voltype, aentry)
struct rx_call *rxcall;
afs_int32 volid, voltype;
uvldbentry *aentry; /* entry data copied here */
return(ubik_EndTrans(trans));
}
-VL_GetEntryByNameO (rxcall, volname, aentry)
+SVL_GetEntryByNameO (rxcall, volname, aentry)
struct rx_call *rxcall;
char *volname;
struct vldbentry *aentry; /* entry data copied here */
}
-VL_GetEntryByNameN (rxcall, volname, aentry)
+SVL_GetEntryByNameN (rxcall, volname, aentry)
struct rx_call *rxcall;
char *volname;
struct nvldbentry *aentry; /* entry data copied here */
return (GetEntryByName(rxcall, volname, (char *)aentry, 1, this_op));
}
-VL_GetEntryByNameU (rxcall, volname, aentry)
+SVL_GetEntryByNameU (rxcall, volname, aentry)
struct rx_call *rxcall;
char *volname;
struct uvldbentry *aentry; /* entry data copied here */
/* Get the current value of the maximum volume id and bump the volume id counter by Maxvolidbump. */
-VL_GetNewVolumeId (rxcall, Maxvolidbump, newvolumeid)
+SVL_GetNewVolumeId (rxcall, Maxvolidbump, newvolumeid)
struct rx_call *rxcall;
afs_int32 Maxvolidbump;
afs_int32 *newvolumeid;
* newentry. No individual checking/updating per field (alike
* VLUpdateEntry) is done. */
-VL_ReplaceEntry (rxcall, volid, voltype, newentry, releasetype)
+SVL_ReplaceEntry (rxcall, volid, voltype, newentry, releasetype)
struct rx_call *rxcall;
afs_int32 volid;
afs_int32 voltype;
return errorcode;
}
-VL_ReplaceEntryN (rxcall, volid, voltype, newentry, releasetype)
+SVL_ReplaceEntryN (rxcall, volid, voltype, newentry, releasetype)
struct rx_call *rxcall;
afs_int32 volid;
afs_int32 voltype;
/* Update a vldb entry (accessed thru its volume id). Almost all of the entry's fields can be modified in a single call by setting the appropriate bits in the Mask field in VldbUpdateentry. */
/* this routine may never have been tested; use replace entry instead unless you're brave */
-VL_UpdateEntry (rxcall, volid, voltype, updateentry, releasetype)
+SVL_UpdateEntry (rxcall, volid, voltype, updateentry, releasetype)
struct rx_call *rxcall;
afs_int32 volid;
afs_int32 voltype;
}
-VL_UpdateEntryByName (rxcall, volname, updateentry, releasetype)
+SVL_UpdateEntryByName (rxcall, volname, updateentry, releasetype)
struct rx_call *rxcall;
char *volname;
afs_int32 releasetype;
/* Set a lock to the vldb entry for volid (of type voltype if not -1). */
-VL_SetLock (rxcall, volid, voltype, voloper)
+SVL_SetLock (rxcall, volid, voltype, voloper)
struct rx_call *rxcall;
afs_int32 volid;
afs_int32 voltype;
* fields (afsid and/or volume operation) will be cleared along with
* the lock time stamp. */
-VL_ReleaseLock (rxcall, volid, voltype, releasetype)
+SVL_ReleaseLock (rxcall, volid, voltype, releasetype)
struct rx_call *rxcall;
afs_int32 volid;
afs_int32 voltype;
/* ListEntry returns a single vldb entry, aentry, with offset previous_index; the remaining parameters (i.e. next_index) are used so that sequential calls to this routine will get the next (all) vldb entries. */
-VL_ListEntry (rxcall, previous_index, count, next_index, aentry)
+SVL_ListEntry (rxcall, previous_index, count, next_index, aentry)
struct rx_call *rxcall;
afs_int32 previous_index;
afs_int32 *count;
}
/* ListEntry returns a single vldb entry, aentry, with offset previous_index; the remaining parameters (i.e. next_index) are used so that sequential calls to this routine will get the next (all) vldb entries. */
-VL_ListEntryN (rxcall, previous_index, count, next_index, aentry)
+SVL_ListEntryN (rxcall, previous_index, count, next_index, aentry)
struct rx_call *rxcall;
afs_int32 previous_index;
afs_int32 *count;
/* Retrieves in vldbentries all vldb entries that match the specified attributes (by server number, partition, volume type, and flag); if volume id is specified then the associated list for that entry is returned. CAUTION: This could be a very expensive call since in most cases sequential search of all vldb entries is performed. */
-VL_ListAttributes(rxcall, attributes, nentries, vldbentries)
+SVL_ListAttributes(rxcall, attributes, nentries, vldbentries)
struct rx_call *rxcall;
struct VldbListByAttributes *attributes;
afs_int32 *nentries;
return(ubik_EndTrans(trans));
}
-VL_ListAttributesN(rxcall, attributes, nentries, vldbentries)
+SVL_ListAttributesN(rxcall, attributes, nentries, vldbentries)
struct rx_call *rxcall;
struct VldbListByAttributes *attributes;
afs_int32 *nentries;
}
-VL_ListAttributesN2(rxcall, attributes, name, startindex, nentries, vldbentries, nextstartindex)
+SVL_ListAttributesN2(rxcall, attributes, name, startindex, nentries, vldbentries, nextstartindex)
struct rx_call *rxcall;
struct VldbListByAttributes *attributes;
char * name; /* Wildcarded volume name */
* returned. CAUTION: This could be a very expensive call since in most
* cases sequential search of all vldb entries is performed.
*/
-VL_LinkedList(rxcall, attributes, nentries, vldbentries)
+SVL_LinkedList(rxcall, attributes, nentries, vldbentries)
struct rx_call *rxcall;
struct VldbListByAttributes *attributes;
afs_int32 *nentries;
return(ubik_EndTrans(trans));
}
-VL_LinkedListN(rxcall, attributes, nentries, vldbentries)
+SVL_LinkedListN(rxcall, attributes, nentries, vldbentries)
struct rx_call *rxcall;
struct VldbListByAttributes *attributes;
afs_int32 *nentries;
}
/* Get back vldb header statistics (allocs, frees, maxvolumeid, totalentries, etc) and dynamic statistics (number of requests and/or aborts per remote procedure call, etc) */
-VL_GetStats(rxcall, stats, vital_header)
+SVL_GetStats(rxcall, stats, vital_header)
struct rx_call *rxcall;
vldstats *stats;
vital_vlheader *vital_header;
* easy to do. In the future, it might require a little bit of grunging
* through the VLDB, but that's life.
*/
-VL_GetAddrs(rxcall, Handle, spare2, spare3, nentries, addrsp)
+SVL_GetAddrs(rxcall, Handle, spare2, spare3, nentries, addrsp)
struct rx_call *rxcall;
afs_int32 Handle, spare2;
struct VLCallBack *spare3;
#define PADDR(addr) printf("%d.%d.%d.%d", (addr>>24)&0xff, (addr>>16)&0xff, (addr>>8) &0xff, addr&0xff);
-VL_RegisterAddrs(rxcall, uuidp, spare1, addrsp)
+SVL_RegisterAddrs(rxcall, uuidp, spare1, addrsp)
struct rx_call *rxcall;
afsUUID *uuidp;
afs_int32 spare1;
return(ubik_EndTrans(trans));
}
-VL_GetAddrsU(rxcall, attributes, uuidpo, uniquifier, nentries, addrsp)
+SVL_GetAddrsU(rxcall, attributes, uuidpo, uniquifier, nentries, addrsp)
struct rx_call *rxcall;
struct ListAddrByAttributes *attributes;
afsUUID *uuidpo;
}
/* see if the vlserver is back yet */
-VL_ProbeServer(rxcall)
+SVL_ProbeServer(rxcall)
struct rx_call *rxcall; {
return 0;
}
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/vlserver/vlserver.c,v 1.1.1.9 2001/09/11 14:35:40 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/vlserver/vlserver.c,v 1.1.1.10 2002/05/11 00:03:35 hartmans Exp $");
#include <afs/stds.h>
#include <sys/types.h>
exit(2);
}
if (!rxJumbograms) {
- rx_maxReceiveSize = OLD_MAX_PACKET_SIZE;
- rxi_nSendFrags = rxi_nRecvFrags = 1;
+ rx_SetNoJumbo();
}
rx_SetRxDeadTime(50);
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/vol/ihandle.c,v 1.1.1.5 2001/10/14 18:07:22 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/vol/ihandle.c,v 1.1.1.6 2002/05/11 00:03:40 hartmans Exp $");
#include <stdio.h>
#include <sys/types.h>
#include <sys/file.h>
#include <unistd.h>
#include <sys/stat.h>
-#ifdef AFS_SUN5_ENV
+#if defined(AFS_SUN5_ENV) || defined(AFS_NBSD_ENV)
#include <sys/fcntl.h>
#include <sys/resource.h>
#endif
/* Initialize the file descriptor cache */
void ih_Initialize() {
int i;
-#ifdef AFS_SUN5_ENV
- struct rlimit rlim;
-#endif /* AFS_SUN5_ENV */
assert(!ih_Inited);
ih_Inited = 1;
DLL_INIT_LIST(ihAvailHead, ihAvailTail);
}
#if defined(AFS_NT40_ENV)
fdMaxCacheSize = FD_MAX_CACHESIZE;
-#elif defined(AFS_SUN5_ENV)
- assert(getrlimit(RLIMIT_NOFILE, &rlim) == 0);
- rlim.rlim_cur = rlim.rlim_max;
- assert(setrlimit(RLIMIT_NOFILE, &rlim) == 0);
- fdMaxCacheSize = rlim.rlim_cur-FD_HANDLE_SETASIDE;
- fdMaxCacheSize = MIN(fdMaxCacheSize, FD_MAX_CACHESIZE);
- assert(fdMaxCacheSize > 0);
+#elif defined(AFS_SUN5_ENV) || defined(AFS_NBSD_ENV)
+ {
+ struct rlimit rlim;
+ assert(getrlimit(RLIMIT_NOFILE, &rlim) == 0);
+ rlim.rlim_cur = rlim.rlim_max;
+ assert(setrlimit(RLIMIT_NOFILE, &rlim) == 0);
+ fdMaxCacheSize = rlim.rlim_cur-FD_HANDLE_SETASIDE;
+#ifdef AFS_NBSD_ENV
+ /* XXX this is to avoid using up all system fd netbsd is
+ * somewhat broken and have set maximum fd for a root process
+ * to the same as system fd that is avaible, so if the
+ * fileserver uses all up process fds, all system fd will be
+ * used up too !
+ *
+ * Check for this better
+ */
+ fdMaxCacheSize /= 4;
+#endif
+ fdMaxCacheSize = MIN(fdMaxCacheSize, FD_MAX_CACHESIZE);
+ assert(fdMaxCacheSize > 0);
+ }
#elif defined(AFS_HPUX_ENV)
/* Avoid problems with "UFSOpen: igetinode failed" panics on HPUX 11.0 */
fdMaxCacheSize = 0;
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/vol/vol-salvage.c,v 1.1.1.9 2001/10/14 18:07:25 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/vol/vol-salvage.c,v 1.1.1.10 2002/05/11 00:03:47 hartmans Exp $");
#include <stdlib.h>
#include <stdio.h>
if (check) {
if (!Showmode) {
Log("Vnode %d: inode number incorrect (is %s should be %s). FileSize=%d\n",
+ vnodeNumber,
PrintInode(stmp1, VNDISK_GET_INO(vnode)),
PrintInode(stmp2, ip->inodeNumber),
ip->byteCount);
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/xstat/xstat_fs_callback.c,v 1.1.1.4 2001/07/14 22:25:17 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/xstat/xstat_fs_callback.c,v 1.1.1.5 2002/05/11 00:04:10 hartmans Exp $");
#include <errno.h>
#include <stdio.h> /*Standard I/O stuff*/
struct rx_call *a_call,
afs_int32 a_index,
char **a_name,
- afs_int32 *a_hosts)
+ serverList *a_hosts)
{
return RXGEN_OPCODE;
}