struct audata {
struct opaque_auth au_origcred; /* original credentials */
struct opaque_auth au_shcred; /* short hand cred */
+#ifdef __LP64__
+ uint32_t au_shfaults; /* short hand cache faults */
+#else
u_long au_shfaults; /* short hand cache faults */
+#endif
char au_marshed[MAX_AUTH_BYTES];
u_int au_mpos; /* xdr pos at end of marshed */
};
au = (struct audata *)mem_alloc(sizeof(*au));
#ifndef KERNEL
if (au == NULL) {
+ mem_free(auth, sizeof(*auth));
(void)fprintf(stderr, "authunix_create: out of memory\n");
return (NULL);
}
au->au_origcred.oa_base = mem_alloc((u_int) len);
#else
if ((au->au_origcred.oa_base = mem_alloc((u_int) len)) == NULL) {
+ mem_free(auth, sizeof(*auth));
+ mem_free(au, sizeof(*au));
(void)fprintf(stderr, "authunix_create: out of memory\n");
return (NULL);
}
char machname[MAX_MACHINE_NAME + 1];
register int uid;
register int gid;
- int gids[NGROUPS];
+ gid_t gids[NGROUPS];
if (gethostname(machname, MAX_MACHINE_NAME) == -1)
abort();
if (len > maxgrplist) {
len = maxgrplist;
}
- return (authunix_create(machname, uid, gid, len, gids));
+ return (authunix_create(machname, uid, gid, len, (int *)gids));
}
/*