[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ossec-dev] ossec-hids: os_net.c (HEAD) [dcid]
Module name: ossec-hids
Changes by: dcid 06/08/28 15:45:27
Modified files:
os_net.c
Log message:
Description: Long commit.
-Increased size requirement for agent names.
-Added monitor daemon.
-Re organized client/server comminication.
-Removed false positives from rootkits.
Reviewed by: dcid (more tests needed)
Bug:
Index: os_net.c
===================================================================
RCS file: /usr/cvsroot/ossec-hids/src/os_net/os_net.c,v
diff -u -r1.20 -r1.21
--- os_net.c 19 Jun 2006 15:21:41 -0000 1.20
+++ os_net.c 28 Aug 2006 18:45:27 -0000 1.21
@@ -115,28 +115,24 @@
{
int ossock = 0;
+ /* Making sure the path isn't there */
+ unlink(path);
+
memset(&n_us, 0, sizeof(n_us));
n_us.sun_family = AF_UNIX;
strncpy(n_us.sun_path, path, sizeof(n_us.sun_path)-1);
- if((ossock = socket(AF_UNIX, SOCK_DGRAM,0)) < 0)
+ if((ossock = socket(AF_UNIX, SOCK_DGRAM, 0)) < 0)
return(OS_SOCKTERR);
- /* Making sure the path isn't there */
- unlink(path);
-
if(bind(ossock, (struct sockaddr *)&n_us, SUN_LEN(&n_us)) < 0)
{
close(ossock);
return(OS_SOCKTERR);
}
- if(chmod(path,mode) < 0)
- {
- close(ossock);
- unlink(path);
- return(OS_FILERR);
- }
+ /* Changing permissions */
+ chmod(path,mode);
return(ossock);
}
OSSEC home |
Main Index |
Thread Index
OSSEC project: www.ossec.net.
Mailling list information: http://www.ossec.net/en/mailing_lists.html.