summaryrefslogtreecommitdiff
path: root/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-11-06 22:45:34 +0300
committerAndrei Karas <akaras@inbox.ru>2018-11-14 06:00:50 +0300
commit77b72c7b82a1af205a58225b09e917b4593d770a (patch)
tree17b5877cb02ce6fff42b3e39f2586f5335b1f41f /src/plugins/HPMHooking/HPMHooking_login.Hooks.inc
parent25abd43600a693a47acd755b5713b342de86a7ca (diff)
downloadhercules-77b72c7b82a1af205a58225b09e917b4593d770a.tar.gz
hercules-77b72c7b82a1af205a58225b09e917b4593d770a.tar.bz2
hercules-77b72c7b82a1af205a58225b09e917b4593d770a.tar.xz
hercules-77b72c7b82a1af205a58225b09e917b4593d770a.zip
Update HPM hooks.
Diffstat (limited to 'src/plugins/HPMHooking/HPMHooking_login.Hooks.inc')
-rw-r--r--src/plugins/HPMHooking/HPMHooking_login.Hooks.inc38
1 files changed, 32 insertions, 6 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc
index 5e3d7b28d..4cf0e85ce 100644
--- a/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc
@@ -7177,15 +7177,15 @@ int HP_sockt_realloc_writefifo(int fd, size_t addition) {
}
return retVal___;
}
-int HP_sockt_wfifoset(int fd, size_t len) {
+int HP_sockt_wfifoset(int fd, size_t len, bool validate) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_sockt_wfifoset_pre > 0) {
- int (*preHookFunc) (int *fd, size_t *len);
+ int (*preHookFunc) (int *fd, size_t *len, bool *validate);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_wfifoset_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_sockt_wfifoset_pre[hIndex].func;
- retVal___ = preHookFunc(&fd, &len);
+ retVal___ = preHookFunc(&fd, &len, &validate);
}
if (*HPMforce_return) {
*HPMforce_return = false;
@@ -7193,13 +7193,13 @@ int HP_sockt_wfifoset(int fd, size_t len) {
}
}
{
- retVal___ = HPMHooks.source.sockt.wfifoset(fd, len);
+ retVal___ = HPMHooks.source.sockt.wfifoset(fd, len, validate);
}
if (HPMHooks.count.HP_sockt_wfifoset_post > 0) {
- int (*postHookFunc) (int retVal___, int fd, size_t len);
+ int (*postHookFunc) (int retVal___, int fd, size_t len, bool validate);
for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_wfifoset_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_sockt_wfifoset_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, fd, len);
+ retVal___ = postHookFunc(retVal___, fd, len, validate);
}
}
return retVal___;
@@ -7257,6 +7257,32 @@ void HP_sockt_close(int fd) {
}
return;
}
+void HP_sockt_validateWfifo(int fd, size_t len) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_sockt_validateWfifo_pre > 0) {
+ void (*preHookFunc) (int *fd, size_t *len);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_validateWfifo_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_sockt_validateWfifo_pre[hIndex].func;
+ preHookFunc(&fd, &len);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.sockt.validateWfifo(fd, len);
+ }
+ if (HPMHooks.count.HP_sockt_validateWfifo_post > 0) {
+ void (*postHookFunc) (int fd, size_t len);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_validateWfifo_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_sockt_validateWfifo_post[hIndex].func;
+ postHookFunc(fd, len);
+ }
+ }
+ return;
+}
bool HP_sockt_session_is_valid(int fd) {
int hIndex = 0;
bool retVal___ = false;