Re: nessus-libraries/libnessus bpf_share.c, 1.59.2.1, 1.59.2.2 ids_send.c, 1.27, 1.27.2.1 pcap.c, 1.30.2.1, 1.30.2.2 plugutils.c, 1.132.2.5, 1.132.2.6

Jan-Oliver Wagner <[email protected]> Fri, 19 Aug 2005 09:47:44 +0200
Newsgroups gmane.comp.security.nessus.devel
Message-ID <[email protected]>
Hi,

this patch to NESSUS_2_2 has not been applied to HEAD.
I've attached a patch file for HEAD.

	Jan

On Wed, Jul 06, 2005 at 04:48:14PM -0400, [email protected] wrote:
> Update of /usr/local/cvs/nessus-libraries/libnessus
> In directory raccoon.nessus.org:/tmp/cvs-serv86312
> 
> Modified Files:
>       Tag: NESSUS_2_2
> 	bpf_share.c ids_send.c pcap.c plugutils.c 
> Log Message:
> signedness warnings
> 
> Index: bpf_share.c
> ===================================================================
> RCS file: /usr/local/cvs/nessus-libraries/libnessus/bpf_share.c,v
> retrieving revision 1.59.2.1
> retrieving revision 1.59.2.2
> diff -u -d -r1.59.2.1 -r1.59.2.2
> --- bpf_share.c	5 May 2005 12:42:59 -0000	1.59.2.1
> +++ bpf_share.c	6 Jul 2005 20:48:10 -0000	1.59.2.2
> @@ -505,14 +505,14 @@
>  {
>   fd_set rd;
>   struct timeval tv = {0,0};
> - int clnt;
> + unsigned int clnt;
>   
>   FD_ZERO(&rd);
>   FD_SET(soc, &rd);
>   if(select(soc+1, &rd, &rd, &rd, &tv) > 0)
>   {
>    struct sockaddr_un soca;
> -  int len = sizeof(soca);
> +  unsigned int len = sizeof(soca);
>    clnt = accept(soc, (struct sockaddr*)&soca,&len); 
>    if(clnt > 0)
>    {
> 
> Index: ids_send.c
> ===================================================================
> RCS file: /usr/local/cvs/nessus-libraries/libnessus/ids_send.c,v
> retrieving revision 1.27
> retrieving revision 1.27.2.1
> diff -u -d -r1.27 -r1.27.2.1
> --- ids_send.c	19 Jan 2004 20:32:30 -0000	1.27
> +++ ids_send.c	6 Jul 2005 20:48:11 -0000	1.27.2.1
> @@ -387,9 +387,9 @@
>   int ret = 0;
>   int len;
>   char * buf = (char*)buf0;
> - int sz  = sizeof(sockaddr);
> + unsigned int sz  = sizeof(sockaddr);
>   int e;
> - const char * packet;
> + unsigned char * packet;
>   int bpf;
>   
>   bzero(&sockaddr, sizeof(sockaddr));
> @@ -519,7 +519,7 @@
>    ret = open_sock_tcp(args, port, timeout);
>    if(ret >= 0)
>    {
> -   const char * packet = bpf_next(bpf, &len);
> +   unsigned char * packet = bpf_next(bpf, &len);
>     if(packet)
>     {
>     char *pkt_ip;
> 
> Index: pcap.c
> ===================================================================
> RCS file: /usr/local/cvs/nessus-libraries/libnessus/pcap.c,v
> retrieving revision 1.30.2.1
> retrieving revision 1.30.2.2
> diff -u -d -r1.30.2.1 -r1.30.2.2
> --- pcap.c	19 Apr 2005 11:04:58 -0000	1.30.2.1
> +++ pcap.c	6 Jul 2005 20:48:11 -0000	1.30.2.2
> @@ -356,7 +356,7 @@
>  int getsourceip(struct in_addr *src, struct in_addr *dst) {
>    int sd;
>    struct sockaddr_in sock;
> -  int socklen = sizeof(struct sockaddr_in);
> +  unsigned int socklen = sizeof(struct sockaddr_in);
>    unsigned short p1;
>    
>    
> 
> Index: plugutils.c
> ===================================================================
> RCS file: /usr/local/cvs/nessus-libraries/libnessus/plugutils.c,v
> retrieving revision 1.132.2.5
> retrieving revision 1.132.2.6
> diff -u -d -r1.132.2.5 -r1.132.2.6
> --- plugutils.c	6 Jul 2005 13:52:25 -0000	1.132.2.5
> +++ plugutils.c	6 Jul 2005 20:48:11 -0000	1.132.2.6
> @@ -2015,7 +2015,8 @@
>  ExtFunc int shared_socket_register ( struct arglist * args, int fd, char * name )
>  {
>   int soc; 
> - int type, opt_len = sizeof(type);
> + int type;
> + unsigned int opt_len = sizeof(type);
>   int e;  
>   soc = (int)arg_get_value(args, "SOCKET");
>   if ( fd_is_stream(fd) )
> 
> _______________________________________________
> Nessus-cvs mailing list
> [email protected]
> http://mail.nessus.org/mailman/listinfo/nessus-cvs

-- 
Jan-Oliver Wagner               http://intevation.de/~jan/
Intevation GmbH                      http://intevation.de/
Kolab Konsortium               http://kolab-konsortium.de/
FreeGIS                                http://freegis.org/

_______________________________________________
Nessus-devel mailing list
[email protected]
http://mail.nessus.org/mailman/listinfo/nessus-devel
signed.patch (text/plain, 2.7 KB)
Index: bpf_share.c
===================================================================
RCS file: /usr/local/cvs/nessus-libraries/libnessus/bpf_share.c,v
retrieving revision 1.60
diff -u -3 -p -r1.60 bpf_share.c
--- bpf_share.c	5 May 2005 12:42:01 -0000	1.60
+++ bpf_share.c	19 Aug 2005 07:44:16 -0000
@@ -505,14 +505,14 @@ static int add_clients(int soc)
 {
  fd_set rd;
  struct timeval tv = {0,0};
- int clnt;
+ unsigned int clnt;
  
  FD_ZERO(&rd);
  FD_SET(soc, &rd);
  if(select(soc+1, &rd, &rd, &rd, &tv) > 0)
  {
   struct sockaddr_un soca;
-  int len = sizeof(soca);
+  unsigned int len = sizeof(soca);
   clnt = accept(soc, (struct sockaddr*)&soca,&len); 
   if(clnt > 0)
   {
Index: ids_send.c
===================================================================
RCS file: /usr/local/cvs/nessus-libraries/libnessus/ids_send.c,v
retrieving revision 1.27
diff -u -3 -p -r1.27 ids_send.c
--- ids_send.c	19 Jan 2004 20:32:30 -0000	1.27
+++ ids_send.c	19 Aug 2005 07:44:16 -0000
@@ -387,9 +387,9 @@ ids_send(fd, buf0, n, method)
  int ret = 0;
  int len;
  char * buf = (char*)buf0;
- int sz  = sizeof(sockaddr);
+ unsigned int sz  = sizeof(sockaddr);
  int e;
- const char * packet;
+ unsigned char * packet;
  int bpf;
  
  bzero(&sockaddr, sizeof(sockaddr));
@@ -519,7 +519,7 @@ int ids_open_sock_tcp(args, port, method
   ret = open_sock_tcp(args, port, timeout);
   if(ret >= 0)
   {
-   const char * packet = bpf_next(bpf, &len);
+   unsigned char * packet = bpf_next(bpf, &len);
    if(packet)
    {
    char *pkt_ip;
Index: pcap.c
===================================================================
RCS file: /usr/local/cvs/nessus-libraries/libnessus/pcap.c,v
retrieving revision 1.31
diff -u -3 -p -r1.31 pcap.c
--- pcap.c	19 Apr 2005 11:06:48 -0000	1.31
+++ pcap.c	19 Aug 2005 07:44:16 -0000
@@ -356,7 +356,7 @@ struct interface_info *getinterfaces(int
 int getsourceip(struct in_addr *src, struct in_addr *dst) {
   int sd;
   struct sockaddr_in sock;
-  int socklen = sizeof(struct sockaddr_in);
+  unsigned int socklen = sizeof(struct sockaddr_in);
   unsigned short p1;
   
   
Index: plugutils.c
===================================================================
RCS file: /usr/local/cvs/nessus-libraries/libnessus/plugutils.c,v
retrieving revision 1.137
diff -u -3 -p -r1.137 plugutils.c
--- plugutils.c	6 Jul 2005 13:54:03 -0000	1.137
+++ plugutils.c	19 Aug 2005 07:44:16 -0000
@@ -2011,7 +2011,8 @@ is_shell_command_present(name)
 ExtFunc int shared_socket_register ( struct arglist * args, int fd, char * name )
 {
  int soc; 
- int type, opt_len = sizeof(type);
+ int type;
+ unsigned int opt_len = sizeof(type);
  int e;  
  soc = (int)arg_get_value(args, "SOCKET");
  if ( fd_is_stream(fd) )