PERFORCE change 180793 for review
Sergio Ligregni
ligregni at FreeBSD.org
Mon Jul 12 03:11:45 UTC 2010
http://p4web.freebsd.org/@@180793?ac=10
Change 180793 by ligregni at ligPhenom on 2010/07/12 03:10:46
The functionality of the project is working
The missing things (for second half) are:
SSL
integration with audit
Affected files ...
.. //depot/projects/soc2010/disaudit/damasterd.c#4 edit
.. //depot/projects/soc2010/disaudit/damasterd.h#4 edit
.. //depot/projects/soc2010/disaudit/msocket_work.c#4 edit
.. //depot/projects/soc2010/disaudit/msocket_work.h#4 edit
.. //depot/projects/soc2010/disaudit/shipd.c#7 edit
.. //depot/projects/soc2010/disaudit/shipd.h#7 edit
.. //depot/projects/soc2010/disaudit/ssocket_work.c#5 edit
.. //depot/projects/soc2010/disaudit/ssocket_work.h#5 edit
Differences ...
==== //depot/projects/soc2010/disaudit/damasterd.c#4 (text+ko) ====
@@ -123,6 +123,7 @@
void
to_log(char *message)
{
+return;
if (debug)
perror(message);
else
@@ -217,7 +218,7 @@
{
int res = 0;
- char opt[1];
+ char opt[2];
get_from_socket(sfd, opt);
@@ -396,7 +397,7 @@
char dirpath[MAX_DIR_SIZE+1];
time_t mtime;
struct tm *ltime;
- unsigned long file_size;
+ unsigned file_size;
int fd, bwrtn, bread;
get_from_socket(sfd, pathslave);
==== //depot/projects/soc2010/disaudit/damasterd.h#4 (text+ko) ====
==== //depot/projects/soc2010/disaudit/msocket_work.c#4 (text+ko) ====
==== //depot/projects/soc2010/disaudit/msocket_work.h#4 (text+ko) ====
==== //depot/projects/soc2010/disaudit/shipd.c#7 (text+ko) ====
@@ -133,6 +133,7 @@
void
to_log(char *message)
{
+return;
if (debug)
perror(message);
else
@@ -350,7 +351,7 @@
return;
}
-printf("TT %s\n", dirp->d_name);
+//printf("TT %s\n", dirp->d_name);
if (S_ISDIR(statbuf.st_mode) == 0) /* It's not a directory */
if ( is_audit_trail(dirp->d_name) ) /* It's not other file */
@@ -400,8 +401,12 @@
free(trail_paths[i]);
free(trail_paths);
+pll(root);
+
is_in_master(root, &index);
+pll(root);
+
/*
* At this point, the variable index holds the index of the first ok trail in master system
* and we will go backwards (index-1 ... 0) in the array to sync the newer ones
@@ -494,6 +499,9 @@
close(sockfd);
+ if (first_found != NULL)
+ *first_found = counter;
+
free(md5);
return ret_val;
@@ -599,6 +607,10 @@
{
trail_entry *temp = *root, *oth;
int total = 0;
+
+ if (number == 0)
+ break;
+
while (temp)
{
++total;
@@ -610,6 +622,9 @@
number = total - number; /* How many we will be left in the queue */
oth = temp = *root;
+
+ if (!number)
+ *root = NULL;
while (temp && number--)
{
@@ -629,7 +644,6 @@
temp = oth;
}
- *root = temp;
break;
}
case DEL_ALL:
==== //depot/projects/soc2010/disaudit/shipd.h#7 (text+ko) ====
==== //depot/projects/soc2010/disaudit/ssocket_work.c#5 (text+ko) ====
@@ -47,7 +47,7 @@
send_to_socket(sockfd, path ? "1" : "0");
if (path) /* If there is a file to search for */
{
- char *result;
+ char result[2];
send_to_socket(sockfd, path);
send_to_socket(sockfd, md5);
@@ -78,7 +78,7 @@
if (path) /* If there is a file to send through the socket */
{
int fd = open(fullpath, O_RDONLY);
- unsigned long file_size;
+ unsigned file_size;
int bread;
struct stat statbuf;
==== //depot/projects/soc2010/disaudit/ssocket_work.h#5 (text+ko) ====
More information about the p4-projects
mailing list