__query_properties(): direkter Abruf

In wird __query_properties() wird nun eine neue Rechtepruefung
auf RAW_ACCESS durchgefuehrt. Dieses wird nur Objekten genehmigt,
welche nur von EM+ geschrieben werden koennen, die Daten nicht
weiterreichen und nicht veraendern.
Dafuer duerfen diese Objekte dann auch direkt das Array prop
bekommen und es muss keine Kopie erstellt werden.
Aktuell ist nur das MGtool berechtigt fuer RAW_ACCESS.

Change-Id: I83f141c72ecd0e7741325512f162a640ae2e36c9
diff --git a/std/thing/properties.c b/std/thing/properties.c
index efbe10e..6fd670d 100644
--- a/std/thing/properties.c
+++ b/std/thing/properties.c
@@ -58,6 +58,7 @@
 #define PROTECTED_DELETE 4
 #define SECURED_SET      5
 #define SECURED_DELETE   6
+#define RAW_ACCESS       7
 nomask private int prop_check_privilege(int drop_priv, int mode,
           int op=PROP_SET)
 {
@@ -85,6 +86,14 @@
       if (geteuid(previous_object()) == ROOTID || ARCH_SECURITY)
         return 1;
 
+    case RAW_ACCESS:
+      // RAW_ACCESS grants access to all properties and their raw, uncopied
+      // data. It is only for very specific objects and they *MUST NOT* change
+      // it or give user-code (or any other) access to it.
+      if (load_name(previous_object()) == "/obj/tools/MGtool")
+        return 1;
+      return 0;
+
     case PROTECTED_DELETE:
     case PROTECTED_SET:
     case PROP_SET:
@@ -383,8 +392,13 @@
 // benoetigt.
 public mixed *__query_properties()
 {
+  // RAW_ACCESS grants access to all properties and their raw, uncopied data.
+  // It is only for very specific objects.
+  if (!prop_check_privilege(extern_call(), 0, RAW_ACCESS))
+    return 0;
+
   if ( pointerp(prop) )
-    return(deep_copy(prop));
+    return prop;
   else
     return allocate(F_PROP_ENTRIES, ([]));
 }