Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 1471265 Details for
Bug 1317083
No IPv6 support
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
patch to fix compiler warnings and remove nagios-common dependency
ipv6.patch (text/plain), 7.62 KB, created by
Stuart D Gathman
on 2018-07-28 18:18:02 UTC
(
hide
)
Description:
patch to fix compiler warnings and remove nagios-common dependency
Filename:
MIME Type:
Creator:
Stuart D Gathman
Created:
2018-07-28 18:18:02 UTC
Size:
7.62 KB
patch
obsolete
>diff --git a/nsca-2.9.2-warnings.patch b/nsca-2.9.2-warnings.patch >new file mode 100644 >index 0000000..5c0409b >--- /dev/null >+++ b/nsca-2.9.2-warnings.patch >@@ -0,0 +1,131 @@ >+diff -up ./src/netutils.c.warnings ./src/netutils.c >+--- ./src/netutils.c.warnings 2018-07-28 09:06:39.482054241 -0400 >++++ ./src/netutils.c 2018-07-28 09:06:55.070255634 -0400 >+@@ -47,8 +47,6 @@ int my_tcp_connect(char *host_name,int p >+ >+ /* opens a tcp or udp connection to a remote host */ >+ int my_connect(char *host_name,int port,int *sd,char *proto){ >+- struct sockaddr_in servaddr; >+- struct hostent *hp; >+ struct protoent *ptrp; >+ int result; >+ struct addrinfo *aip = 0; >+diff -up ./src/nsca.c.warnings ./src/nsca.c >+--- ./src/nsca.c.warnings 2018-07-28 09:06:28.847916854 -0400 >++++ ./src/nsca.c 2018-07-28 09:06:28.850916892 -0400 >+@@ -16,12 +16,13 @@ >+ * >+ ******************************************************************************/ >+ >++#define _GNU_SOURCE >+ #include "../include/common.h" >+ #include "../include/config.h" >+ #include "../include/netutils.h" >+ #include "../include/utils.h" >+ #include "../include/nsca.h" >+- >++#include <stdio.h> >+ >+ static int server_port=DEFAULT_SERVER_PORT; >+ static char server_address[64]=""; >+@@ -1091,7 +1092,7 @@ static void handle_connection(int sock, >+ >+ /* for some reason we didn't send all the bytes we were supposed to */ >+ else if(bytes_to_send<sizeof(send_packet)){ >+- syslog(LOG_ERR,"Only able to send %d of %d bytes of init packet to client\n",rc,sizeof(send_packet)); >++ syslog(LOG_ERR,"Only able to send %d of %lu bytes of init packet to client\n",rc,(unsigned long)sizeof(send_packet)); >+ encrypt_cleanup(decryption_method,CI); >+ close(sock); >+ if(mode==MULTI_PROCESS_DAEMON) >+@@ -1127,8 +1128,6 @@ static void handle_connection_read(int s >+ u_int32_t packet_crc32; >+ u_int32_t calculated_crc32; >+ struct crypt_instance *CI; >+- time_t packet_time; >+- time_t current_time; >+ int16_t return_code; >+ unsigned long packet_age=0L; >+ int bytes_to_recv; >+@@ -1213,7 +1212,6 @@ static void handle_connection_read(int s >+ strncpy(host_name,receive_packet.host_name,sizeof(host_name)-1); >+ host_name[sizeof(host_name)-1]='\0'; >+ >+- packet_age=(unsigned long)(current_time-packet_time); >+ if(debug==TRUE) >+ syslog(LOG_ERR,"Time difference in packet: %lu seconds for host %s", packet_age, host_name); >+ if((max_packet_age>0 && (packet_age>max_packet_age) && (packet_age>=0)) || >+@@ -1273,7 +1271,6 @@ static int write_checkresult_file(char * >+ mode_t new_umask=077; >+ mode_t old_umask; >+ time_t current_time; >+- char *output_file=NULL; >+ int checkresult_file_fd=-1; >+ char *checkresult_file=NULL; >+ char *checkresult_ok_file=NULL; >+@@ -1298,8 +1295,8 @@ static int write_checkresult_file(char * >+ time(¤t_time); >+ fprintf(checkresult_file_fp,"### NSCA Passive Check Result ###\n"); >+ fprintf(checkresult_file_fp,"# Time: %s",ctime(¤t_time)); >+- fprintf(checkresult_file_fp,"file_time=%d\n\n",current_time); >+- fprintf(checkresult_file_fp,"### %s Check Result ###\n",(svc_description=="")?"Host":"Service"); >++ fprintf(checkresult_file_fp,"file_time=%ld\n\n",current_time); >++ fprintf(checkresult_file_fp,"### %s Check Result ###\n",(!*svc_description)?"Host":"Service"); >+ fprintf(checkresult_file_fp,"host_name=%s\n",host_name); >+ if(strcmp(svc_description,"")) >+ fprintf(checkresult_file_fp,"service_description=%s\n",svc_description); >+@@ -1596,8 +1593,6 @@ static int get_group_info(const char *gr >+ >+ /* drops privileges */ >+ static int drop_privileges(const char *user, uid_t uid, gid_t gid){ >+- struct group *grp; >+- struct passwd *pw; >+ >+ /* only drop privileges if we're running as root, so we don't interfere with being debugged while running as some random user */ >+ if(getuid()!=0) >+@@ -1662,7 +1657,6 @@ void do_chroot(void){ >+ void sighandler(int sig){ >+ static char *sigs[]={"EXIT","HUP","INT","QUIT","ILL","TRAP","ABRT","BUS","FPE","KILL","USR1","SEGV","USR2","PIPE","ALRM","TERM","STKFLT","CHLD","CONT","STOP","TSTP","TTIN","TTOU","URG","XCPU","XFSZ","VTALRM","PROF","WINCH","IO","PWR","UNUSED","ZERR","DEBUG",(char *)NULL}; >+ int i; >+- char temp_buffer[MAX_INPUT_BUFFER]; >+ >+ if(sig<0) >+ sig=-sig; >+diff -up ./src/send_nsca.c.warnings ./src/send_nsca.c >+--- ./src/send_nsca.c.warnings 2018-07-28 09:06:28.848916866 -0400 >++++ ./src/send_nsca.c 2018-07-28 09:06:28.850916892 -0400 >+@@ -63,9 +63,7 @@ int main(int argc, char **argv){ >+ int result; >+ data_packet send_packet; >+ int bytes_to_send; >+- char input[MAX_INPUT_BUFFER]; >+ char input_buffer[MAX_INPUT_BUFFER]; >+- char *temp_ptr; >+ char host_name[MAX_HOSTNAME_LENGTH]; >+ char svc_description[MAX_DESCRIPTION_LENGTH]; >+ char plugin_output[MAX_PLUGINOUTPUT_LENGTH]; >+@@ -74,7 +72,7 @@ int main(int argc, char **argv){ >+ int total_packets=0; >+ int16_t return_code; >+ u_int32_t calculated_crc32; >+- char *inputptr, *ptr1, *ptr2, *ptr3, *ptr4; >++ char *ptr1, *ptr2, *ptr3, *ptr4; >+ #ifdef HAVE_SIGACTION >+ struct sigaction sig_action; >+ #endif >+@@ -386,7 +384,7 @@ int read_init_packet(int sock){ >+ >+ /* we couldn't read the correct amount of data, so bail out */ >+ else if(bytes_to_recv!=sizeof(receive_packet)){ >+- fprintf(stderr, "Error: Init packet from server was too short (%d bytes received, %d expected)\n",bytes_to_recv,sizeof(receive_packet)); >++ fprintf(stderr, "Error: Init packet from server was too short (%d bytes received, %lu expected)\n",bytes_to_recv,(unsigned long)sizeof(receive_packet)); >+ return ERROR; >+ } >+ >+@@ -507,7 +505,6 @@ void alarm_handler(int sig){ >+ int read_config_file(char *filename){ >+ FILE *fp; >+ char input_buffer[MAX_INPUT_BUFFER]; >+- char *temp_buffer; >+ char *varname; >+ char *varvalue; >+ int line; >diff --git a/nsca.spec b/nsca.spec >index ab93cdd..80a9156 100644 >--- a/nsca.spec >+++ b/nsca.spec >@@ -23,6 +23,7 @@ Patch1: nsca-2.9.2-send_nsca_confpath.patch > Patch2: nsca-2.9.2-Fix_buffer_overflow.patch > Patch3: nsca-2.9.2-Compat_2.7.patch > Patch4: nsca-2.9.2-IPv6_support.patch >+Patch5: nsca-2.9.2-warnings.patch > > BuildRequires: gcc > BuildRequires: libmcrypt-devel >@@ -46,8 +47,6 @@ plugins on a remote host in as transparent a manner as possible. > > %package client > Summary: Client application for sending updates to a nsca server >-Requires: nagios-common >- > > %description client > Client application for sending updates to a nsca server. >@@ -60,6 +59,7 @@ Client application for sending updates to a nsca server. > %patch3 -p1 -b .compat27 > %patch4 -p1 -b .ipv6 > %patch1 -p1 -b .confpath >+%patch5 -p1 -b .warnings > # Change defaults in the config file to match the nagios package > sed -i -e "s|^command_file=.*|command_file=%{_localstatedir}/spool/nagios/cmd/nagios.cmd|" \ > -e "s|^alternate_dump_file=.*|alternate_dump_file=%{_localstatedir}/spool/nagios/cmd/nsca.dump|" \ >@@ -128,6 +128,7 @@ fi > > %files client > %doc Changelog LEGAL README SECURITY >+%attr(0775,root,root) %dir %{_sysconfdir}/nagios > %attr(0600,root,root) %config(noreplace) %{_sysconfdir}/nagios/send_nsca.cfg > %{_sbindir}/send_nsca > >@@ -139,6 +140,7 @@ fi > - Fix a buffer overflow > - Compatibility with 2.7 > - IPv6 support >+ - remove Requires: nagios-common, make /etc/nagios match nagios-common > > * Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.2-6 > - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 1317083
:
1135430
|
1135431
| 1471265