summaryrefslogtreecommitdiffstats
path: root/ldap/servers/plugins/replication/windows_inc_protocol.c
diff options
context:
space:
mode:
authorRich Megginson <rmeggins@redhat.com>2006-04-11 02:14:54 +0000
committerRich Megginson <rmeggins@redhat.com>2006-04-11 02:14:54 +0000
commite8c67e58c2faa3e3f5d328a92391a5a6a4569620 (patch)
tree7e16092b4dfb0106f446bb6a79552004399f7155 /ldap/servers/plugins/replication/windows_inc_protocol.c
parent9545e36805201ac0e3172b762373c6df741c2721 (diff)
downloadds-e8c67e58c2faa3e3f5d328a92391a5a6a4569620.tar.gz
ds-e8c67e58c2faa3e3f5d328a92391a5a6a4569620.tar.xz
ds-e8c67e58c2faa3e3f5d328a92391a5a6a4569620.zip
Bug(s) fixed: 186280
Bug Description: ldapserver: Close potential security vulnerabilities in CGI code Reviewed by: Nathan, Noriko, and Pete (Thanks!) Fix Description: Clean up usage of sprintf, strcpy, fgets instead of gets, fixed buffer usage, etc., mostly in the CGI code and other user facing code (i.e. setup). Also, Steve Grubb told me about a GCC trick to force it to check printf style varargs functions, to check the format string against the argument string, for type mismatches, missing arguments, and too many arguments. In the CGI form argument parsing code, we needed to be more careful about checking for bad input - good input is supposed to look like this: name=value&name=value&..... &name=value. I don't think the original code was checking properly for something like name&name=value. There was another place where we were not checking to see if a buffer had enough room before appending a string to it. I had to change a couple of functions to allow passing in the size of the buffer. Fixed some issues raised by Noriko and Nathan. Platforms tested: RHEL4 Flag Day: no Doc impact: no QA impact: should be covered by regular nightly and manual testing New Tests integrated into TET: none
Diffstat (limited to 'ldap/servers/plugins/replication/windows_inc_protocol.c')
-rw-r--r--ldap/servers/plugins/replication/windows_inc_protocol.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ldap/servers/plugins/replication/windows_inc_protocol.c b/ldap/servers/plugins/replication/windows_inc_protocol.c
index c3a642ef..2418f25d 100644
--- a/ldap/servers/plugins/replication/windows_inc_protocol.c
+++ b/ldap/servers/plugins/replication/windows_inc_protocol.c
@@ -386,7 +386,7 @@ windows_inc_run(Private_Repl_Protocol *prp)
/* just ignore it and go to sleep */
protocol_sleep(prp, PR_INTERVAL_NO_TIMEOUT);
}
- else if (e1 = event_occurred(prp, EVENT_WINDOW_CLOSED) ||
+ else if ((e1 = event_occurred(prp, EVENT_WINDOW_CLOSED)) ||
event_occurred(prp, EVENT_BACKOFF_EXPIRED))
{
/* this events - should not occur - log a warning and go to sleep */
@@ -458,7 +458,7 @@ windows_inc_run(Private_Repl_Protocol *prp)
next_state = STATE_READY_TO_ACQUIRE;
wait_change_timer_set = 0;
}
- else if (e1 = event_occurred(prp, EVENT_WINDOW_OPENED) ||
+ else if ((e1 = event_occurred(prp, EVENT_WINDOW_OPENED)) ||
event_occurred(prp, EVENT_BACKOFF_EXPIRED))
{
/* this events - should not occur - log a warning and clear the event */
@@ -570,7 +570,7 @@ windows_inc_run(Private_Repl_Protocol *prp)
{
/* consume and ignore */
}
- else if (e1 = event_occurred (prp, EVENT_WINDOW_OPENED) ||
+ else if ((e1 = event_occurred (prp, EVENT_WINDOW_OPENED)) ||
event_occurred (prp, EVENT_BACKOFF_EXPIRED))
{
/* This should never happen */