You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
1.0 KiB

  1. From 99dd4a6e03b669a5b5fe234fa665b75bbd95c593 Mon Sep 17 00:00:00 2001
  2. From: Nikos Mavrogiannopoulos <nmav@redhat.com>
  3. Date: Tue, 7 Apr 2015 17:13:29 +0200
  4. Subject: [PATCH] reject bad commands from main
  5. ---
  6. src/sec-mod.c | 4 ++--
  7. 1 file changed, 2 insertions(+), 2 deletions(-)
  8. diff --git a/src/sec-mod.c b/src/sec-mod.c
  9. index 5a0763d..7783264 100644
  10. --- a/src/sec-mod.c
  11. +++ b/src/sec-mod.c
  12. @@ -325,7 +325,7 @@ int process_packet_from_main(void *pool, int cfd, sec_mod_st * sec, cmd_request_
  13. data.data);
  14. if (msg == NULL) {
  15. seclog(sec, LOG_INFO, "error unpacking auth ban ip reply\n");
  16. - return -1;
  17. + return ERR_BAD_COMMAND;
  18. }
  19. handle_sec_auth_ban_ip_reply(cfd, sec, msg);
  20. @@ -342,7 +342,7 @@ int process_packet_from_main(void *pool, int cfd, sec_mod_st * sec, cmd_request_
  21. data.data);
  22. if (msg == NULL) {
  23. seclog(sec, LOG_INFO, "error unpacking session close\n");
  24. - return -1;
  25. + return ERR_BAD_COMMAND;
  26. }
  27. ret = handle_sec_auth_session_cmd(cfd, sec, msg, cmd);
  28. --
  29. 2.1.4