Hello community, here is the log from the commit of package health-check for openSUSE:Factory checked in at 2019-06-17 10:34:06 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/health-check (Old) and /work/SRC/openSUSE:Factory/.health-check.new.4811 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "health-check" Mon Jun 17 10:34:06 2019 rev:6 rq:710106 version:0.03.01 Changes: -------- --- /work/SRC/openSUSE:Factory/health-check/health-check.changes 2018-07-12 09:21:32.162617506 +0200 +++ /work/SRC/openSUSE:Factory/.health-check.new.4811/health-check.changes 2019-06-17 10:34:24.757232026 +0200 @@ -1,0 +2,12 @@ +Fri Jun 14 22:04:13 UTC 2019 - Martin Hauke <mar...@gmx.de> + +- Update to version 0.03.01 + * Use safer strlcpy instead of strncpy + * Remove events.h and references to timer stats + * Fix buffer truncation warnings from gcc-9 + * Specify trusty in travis file + * Add older package name for json c +- Add BuildRequires: pkgconfig(libbsd) +- Use https for Source and URL + +------------------------------------------------------------------- Old: ---- health-check-0.03.00.tar.gz New: ---- health-check-0.03.01.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ health-check.spec ++++++ --- /var/tmp/diff_new_pack.xtdOaK/_old 2019-06-17 10:34:25.241231785 +0200 +++ /var/tmp/diff_new_pack.xtdOaK/_new 2019-06-17 10:34:25.241231785 +0200 @@ -1,7 +1,7 @@ # # spec file for package health-check # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2017, Martin Hauke <mar...@gmx.de> # # All modifications and additions to the file contributed by third parties @@ -13,20 +13,21 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # Name: health-check -Version: 0.03.00 +Version: 0.03.01 Release: 0 Summary: Process monitoring tool License: GPL-2.0-or-later Group: System/Monitoring -URL: http://kernel.ubuntu.com/~cking/health-check -Source: http://kernel.ubuntu.com/~cking/tarballs/%{name}/%{name}-%{version}.tar.gz +URL: https://kernel.ubuntu.com/~cking/health-check +Source: https://kernel.ubuntu.com/~cking/tarballs/%{name}/%{name}-%{version}.tar.gz BuildRequires: pkgconfig BuildRequires: pkgconfig(json-c) +BuildRequires: pkgconfig(libbsd) %description Health-check monitors processes and optionally their child ++++++ health-check-0.03.00.tar.gz -> health-check-0.03.01.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/health-check-0.03.00/.travis.yml new/health-check-0.03.01/.travis.yml --- old/health-check-0.03.00/.travis.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/health-check-0.03.01/.travis.yml 2019-06-14 15:18:49.000000000 +0200 @@ -0,0 +1,17 @@ +dist: trusty +sudo: required + +matrix: + include: + - env: PEDANTIC=1 + +before_install: + - sudo apt-get update -q + - sudo apt-get install build-essential + - sudo apt-get install libjson-c-dev || true + - sudo apt-get install libjson0-dev || true + +language: c + +script: +- make -j2 PEDANTIC=$PEDANTIC diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/health-check-0.03.00/Makefile new/health-check-0.03.01/Makefile --- old/health-check-0.03.00/Makefile 2018-06-16 20:55:48.000000000 +0200 +++ new/health-check-0.03.01/Makefile 2019-06-14 15:18:49.000000000 +0200 @@ -1,5 +1,5 @@ # -# Copyright (C) 2013-2018 Canonical, Ltd. +# Copyright (C) 2013-2019 Canonical, Ltd. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -15,7 +15,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # -VERSION=0.03.00 +VERSION=0.03.01 # # Codename "Where have all my cycles gone?" # @@ -34,7 +34,7 @@ -Wno-missing-braces -Wno-sign-compare -Wno-multichar endif -LDFLAGS += -lpthread +LDFLAGS += -lpthread -lbsd ifeq ($(JSON_OUTPUT),y) LDFLAGS += -ljson-c CFLAGS += -DJSON_OUTPUT @@ -62,12 +62,10 @@ ctxt-switch.o: ctxt-switch.c list.h json.h ctxt-switch.h health-check.h -event.o: event.c list.h json.h event.h health-check.h - fnotify.o: fnotify.c fnotify.h list.h json.h proc.h health-check.h health-check.o: health-check.c list.h json.h pid.h proc.h syscall.h timeval.h \ - fnotify.h event.h cpustat.h mem.h net.h ctxt-switch.h + fnotify.h cpustat.h mem.h net.h ctxt-switch.h json.o: json.c json.h health-check.h @@ -89,7 +87,8 @@ dist: rm -rf health-check-$(VERSION) mkdir health-check-$(VERSION) - cp -rp Makefile *.c *.h scripts health-check.8 COPYING health-check-$(VERSION) + cp -rp Makefile *.c *.h .travis.yml scripts health-check.8 \ + COPYING health-check-$(VERSION) tar -zcf health-check-$(VERSION).tar.gz health-check-$(VERSION) rm -rf health-check-$(VERSION) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/health-check-0.03.00/cpustat.c new/health-check-0.03.01/cpustat.c --- old/health-check-0.03.00/cpustat.c 2018-06-16 20:55:48.000000000 +0200 +++ new/health-check-0.03.01/cpustat.c 2019-06-14 15:18:49.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2013-2018 Canonical, Ltd. + * Copyright (C) 2013-2019 Canonical, Ltd. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/health-check-0.03.00/ctxt-switch.c new/health-check-0.03.01/ctxt-switch.c --- old/health-check-0.03.00/ctxt-switch.c 2018-06-16 20:55:48.000000000 +0200 +++ new/health-check-0.03.01/ctxt-switch.c 2019-06-14 15:18:49.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2013-2018 Canonical, Ltd. + * Copyright (C) 2013-2019 Canonical, Ltd. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/health-check-0.03.00/event.h new/health-check-0.03.01/event.h --- old/health-check-0.03.00/event.h 2018-06-16 20:55:48.000000000 +0200 +++ new/health-check-0.03.01/event.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,53 +0,0 @@ -/* - * Copyright (C) 2013-2016 Canonical, Ltd. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Author: Colin Ian King <colin.k...@canonical.com> - */ -#ifndef __EVENT_H__ -#define __EVENT_H__ - -#define _GNU_SOURCE - -#include "json.h" -#include "proc.h" -#include "list.h" - -#define TIMER_STATS "/proc/timer_stats" - -#if (defined(__x86_64__) || defined(__i386__) || defined(__arm__)) -#define EVENT_SUPPORTED 1 -#else -#define EVENT_SUPPORTED 0 -#endif - - -/* wakeup event information per process */ -typedef struct { - proc_info_t *proc; /* Proc specific info */ - char *func; /* Kernel waiting func */ - char *callback; /* Kernel timer callback func */ - char *ident; /* Unique identity */ - uint64_t count; /* Number of events */ -} event_info_t; - -extern int event_get_all_pids(const list_t *pids, proc_state state); -extern void event_dump_diff(json_object *j_tests, const double duration); -extern void event_stop(void); -extern void event_init(void); -extern void event_cleanup(void); - -#endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/health-check-0.03.00/fnotify.c new/health-check-0.03.01/fnotify.c --- old/health-check-0.03.00/fnotify.c 2018-06-16 20:55:48.000000000 +0200 +++ new/health-check-0.03.01/fnotify.c 2019-06-14 15:18:49.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2013-2018 Canonical, Ltd. + * Copyright (C) 2013-2019 Canonical, Ltd. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/health-check-0.03.00/health-check.8 new/health-check-0.03.01/health-check.8 --- old/health-check-0.03.00/health-check.8 2018-06-16 20:55:48.000000000 +0200 +++ new/health-check-0.03.01/health-check.8 2019-06-14 15:18:49.000000000 +0200 @@ -89,7 +89,7 @@ This manual page was written by Colin King <colin.k...@canonical.com>, for the Ubuntu project (but may be used by others). .SH COPYRIGHT -Copyright \(co 2014-2018 Canonical Ltd. +Copyright \(co 2014-2019 Canonical Ltd. .br This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/health-check-0.03.00/health-check.c new/health-check-0.03.01/health-check.c --- old/health-check-0.03.00/health-check.c 2018-06-16 20:55:48.000000000 +0200 +++ new/health-check-0.03.01/health-check.c 2019-06-14 15:18:49.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2013-2018 Canonical, Ltd. + * Copyright (C) 2013-2019 Canonical, Ltd. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -37,6 +37,7 @@ #include <limits.h> #include <grp.h> #include <pwd.h> +#include <bsd/string.h> #include "list.h" #include "json.h" @@ -45,7 +46,6 @@ #include "syscall.h" #include "timeval.h" #include "fnotify.h" -#include "event.h" #include "cpustat.h" #include "mem.h" #include "net.h" @@ -320,7 +320,7 @@ fprintf(stderr, "executable name too long.\n"); health_check_exit(EXIT_FAILURE); } - strncpy(path, filename, sizeof(path) - 1); + strlcpy(path, filename, sizeof(path) - 1); if (is_executable(path)) return path; else @@ -346,7 +346,7 @@ continue; /* Too long */ else { pathlen = len; - strncpy(path, p, pathlen); + strlcpy(path, p, pathlen); } } else { if (getcwd(p, PATH_MAX) == NULL) @@ -477,8 +477,8 @@ } if ((getuid() !=0 ) || (geteuid() != 0)) { - fprintf(stderr, "%s requires root privileges to write to %s\n", - APP_NAME, TIMER_STATS); + fprintf(stderr, "%s requires root trace processes\n", + APP_NAME); health_check_exit(EXIT_FAILURE); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/health-check-0.03.00/json.c new/health-check-0.03.01/json.c --- old/health-check-0.03.00/json.c 2018-06-16 20:55:48.000000000 +0200 +++ new/health-check-0.03.01/json.c 2019-06-14 15:18:49.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2013-2018 Canonical, Ltd. + * Copyright (C) 2013-2019 Canonical, Ltd. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/health-check-0.03.00/list.c new/health-check-0.03.01/list.c --- old/health-check-0.03.00/list.c 2018-06-16 20:55:48.000000000 +0200 +++ new/health-check-0.03.01/list.c 2019-06-14 15:18:49.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2013-2018 Canonical, Ltd. + * Copyright (C) 2013-2019 Canonical, Ltd. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/health-check-0.03.00/mem.c new/health-check-0.03.01/mem.c --- old/health-check-0.03.00/mem.c 2018-06-16 20:55:48.000000000 +0200 +++ new/health-check-0.03.01/mem.c 2019-06-14 15:18:49.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2013-2018 Canonical, Ltd. + * Copyright (C) 2013-2019 Canonical, Ltd. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/health-check-0.03.00/net.c new/health-check-0.03.01/net.c --- old/health-check-0.03.00/net.c 2018-06-16 20:55:48.000000000 +0200 +++ new/health-check-0.03.01/net.c 2019-06-14 15:18:49.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2013-2018 Canonical, Ltd. + * Copyright (C) 2013-2019 Canonical, Ltd. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -30,6 +30,7 @@ #include <arpa/inet.h> #include <netdb.h> #include <dirent.h> +#include <bsd/string.h> #include "list.h" #include "proc.h" @@ -37,10 +38,6 @@ #include "health-check.h" #include "net.h" -#ifndef LINE_MAX -#define LINE_MAX (4096) -#endif - #define NET_HASH_SIZE (1993) typedef struct { @@ -137,7 +134,7 @@ return NULL; } - strncpy(n->path, path, PATH_MAX); + strlcpy(n->path, path, PATH_MAX); n->inode = inode; n->proc = proc_cache_find_by_pid(pid); n->fd = fd; @@ -247,7 +244,7 @@ while ((d = readdir(fds)) != NULL) { uint64_t inode; - char tmp[LINE_MAX]; + char tmp[PATH_MAX + sizeof(d->d_name) + 2]; char link[PATH_MAX]; uint32_t fd; @@ -301,7 +298,7 @@ if (getnameinfo((struct sockaddr *)sin, sizeof(*sin), name, len, NULL, 0, NI_NUMERICHOST) == 0) return; - strncpy(name, "<unknown>", len); + strlcpy(name, "<unknown>", len); return; } @@ -319,7 +316,7 @@ if (getnameinfo((struct sockaddr *)sin6, sizeof(*sin6), name, len, NULL, 0, NI_NUMERICHOST) == 0) return; - strncpy(name, "<unknown>", len); + strlcpy(name, "<unknown>", len); return; } @@ -359,8 +356,8 @@ */ static char *net_get_addr(net_addr_info_t *addr_info) { - static char tmp[256]; char buf[4096]; + static char tmp[sizeof(buf) + 16]; in_port_t port; switch (addr_info->type) { @@ -524,7 +521,7 @@ memset(&new_addr, 0, sizeof(new_addr)); new_addr.inode = nh->inode; new_addr.type = NET_UNKNOWN; - strncpy(new_addr.u.path, nh->path, PATH_MAX); + strlcpy(new_addr.u.path, nh->path, sizeof(new_addr.u.path)); if ((addr_info = net_addr_add(&new_addr)) == NULL) goto out; } @@ -635,7 +632,7 @@ memset(&new_addr, 0, sizeof(new_addr)); new_addr.inode = inode; new_addr.type = NET_UNIX; - strncpy(new_addr.u.path, path, PATH_MAX); + strlcpy(new_addr.u.path, path, PATH_MAX); net_addr_add(&new_addr); } (void)fclose(fp); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/health-check-0.03.00/pid.c new/health-check-0.03.01/pid.c --- old/health-check-0.03.00/pid.c 2018-06-16 20:55:48.000000000 +0200 +++ new/health-check-0.03.01/pid.c 2019-06-14 15:18:49.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2013-2018 Canonical, Ltd. + * Copyright (C) 2013-2019 Canonical, Ltd. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/health-check-0.03.00/proc.c new/health-check-0.03.01/proc.c --- old/health-check-0.03.00/proc.c 2018-06-16 20:55:48.000000000 +0200 +++ new/health-check-0.03.01/proc.c 2019-06-14 15:18:49.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2013-2018 Canonical, Ltd. + * Copyright (C) 2013-2019 Canonical, Ltd. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/health-check-0.03.00/syscall.c new/health-check-0.03.01/syscall.c --- old/health-check-0.03.00/syscall.c 2018-06-16 20:55:48.000000000 +0200 +++ new/health-check-0.03.01/syscall.c 2019-06-14 15:18:49.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2013-2018 Canonical, Ltd. + * Copyright (C) 2013-2019 Canonical, Ltd. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -2221,7 +2221,7 @@ s->proc->cmdline, tmp, rate, s->poll_infinite, s->poll_zero); if (s->poll_count) { - char min_timeout[64], max_timeout[64], avg_timeout[64]; + char min_timeout[70], max_timeout[70], avg_timeout[70]; units = syscall_timeout_to_human_time(s->poll_min < 0.0 ? 0.0 : s->poll_min, false, tmp, sizeof(tmp)); snprintf(min_timeout, sizeof(min_timeout), "%s %-4s", tmp, units); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/health-check-0.03.00/timeval.c new/health-check-0.03.01/timeval.c --- old/health-check-0.03.00/timeval.c 2018-06-16 20:55:48.000000000 +0200 +++ new/health-check-0.03.01/timeval.c 2019-06-14 15:18:49.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2013-2018 Canonical, Ltd. + * Copyright (C) 2013-2019 Canonical, Ltd. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License