summaryrefslogtreecommitdiffstats
path: root/dbus/dbus-auth-script.c
diff options
context:
space:
mode:
authorRalf Habacker <ralf.habacker@freenet.de>2007-06-23 07:45:17 +0000
committerRalf Habacker <ralf.habacker@freenet.de>2007-06-23 07:45:17 +0000
commitf1cb3ee0e7b7b244780379c71b6444974c016809 (patch)
treead0cc47e9e5b55f8a9bd87cabf4821ce53624829 /dbus/dbus-auth-script.c
parent4872f15a05c0bdc01da9f7ef13589cc75d79af7c (diff)
* 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
Diffstat (limited to 'dbus/dbus-auth-script.c')
-rw-r--r--dbus/dbus-auth-script.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/dbus/dbus-auth-script.c b/dbus/dbus-auth-script.c
index b23fbfcb..79006b9d 100644
--- a/dbus/dbus-auth-script.c
+++ b/dbus/dbus-auth-script.c
@@ -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"))
{