Lines Matching refs:connection
106 let set_target (connection:t) ?(perms=[NONE]) domid =
107 { connection with target = Some (domid, perms) }
109 let get_owners (connection:t) =
110 match connection.main, connection.target with
114 let is_owner (connection:t) id =
115 match connection.target with
116 | Some target -> fst connection.main = id || fst target = id
117 | None -> fst connection.main = id
119 let is_dom0 (connection:t) =
120 is_owner connection 0
125 let to_string connection =
126 …Printf.sprintf "%s%s" (elt_to_string connection.main) (default "" (may elt_to_string connection.ta…
129 (* check if owner of the current connection and of the current node are the same *)
130 let check_owner (connection:Connection.t) (node:Node.t) =
131 if !activate && not (Connection.is_dom0 connection)
132 then Connection.is_owner connection (Node.get_owner node)
135 (* check if the current connection has the requested perm on the current node *)
136 let check (connection:Connection.t) request (node:Node.t) =
158 && not (Connection.is_dom0 connection)
159 && not (check_owner connection node)
160 && not (List.exists check_acl (Connection.get_owners connection))