Trusted-path permission checking
[hcoop/domtool2.git] / src / msg.sml
index 5bf11f3..bd7b5ee 100644 (file)
@@ -92,12 +92,21 @@ fun sendQuery (bio, q) =
     case q of
        QApt s => (OpenSSL.writeInt (bio, 0);
                   OpenSSL.writeString (bio, s))
+      | QCron s => (OpenSSL.writeInt (bio, 1);
+                   OpenSSL.writeString (bio, s))
+      | QFtp s => (OpenSSL.writeInt (bio, 2);
+                  OpenSSL.writeString (bio, s))
+      | QTrustedPath s => (OpenSSL.writeInt (bio, 3);
+                          OpenSSL.writeString (bio, s))
 
 fun recvQuery bio =
     case OpenSSL.readInt bio of
        SOME n =>
        (case n of
             0 => Option.map QApt (OpenSSL.readString bio)
+          | 1 => Option.map QCron (OpenSSL.readString bio)
+          | 2 => Option.map QFtp (OpenSSL.readString bio)
+          | 3 => Option.map QTrustedPath (OpenSSL.readString bio)
           | _ => NONE)
       | NONE => NONE