Hello community,

here is the log from the commit of package mcstrans for openSUSE:Factory 
checked in at 2020-10-06 17:07:37
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/mcstrans (Old)
 and      /work/SRC/openSUSE:Factory/.mcstrans.new.4249 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "mcstrans"

Tue Oct  6 17:07:37 2020 rev:25 rq:832094 version:3.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/mcstrans/mcstrans.changes        2020-03-08 
22:23:58.704071575 +0100
+++ /work/SRC/openSUSE:Factory/.mcstrans.new.4249/mcstrans.changes      
2020-10-06 17:09:34.353447588 +0200
@@ -1,0 +2,6 @@
+Tue Jul 14 08:34:48 UTC 2020 - Johannes Segitz <[email protected]>
+
+- Update to version 3.1
+  * fix memory leak in new_context_str
+
+-------------------------------------------------------------------

Old:
----
  mcstrans-3.0.tar.gz

New:
----
  mcstrans-3.1.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ mcstrans.spec ++++++
--- /var/tmp/diff_new_pack.wv4YVK/_old  2020-10-06 17:09:34.909448068 +0200
+++ /var/tmp/diff_new_pack.wv4YVK/_new  2020-10-06 17:09:34.913448072 +0200
@@ -17,13 +17,13 @@
 
 
 Name:           mcstrans
-Version:        3.0
+Version:        3.1
 Release:        0
 Summary:        SELinux Translation Daemon
 License:        GPL-2.0-or-later
 Group:          System/Management
 URL:            https://github.com/SELinuxProject/selinux/wiki
-Source:         
https://github.com/SELinuxProject/selinux/releases/download/20191204/%{name}-%{version}.tar.gz
+Source:         
https://github.com/SELinuxProject/selinux/releases/download/20200710/%{name}-%{version}.tar.gz
 Patch0:         %{name}-writepid.patch
 Patch1:         add_includes.patch
 BuildRequires:  aaa_base

++++++ mcstrans-3.0.tar.gz -> mcstrans-3.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mcstrans-3.0/VERSION new/mcstrans-3.1/VERSION
--- old/mcstrans-3.0/VERSION    2019-11-28 13:46:48.000000000 +0100
+++ new/mcstrans-3.1/VERSION    2020-07-10 17:17:15.000000000 +0200
@@ -1 +1 @@
-3.0
+3.1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mcstrans-3.0/src/mcscolor.c 
new/mcstrans-3.1/src/mcscolor.c
--- old/mcstrans-3.0/src/mcscolor.c     2019-11-28 13:46:48.000000000 +0100
+++ new/mcstrans-3.1/src/mcscolor.c     2020-07-10 17:17:15.000000000 +0200
@@ -44,7 +44,7 @@
 static setab_t *cend[N_COLOR];
 static semnemonic_t *mnemonics;
 
