[PATCH spice-server v5 00/10] SASL code improvements

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



SASL authentication code were a bit dodgy to see.
The series have basically 3 parts:
- some minor fixes;
- a test for SASL code;
- some code refactory.

The fixes were handling issues discovered looking at code and writing
the tests.
Test is not that straightforward, maybe some code should be put in
different files. On the other end I don't think the code that is
mocking SASL will be reused in other tests.
The refactory is mainly put all the authentication logic in one file
(red-stream.c) instead of having half in reds.c and the other half in
red-stream.c. This allows to present a single function instead of one
for each authentication step.

Changes since v4:
- test cases where SASL APIs reply too large packets;
- test the way a failure is reported from server.

Changes since v3:
- tested with a MIPS machine (quite hard to do, I should write how to
  do it!);
- change way to iterate tests;
- lot of comments;
- some style changes;
- fixed a regression for big endian machines.

Changes since v2:
- removed patch to keep mechlist without copy, not documented really
  fine, safer to copy it.

Changes since v1:
- rebase on master;
- merged some patches;
- improved and fixed some comments;
- minor styles.

Frediano Ziglio (10):
  test-sasl: Initial SASL test
  test-sasl: Add code to mocking functions to test state
  test-sasl: Base test, connect using SASL
  test-sasl: Add tests for different mechanism names
  test-sasl: Add tests for different failures and cases
  test-sasl: Test how to server reports the failure
  Handle SASL initialisation mainly in red-stream.c
  red-stream: Handle properly endianness in SASL code
  red-stream: Unify start and step passes
  red-stream: Encapsulate all authentication state in RedSASLAuth

 configure.ac             |   1 +
 server/red-stream.c      | 330 ++++++++++------------
 server/red-stream.h      |  11 +-
 server/reds.c            | 119 +-------
 server/tests/.gitignore  |   1 +
 server/tests/Makefile.am |   4 +
 server/tests/test-sasl.c | 702 +++++++++++++++++++++++++++++++++++++++++++++++
 7 files changed, 862 insertions(+), 306 deletions(-)
 create mode 100644 server/tests/test-sasl.c

-- 
2.14.3

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]