#include <winsock2.h>
#else
#include <netinet/in.h>
+#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#else
+#ifdef HAVE_STRINGS_H
#include <strings.h>
#endif
+#endif
#include <lock.h>
#include <ubik.h>
#include <rx/xdr.h>
if (ntohl(tentry.flags) & PRGRP) {
if ((tentry.count == 0) && !admin) return PRGROUPEMPTY;
/* terminate prefix at colon if there is one */
- if (prefix = strchr(tentry.name, ':')) *prefix = 0;
+ if ((prefix = strchr(tentry.name, ':'))) *prefix = 0;
}
prefix = tentry.name;
}
}
done:
/* check for legal name with either group rules or user rules */
- if (suffix = strchr(cname, ':')) {
+ if ((suffix = strchr(cname, ':'))) {
/* check for confusing characters */
if (strchr(cname, '\n') || /* restrict so recreate can work */
strchr(suffix+1, ':')) /* avoid multiple colons */
} else {
flags = oid = aid = 0;
}
- if (!(flags & PRACCESS)) /* provide default access */
+ if (!(flags & PRACCESS)) { /* provide default access */
if (flags & PRGRP)
flags |= PRP_GROUP_DEFAULT;
else
flags |= PRP_USER_DEFAULT;
+ }
if (flags & any) return 1;
if (oid) {
if ((flags & mem) && IsAMemberOf (ut, cid, aid)) return 1;
}
/* Allow members of SYSVIEWERID to get membership and status only */
- if (((mem == PRP_STATUS_MEM)||(mem == PRP_MEMBER_MEM))&&(IsAMemberOf (ut, cid, SYSVIEWERID))) return 1;
+ if (((mem == PRP_STATUS_MEM)||(mem == PRP_MEMBER_MEM)||
+ (any == PRP_OWNED_ANY))&&(IsAMemberOf (ut, cid, SYSVIEWERID)))
+ return 1;
if (IsAMemberOf (ut, cid, SYSADMINID)) return 1;
return 0; /* no access */
}
afs_int32 nptr;
afs_int32 last; /* addr of last cont. block */
afs_int32 first = 0;
- afs_int32 cloc;
+ afs_int32 cloc = 0;
afs_int32 slot = -1;
if (entry->id == aid) return PRINCONSISTENT;
prlist *alist;
afs_int32 add;
{
- afs_int32 code;
+ afs_int32 code = 0;
afs_int32 i;
struct contentry centry;
afs_int32 nptr;