| SOME m =>
case m of
MsgDescription s => print s
- | MsgError s => print ("Describe failed: " ^ s ^ "\n")
+ | MsgError s => print ("Description failed: " ^ s ^ "\n")
| _ => print "Unexpected server reply.\n";
OpenSSL.close bio
end
in
if !ErrorMsg.anyErrors then
(ErrorMsg.reset ();
- print ("User " ^ user ^ "'s configuration has errors!\n"))
+ print ("User " ^ user ^ "'s configuration has errors!\n");
+ ok := false)
else
app checker files
end
(fn () => ())
| MsgDescribe dom =>
- doIt (fn () => (if Domain.validDomain dom then
- (Msg.send (bio, MsgDescription (Domain.describe dom));
- ("Requested description of domain " ^ dom,
- NONE))
- else
- ("Requested description of invalid domain " ^ dom,
- SOME "Invalid domain name")))
+ doIt (fn () => if not (Domain.validDomain dom) then
+ ("Requested description of invalid domain " ^ dom,
+ SOME "Invalid domain name")
+ else if not (Domain.yourDomain dom
+ orelse Acl.query {user = user, class = "priv", value = "all"}) then
+ ("Requested description of " ^ dom ^ ", but not allowed access",
+ SOME "Access denied")
+ else
+ (Msg.send (bio, MsgDescription (Domain.describe dom));
+ ("Sent description of domain " ^ dom,
+ NONE)))
(fn () => ())
| _ =>