summaryrefslogtreecommitdiffstats
path: root/freebsd/lib/libc/rpc/svc_auth_des.c
diff options
context:
space:
mode:
Diffstat (limited to 'freebsd/lib/libc/rpc/svc_auth_des.c')
-rw-r--r--freebsd/lib/libc/rpc/svc_auth_des.c37
1 files changed, 13 insertions, 24 deletions
diff --git a/freebsd/lib/libc/rpc/svc_auth_des.c b/freebsd/lib/libc/rpc/svc_auth_des.c
index a9408019..55f3d3ee 100644
--- a/freebsd/lib/libc/rpc/svc_auth_des.c
+++ b/freebsd/lib/libc/rpc/svc_auth_des.c
@@ -92,11 +92,11 @@ struct cache_entry {
static struct cache_entry *authdes_cache/* [AUTHDES_CACHESZ] */;
static short *authdes_lru/* [AUTHDES_CACHESZ] */;
-static void cache_init(); /* initialize the cache */
-static short cache_spot(); /* find an entry in the cache */
-static void cache_ref(/*short sid*/); /* note that sid was ref'd */
+static void cache_init(void); /* initialize the cache */
+static short cache_spot(des_block *, char *, struct timeval *); /* find an entry in the cache */
+static void cache_ref(short sid); /* note that sid was ref'd */
-static void invalidate(); /* invalidate entry in cache */
+static void invalidate(char *); /* invalidate entry in cache */
/*
* cache statistics
@@ -111,9 +111,7 @@ static struct {
* Service side authenticator for AUTH_DES
*/
enum auth_stat
-_svcauth_des(rqst, msg)
- struct svc_req *rqst;
- struct rpc_msg *msg;
+_svcauth_des(struct svc_req *rqst, struct rpc_msg *msg)
{
long *ixdr;
@@ -272,7 +270,7 @@ _svcauth_des(rqst, msg)
debug("timestamp before last seen");
return (AUTH_REJECTEDVERF); /* replay */
}
- (void) gettimeofday(&current, (struct timezone *)NULL);
+ (void)gettimeofday(&current, NULL);
current.tv_sec -= window; /* allow for expiration */
if (!BEFORE(&current, &timestamp)) {
debug("timestamp expired");
@@ -357,7 +355,7 @@ _svcauth_des(rqst, msg)
* Initialize the cache
*/
static void
-cache_init()
+cache_init(void)
{
int i;
@@ -380,7 +378,7 @@ cache_init()
* Find the lru victim
*/
static short
-cache_victim()
+cache_victim(void)
{
return (authdes_lru[AUTHDES_CACHESZ-1]);
}
@@ -389,8 +387,7 @@ cache_victim()
* Note that sid was referenced
*/
static void
-cache_ref(sid)
- short sid;
+cache_ref(short sid)
{
int i;
short curr;
@@ -412,10 +409,7 @@ cache_ref(sid)
* return the spot in the cache.
*/
static short
-cache_spot(key, name, timestamp)
- des_block *key;
- char *name;
- struct timeval *timestamp;
+cache_spot(des_block *key, char *name, struct timeval *timestamp)
{
struct cache_entry *cp;
int i;
@@ -463,12 +457,8 @@ struct bsdcred {
* the credential.
*/
int
-authdes_getucred(adc, uid, gid, grouplen, groups)
- struct authdes_cred *adc;
- uid_t *uid;
- gid_t *gid;
- int *grouplen;
- gid_t *groups;
+authdes_getucred(struct authdes_cred *adc, uid_t *uid, gid_t *gid,
+ int *grouplen, gid_t *groups)
{
unsigned sid;
int i;
@@ -527,8 +517,7 @@ authdes_getucred(adc, uid, gid, grouplen, groups)
}
static void
-invalidate(cred)
- char *cred;
+invalidate(char *cred)
{
if (cred == NULL) {
return;