-static security_context_t my_context;
+static char *my_context;
 
 void finish_context_colors(void) {
        setab_t *cur, *next;
@@ -76,7 +76,7 @@
 }
 
 static int check_dominance(const char *pattern, const char *raw) {
-       security_context_t ctx;
+       char *ctx;
        context_t con;
        struct av_decision avd;
        int rc = -1;
@@ -109,7 +109,7 @@
        if (!raw)
                goto out;
 
-       rc = security_compute_av_raw(ctx, (security_context_t)raw, 
context_class, context_contains_perm, &avd);
+       rc = security_compute_av_raw(ctx, raw, context_class, 
context_contains_perm, &avd);
        if (rc)
                goto out;
 
@@ -282,7 +282,7 @@
 
 /* Look up colors.
  */
-int raw_color(const security_context_t raw, char **color_str) {
+int raw_color(const char *raw, char **color_str) {
 #define CHARS_PER_COLOR 16
        context_t con;
        uint32_t i, j, mask = 0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mcstrans-3.0/src/mcstrans.c 
new/mcstrans-3.1/src/mcstrans.c
--- old/mcstrans-3.0/src/mcstrans.c     2019-11-28 13:46:48.000000000 +0100
+++ new/mcstrans-3.1/src/mcstrans.c     2020-07-10 17:17:15.000000000 +0200
@@ -7,8 +7,8 @@
 
  int init_translations(void);
  void finish_context_translations(void);
- int trans_context(const security_context_t, security_context_t *);
- int untrans_context(const security_context_t, security_context_t *);
+ int trans_context(const char *, char **);
+ int untrans_context(const char *, char **);
 
 */
 
@@ -888,7 +888,7 @@
 }
 
 char *
-extract_range(const security_context_t incon) {
+extract_range(const char *incon) {
        context_t con = context_new(incon);
        if (!con) {
                syslog(LOG_ERR, "extract_range context_new(%s) failed: %s", 
incon, strerror(errno));
@@ -911,7 +911,7 @@
 }
 
 char *
-new_context_str(const security_context_t incon, const char *range) {
+new_context_str(const char *incon, const char *range) {
        char *rcon = NULL;
        context_t con = context_new(incon);
        if (!con) {
@@ -919,6 +919,7 @@
        }
        context_range_set(con, range);
        rcon = strdup(context_str(con));
+       context_free(con);
        if (!rcon) {
                goto exit;
        }
@@ -1489,7 +1490,7 @@
 }
 
 int
-trans_context(const security_context_t incon, security_context_t *rcon) {
+trans_context(const char *incon, char **rcon) {
        char *trans = NULL;
        *rcon = NULL;
 
@@ -1612,7 +1613,7 @@
 }
 
 int
-untrans_context(const security_context_t incon, security_context_t *rcon) {
+untrans_context(const char *incon, char **rcon) {
        char *raw = NULL;
        *rcon = NULL;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mcstrans-3.0/src/mcstrans.h 
new/mcstrans-3.1/src/mcstrans.h
--- old/mcstrans-3.0/src/mcstrans.h     2019-11-28 13:46:48.000000000 +0100
+++ new/mcstrans-3.1/src/mcstrans.h     2020-07-10 17:17:15.000000000 +0200
@@ -4,6 +4,6 @@
 
 extern int init_translations(void);
 extern void finish_context_translations(void);
-extern int trans_context(const security_context_t, security_context_t *);
-extern int untrans_context(const security_context_t, security_context_t *);
+extern int trans_context(const char *, char **);
+extern int untrans_context(const char *, char **);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mcstrans-3.0/src/mcstrans.service 
new/mcstrans-3.1/src/mcstrans.service
--- old/mcstrans-3.0/src/mcstrans.service       2019-11-28 13:46:48.000000000 
+0100
+++ new/mcstrans-3.1/src/mcstrans.service       2020-07-10 17:17:15.000000000 
+0200
@@ -2,6 +2,9 @@
 Description=Translates SELinux MCS/MLS labels to human readable form
 Documentation=man:mcstransd(8)
 ConditionSecurity=selinux
+DefaultDependencies=no
+Before=shutdown.target sysinit.target
+Conflicts=shutdown.target
 
 [Service]
 ExecStart=/sbin/mcstransd -f
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mcstrans-3.0/src/mcstransd.c 
new/mcstrans-3.1/src/mcstransd.c
--- old/mcstrans-3.0/src/mcstransd.c    2019-11-28 13:46:48.000000000 +0100
+++ new/mcstrans-3.1/src/mcstransd.c    2020-07-10 17:17:15.000000000 +0200
@@ -45,12 +45,12 @@
 
 extern int init_translations(void);
 extern void finish_context_translations(void);
-extern int trans_context(const security_context_t, security_context_t *);
-extern int untrans_context(const security_context_t, security_context_t *);
+extern int trans_context(const char *, char **);
+extern int untrans_context(const char *, char **);
 
 extern int init_colors(void);
 extern void finish_context_colors(void);
-extern int raw_color(const security_context_t, char **);
+extern int raw_color(const char *, char **);
 
 #define SETRANSD_PATHNAME "/sbin/mcstransd"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mcstrans-3.0/utils/transcon.c 
new/mcstrans-3.1/utils/transcon.c
--- old/mcstrans-3.0/utils/transcon.c   2019-11-28 13:46:48.000000000 +0100
+++ new/mcstrans-3.1/utils/transcon.c   2020-07-10 17:17:15.000000000 +0200
@@ -14,7 +14,7 @@
 }
 
 int main(int argc, char **argv) {
-       security_context_t scon;
+       char *scon;
        if ( argc != 2 ) usage(argv[0]);
        if (init_translations()==0) {
                if(trans_context(argv[1],&scon) == 0) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mcstrans-3.0/utils/untranscon.c 
new/mcstrans-3.1/utils/untranscon.c
--- old/mcstrans-3.0/utils/untranscon.c 2019-11-28 13:46:48.000000000 +0100
+++ new/mcstrans-3.1/utils/untranscon.c 2020-07-10 17:17:15.000000000 +0200
@@ -13,7 +13,7 @@
        exit(1);
 }
 int main(int argc, char **argv) {
-       security_context_t scon;
+       char *scon;
        if ( argc != 2 ) usage(argv[0]);
        if (init_translations()==0) {
                if(untrans_context(argv[1],&scon) == 0) {


Reply via email to