debian/0000775000000000000000000000000012317324274007175 5ustar debian/libservicelog-1.1-1.install0000664000000000000000000000004212317320336014040 0ustar usr/lib/*/libservicelog-1.1.so.1* debian/source/0000775000000000000000000000000012317324274010475 5ustar debian/source/format0000664000000000000000000000001412317126011011670 0ustar 3.0 (quilt) debian/copyright0000664000000000000000000000211212317131543011117 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: libservicelog Upstream-Contact: Vasant Hegde1 Source: http://sourceforge.net/projects/linux-diag/files/libservicelog/ Files: * Copyright: 2005-2013 IBM Corporation License: LGPL-2+ This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library 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 Library General Public License for more details. . You should have received a copy of the GNU Library General Public Licence along with this program; if not, see . . On Debian systems, the full text of the GNU Library General Public License version 2 can be found in the file `/usr/share/common-licenses/LGPL-2'. debian/changelog0000664000000000000000000000040612317324266011050 0ustar libservicelog (1.1.14-0ubuntu1) trusty; urgency=low [ Frédéric Bonnard ] * Initial release. [ Dimitri John Ledkov ] * Improve initial packaging. * Add myself to uploaders. -- Dimitri John Ledkov Thu, 03 Apr 2014 19:30:14 +0100 debian/control0000664000000000000000000000270412317317152010600 0ustar Source: libservicelog Section: libdevel Priority: extra Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Frederic Bonnard Uploaders: Dimitri John Ledkov Build-Depends: debhelper (>= 9.0.0), dh-autoreconf, libsqlite3-dev, librtasevent-dev, librtas-dev Standards-Version: 3.9.5 Homepage: http://sourceforge.net/projects/linux-diag/files/libservicelog/ Package: libservicelog-1.1-1 Architecture: powerpc ppc64el Multi-Arch: same Depends: ${shlibs:Depends}, ${misc:Depends} Description: Library to create and maintain a database for storing events The libservicelog package contains a library to create and maintain a database for storing events related to system service. This database allows for the logging of serviceable and informational events, and for the logging of service procedures that have been performed upon the system. Package: libservicelog-dev Architecture: powerpc ppc64el Multi-Arch: same Depends: libservicelog-1.1-1 (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} Description: libservicelog development files The libservicelog package contains a library to create and maintain a database for storing events related to system service. This database allows for the logging of serviceable and informational events, and for the logging of service procedures that have been performed upon the system. . This package provides development headers. debian/libservicelog-1.1-1.postinst0000664000000000000000000000243012317324174014264 0ustar #!/bin/sh # postinst script for #PACKAGE# # # see: dh_installdeb(1) set -e # summary of how this script can be called: # * `configure' # * `abort-upgrade' # * `abort-remove' `in-favour' # # * `abort-remove' # * `abort-deconfigure' `in-favour' # `removing' # # for details, see http://www.debian.org/doc/debian-policy/ or # the debian-policy package case "$1" in configure) [ -d /var/lib/servicelog ] || mkdir -p /var/lib/servicelog [ -e /var/lib/servicelog/servicelog.db ] || touch /var/lib/servicelog/servicelog.db chown root:adm /var/lib/servicelog chmod 754 /var/lib/servicelog chown root:adm /var/lib/servicelog/servicelog.db chmod 644 /var/lib/servicelog/servicelog.db ;; abort-upgrade|abort-remove|abort-deconfigure) ;; *) echo "postinst called with unknown argument \`$1'" >&2 exit 1 ;; esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# exit 0 debian/rules0000775000000000000000000000010212317321604010240 0ustar #!/usr/bin/make -f export DH_OPTIONS %: dh $@ --with autoreconf debian/watch0000664000000000000000000000014412317126011010212 0ustar version=3 http://sf.net/linux-diag/libservicelog-(\d\S*).(?:zip|tgz|tbz|txz|(?:tar\.(?:gz|bz2|xz))) debian/libservicelog-dev.install0000664000000000000000000000011512317127101014155 0ustar usr/include/servicelog-1/ usr/lib/*/pkgconfig/servicelog-1.pc usr/lib/*/*.so debian/patches/0000775000000000000000000000000012317324274010624 5ustar debian/patches/000_hardened_build0000664000000000000000000000453612317127654014072 0ustar Description: fix hardening bugs due to missing formatting strings Forwarded: Unknown Author: Frédéric Bonnard --- a/src/servicelog.c +++ b/src/servicelog.c @@ -279,7 +279,7 @@ if (newline != NULL) { prnt_len = newline - &tmpbuf[offset] + 1; snprintf(buf + buf_offset, prnt_len, - &tmpbuf[offset]); + "%s", &tmpbuf[offset]); buf_offset = strlen(buf); buf_offset += sprintf(buf + buf_offset, "\n"); offset += prnt_len; @@ -297,7 +297,7 @@ } /* print up to the last brkpt */ - snprintf(buf + buf_offset, prnt_len, &tmpbuf[offset]); + snprintf(buf + buf_offset, prnt_len, "%s", &tmpbuf[offset]); buf_offset = strlen(buf); buf_offset += sprintf(buf + buf_offset, "\n"); offset += prnt_len; @@ -305,10 +305,10 @@ } } - prnt_len = sprintf(buf + buf_offset, &tmpbuf[offset]); + prnt_len = sprintf(buf + buf_offset, "%s", &tmpbuf[offset]); line_offset += prnt_len; - return fprintf(stream, buf); + return fprintf(stream, "%s", buf); } /** @@ -583,7 +583,7 @@ rc = sqlite3_open(log->location, &(log->db)); if (rc) { - snprintf(log->error, SL_MAX_ERR, sqlite3_errmsg(log->db)); + snprintf(log->error, SL_MAX_ERR, "%s", sqlite3_errmsg(log->db)); servicelog_close(log); return ENOENT; } --- a/src/v29_print.c +++ b/src/v29_print.c @@ -152,7 +152,7 @@ if (newline != NULL) { prnt_len = newline - &tmpbuf[offset] + 1; - snprintf(buf + buf_offset, prnt_len, &tmpbuf[offset]); + snprintf(buf + buf_offset, prnt_len, "%s", &tmpbuf[offset]); buf_offset = strlen(buf); buf_offset += sprintf(buf + buf_offset, "\n"); offset += prnt_len; @@ -171,7 +171,7 @@ } /* print up to the last brkpt */ - snprintf(buf + buf_offset, prnt_len, &tmpbuf[offset]); + snprintf(buf + buf_offset, prnt_len, "%s", &tmpbuf[offset]); buf_offset = strlen(buf); buf_offset += sprintf(buf + buf_offset, "\n"); offset += prnt_len; @@ -180,10 +180,10 @@ } - prnt_len = sprintf(buf + buf_offset, &tmpbuf[offset]); + prnt_len = sprintf(buf + buf_offset, "%s", &tmpbuf[offset]); line_offset += prnt_len; - len = fprintf(stream, buf); + len = fprintf(stream, "%s", buf); return len; } debian/patches/series0000664000000000000000000000002312317126011012021 0ustar 000_hardened_build debian/compat0000664000000000000000000000000212317126011010360 0ustar 9