* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*)
+ *)
(* Domain-related primitive actions *)
signature DOMAIN = sig
+ val yourPath : string -> bool
+ val isIdent : char -> bool
+ val validHost : string -> bool
+ val validDomain : string -> bool
+ val yourDomain : string -> bool
+ val validUser : string -> bool
+ val validEmailUser : string -> bool
+
+ val ip : string Env.arg
+
+ val registerResetGlobal : (unit -> unit) -> unit
+ val registerResetLocal : (unit -> unit) -> unit
+ (* Register functions for clearing out all Domtool configuration at the global
+ * (AFS) and local levels, respectively. *)
+
+ val resetGlobal : unit -> unit
+ val resetLocal : unit -> unit
+ (* Call all registered functions *)
+
val registerBefore : (string -> unit) -> unit
val registerAfter : (string -> unit) -> unit
(* Register handlers to run just before and after entering a domain
* block. *)
+ val currentDomain : unit -> string
+
+ val domainFile : {node : string, name : string} -> TextIO.outstream
+ (* Open one of the current domain's configuration files for a particular
+ * node. *)
+
+ val currentAliasDomains : unit -> string list
+ val currentDomains : unit -> string list
+ (* Return the auxiliary domains being configured (not including
+ * currentDomain) or the list of all domains being configured,
+ * respectively. *)
+
+ (* The type of a set of files open for different domains. *)
+ type files = {write : string -> unit, (* Write a string to each. *)
+ writeDom : unit -> unit, (* Write each's domain name to it. *)
+ close : unit -> unit} (* Close all files. *)
+
+ val domainsFile : {node : string, name : string} -> files
+ (* Open a configuration file for every domain being configured. *)
+
+ val dnsMaster : unit -> string option
+ (* Name of the node that is the DNS master for the current domain, if there
+ * is one *)
+
+ val nodes : string list
+ (* Names of all system nodes *)
+ val nodeMap : string Ast.StringMap.map
+ (* Map node names to IP addresses *)
+ val nodeIp : string -> string
+ (* Look up a node in nodeMap *)
+
+ val setUser : string -> unit
+ val getUser : unit -> string
+ (* Name of the UNIX user providing this configuration *)
+
+ val your_domains : unit -> DataStructures.StringSet.set
+ (* The domains the current user may configure *)
+
+ val your_users : unit -> DataStructures.StringSet.set
+ val your_groups : unit -> DataStructures.StringSet.set
+ val your_paths : unit -> DataStructures.StringSet.set
+ (* UNIX users, groups, and paths the user may act with *)
+
+ val set_context : OpenSSL.context -> unit
+
+ val hasPriv : string -> bool
+
+ val rmdom : string list -> unit
+
+ val homedirOf : string -> string
+ val homedir : unit -> string
end