Commit Graph

16 Commits (17f3a029e3b11a12227c5651ceb0645e5023fd93)

Author SHA1 Message Date
Jacob Barthelmeh 17f3a029e3 cast on values and adjust isspace check 2022-08-10 14:58:02 -06:00
Andrew Hutchings 97974e9af2 Better wildcard support for Include
Check the prefix and postfix for a filename when a wildcard is used.
2022-08-09 13:51:14 +01:00
Andrew Hutchings bef771b693 Implement Include directive
Includes single files or directories, only in POSIX for now.
2022-08-08 14:48:02 +01:00
Jacob Barthelmeh 8f3cdc8230 infer fixes, clang build fixes, initial build on OSX 2022-08-05 12:05:07 -06:00
JacobBarthelmeh f51375802b add more comments and always print out error messages 2022-08-03 15:04:34 -07:00
JacobBarthelmeh 87a9bd4325 cleanup some debug messages and start to actual daemon 2022-07-30 00:46:11 -07:00
JacobBarthelmeh 4d90993e16 stub UseDNS, add checking config UsePrivilegeSeparation, scan-build warning fixes 2022-07-29 23:08:19 -07:00
JacobBarthelmeh c978b83c28 add check for PermitRootLogin config 2022-07-29 16:32:39 -07:00
JacobBarthelmeh cd0213572c add parsing Protocol from sshd_config 2022-07-29 16:06:26 -07:00
Hayden Roche ec873e1088 Rename wolfSSHD_NewConfig to wolfSSHD_ConfigNew, following pattern. 2022-07-28 13:34:14 -07:00
Hayden Roche f0caefcc33 Make HandlePort use GetConfigInt and add 0 port test. 2022-07-28 13:21:42 -07:00
Hayden Roche 90769af1f8 Add a test program, test_configuration.c, for testing sshd config.
I wanted to be able to test ParseConfigLine directly, so I added some
preprocessor logic to expose this function (i.e. make it non-static) when
building test_configuration. I fixed a couple bugs discovered by this new
testing.
2022-07-28 13:12:13 -07:00
Hayden Roche cef7e5065a Add support for Port config option and change default port back to 22. 2022-07-27 16:48:10 -07:00
Hayden Roche d62c1e0078 Fix GetConfigInt. 2022-07-27 16:47:14 -07:00
Hayden Roche e255679861 Add support for PasswordAuthentication config option. 2022-07-27 16:46:15 -07:00
Hayden Roche 48b627d70d Refactor various wolfSSHD code.
- Move function declarations for WOLFSSHD_CONFIG from wolfsshd.h to a new
header, configuration.h. Change config.c to configuration.c. (using
"configuration" so as not to collide with autotools' config.h)
- Make the WOLFSSL_CONFIG* member of WOLFSSHD_AUTH const. At least at the
moment, it shouldn't be necessary for this member to be writable.
- Replace wolfSSHD_ConfigGetOption with functions to get specific members from
the config.
- Namespace all config functions with wolfSSHD_Config* and all auth functions
with wolfSSHD_Auth.
- Add const to function parameters, where possible.
- Remove wolfSSHD_ prefix from static functions. Just use PascalCase. These
don't need namespacing since they aren't visible outside their translation unit.
- Modify GetConfigInt to expect leading and trailing whitespace to have already
been removed. It will have been removed in the context this function is used in
configuration.c.
2022-07-27 15:21:11 -07:00