aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/auth/factotum/rpc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/auth/factotum/rpc.c')
-rw-r--r--src/cmd/auth/factotum/rpc.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/cmd/auth/factotum/rpc.c b/src/cmd/auth/factotum/rpc.c
index 400b7de5..350a0795 100644
--- a/src/cmd/auth/factotum/rpc.c
+++ b/src/cmd/auth/factotum/rpc.c
@@ -108,24 +108,24 @@ convthread(void *v)
}
c->attr = a;
proto = strfindattr(a, "proto");
- role = strfindattr(a, "role");
-
if(proto == nil){
werrstr("no proto in attrs");
goto out;
}
- if(role == nil){
- werrstr("no role in attrs");
- goto out;
- }
p = protolookup(proto);
if(p == nil){
werrstr("unknown proto %s", proto);
goto out;
}
-
c->proto = p;
+
+ role = strfindattr(a, "role");
+ if(role == nil){
+ werrstr("no role in attrs");
+ goto out;
+ }
+
for(r=p->roles; r->name; r++){
if(strcmp(r->name, role) != 0)
continue;