]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
* dbus/dbus-auth-script.c (_dbus_auth_script_run): added UNIX_ONLY and WIN_ONLY comma...
authorRalf Habacker <ralf.habacker@freenet.de>
Sat, 23 Jun 2007 07:45:17 +0000 (07:45 +0000)
committerRalf Habacker <ralf.habacker@freenet.de>
Sat, 23 Jun 2007 07:45:17 +0000 (07:45 +0000)
* test/data/auth/external-root.auth-script: limit execution to unix

ChangeLog
dbus/dbus-auth-script.c
test/data/auth/external-root.auth-script

index 58cb591f1e7124cf2e4e86a3bf63d244b6aac3e9..f000a993abce942fb6d50d35065d6f248c49ea60 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-06-23  Ralf Habacker  <ralf.habacker@freenet.de>
+
+       * dbus/dbus-auth-script.c (_dbus_auth_script_run): added UNIX_ONLY and 
+       WIN_ONLY commands for auth scripts
+       * test/data/auth/external-root.auth-script: limit execution to unix
+
 2007-06-21  Havoc Pennington  <hp@redhat.com>
 
        * dbus/dbus-tranport.c (auth_via_default_rules): made the verbose spam
index b23fbfcbddfcbbae273cd1b47d799c8c344120e9..79006b9d3e8270fadb575b0c40133826f2f2f492 100644 (file)
@@ -324,6 +324,38 @@ _dbus_auth_script_run (const DBusString *filename)
           /* Ignore this comment */
           goto next_iteration;
         }
+#ifdef DBUS_WIN
+      else if (_dbus_string_starts_with_c_str (&line,
+                                               "WIN_ONLY"))
+        {
+          /* Ignore this line */
+          goto next_iteration;
+        }
+      else if (_dbus_string_starts_with_c_str (&line,
+                                               "UNIX_ONLY"))
+        {
+          /* skip this file */
+          _dbus_warn ("skipping unix only auth script\n");
+          retval = TRUE;
+          goto out;
+        }
+#endif
+#ifdef DBUS_UNIX
+      else if (_dbus_string_starts_with_c_str (&line,
+                                               "UNIX_ONLY"))
+        {
+          /* Ignore this line */
+          goto next_iteration;
+        }
+      else if (_dbus_string_starts_with_c_str (&line,
+                                               "WIN_ONLY"))
+        {
+          /* skip this file */
+          _dbus_warn ("skipping windows only auth script\n");
+          retval = TRUE;
+          goto out;
+        }
+#endif
       else if (_dbus_string_starts_with_c_str (&line,
                                                "CLIENT"))
         {
index ca5b94acaf121321a4f9fc9678c00a99bad3b413..b4c4b43946aa05bb66b3b40edadb6eafef19ac35 100644 (file)
@@ -1,5 +1,5 @@
 ## this tests we can auth EXTERNAL as ourselves, with root credentials
-
+UNIX_ONLY
 SERVER
 ROOT_CREDENTIALS
 ## 30 is ASCII '0' in hex