diff options
author | Havoc Pennington <hp@redhat.com> | 2007-06-10 04:54:45 +0000 |
---|---|---|
committer | Havoc Pennington <hp@redhat.com> | 2007-06-10 04:54:45 +0000 |
commit | a789b7b38cb4f4540a41444cbd64bf7ada2d60d2 (patch) | |
tree | db5164def7f5d19266bc4ebfb4ce740f269d79e2 /test/data/auth/anonymous-client-successful.auth-script | |
parent | 7be5fd95cdccdca28937804f32ca8b1308887d09 (diff) |
2007-06-09 Havoc Pennington <hp@redhat.com>
* dbus/dbus-string.c (_dbus_string_pop_line): fix this not to
think an empty line is the end of the file.
Also, fix some whitespace.
* dbus/dbus-string-util.c: add more tests for
_dbus_string_pop_line() revealing that it thinks an empty line is
the end of the file, which broke dbus-auth-script.c so
it didn't really run the scripts
* dbus/dbus-auth.c: add ANONYMOUS mechanism
* dbus/dbus-auth-script.c (_dbus_auth_script_run): fix to detect
an empty/no-op auth script; add commands to check that we have or
don't have the expected credentials
Diffstat (limited to 'test/data/auth/anonymous-client-successful.auth-script')
-rw-r--r-- | test/data/auth/anonymous-client-successful.auth-script | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/data/auth/anonymous-client-successful.auth-script b/test/data/auth/anonymous-client-successful.auth-script new file mode 100644 index 00000000..9a1620bc --- /dev/null +++ b/test/data/auth/anonymous-client-successful.auth-script @@ -0,0 +1,16 @@ +## this tests that a client can login anonymously + +CLIENT + +## Reject whatever mechanism the client picks first +EXPECT_COMMAND AUTH +SEND 'REJECTED DBUS_TEST_NONEXISTENT_MECH1 ANONYMOUS DBUS_TEST_NONEXISTENT_MECH2' + +## And this time we get ANONYMOUS + +EXPECT_COMMAND AUTH +## of course real DBUS_COOKIE_SHA1 would not send this here... +SEND 'OK 1234deadbeef' + +EXPECT_COMMAND BEGIN +EXPECT_STATE AUTHENTICATED |