Hello community,

here is the log from the commit of package nss_wrapper for openSUSE:Factory 
checked in at 2019-11-18 19:57:31
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/nss_wrapper (Old)
 and      /work/SRC/openSUSE:Factory/.nss_wrapper.new.26869 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "nss_wrapper"

Mon Nov 18 19:57:31 2019 rev:9 rq:748050 version:1.1.7

Changes:
--------
--- /work/SRC/openSUSE:Factory/nss_wrapper/nss_wrapper.changes  2019-08-24 
18:42:36.861779232 +0200
+++ /work/SRC/openSUSE:Factory/.nss_wrapper.new.26869/nss_wrapper.changes       
2019-11-18 19:57:35.361978497 +0100
@@ -1,0 +2,8 @@
+Wed Nov 13 07:46:15 UTC 2019 - Andreas Schneider <a...@cryptomilk.org>
+
+- Update to version 1.1.7
+  * Added NSS_WRAPPER_DISABLE_DEEPBIND env variable
+  * Improvded logging
+  * Fixed location in cmake config
+
+-------------------------------------------------------------------

Old:
----
  nss_wrapper-1.1.6.tar.gz
  nss_wrapper-1.1.6.tar.gz.asc

New:
----
  nss_wrapper-1.1.7.tar.gz
  nss_wrapper-1.1.7.tar.gz.asc

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

Other differences:
------------------
++++++ nss_wrapper.spec ++++++
--- /var/tmp/diff_new_pack.WRkPcr/_old  2019-11-18 19:57:36.697977826 +0100
+++ /var/tmp/diff_new_pack.WRkPcr/_new  2019-11-18 19:57:36.701977825 +0100
@@ -24,7 +24,7 @@
 ############################# NOTE ##################################
 
 Name:           nss_wrapper
-Version:        1.1.6
+Version:        1.1.7
 Release:        0
 
 Summary:        A wrapper for the user, group and hosts NSS API

++++++ nss_wrapper-1.1.6.tar.gz -> nss_wrapper-1.1.7.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nss_wrapper-1.1.6/.ycm_extra_conf.py 
new/nss_wrapper-1.1.7/.ycm_extra_conf.py
--- old/nss_wrapper-1.1.6/.ycm_extra_conf.py    2014-04-04 09:21:24.000000000 
+0200
+++ new/nss_wrapper-1.1.7/.ycm_extra_conf.py    1970-01-01 01:00:00.000000000 
+0100
@@ -1,104 +0,0 @@
-import os
-import ycm_core
-
-flags = [
-]
-
-# Set this to the absolute path to the folder (NOT the file!) containing the
-# compile_commands.json file to use that instead of 'flags'. See here for
-# more details: http://clang.llvm.org/docs/JSONCompilationDatabase.html
-#
-# Most projects will NOT need to set this to anything; you can just change the
-# 'flags' list of compilation flags. Notice that YCM itself uses that approach.
-compilation_database_folder = 'obj'
-
-if os.path.exists( compilation_database_folder ):
-  database = ycm_core.CompilationDatabase( compilation_database_folder )
-else:
-  database = None
-
-SOURCE_EXTENSIONS = [ '.cpp', '.cxx', '.cc', '.c', '.m', '.mm' ]
-
-def DirectoryOfThisScript():
-  return os.path.dirname( os.path.abspath( __file__ ) )
-
-
-def MakeRelativePathsInFlagsAbsolute( flags, working_directory ):
-  if not working_directory:
-    return list( flags )
-  new_flags = []
-  make_next_absolute = False
-  path_flags = [ '-isystem', '-I', '-iquote', '--sysroot=' ]
-  for flag in flags:
-    new_flag = flag
-
-    if make_next_absolute:
-      make_next_absolute = False
-      if not flag.startswith( '/' ):
-        new_flag = os.path.join( working_directory, flag )
-
-    for path_flag in path_flags:
-      if flag == path_flag:
-        make_next_absolute = True
-        break
-
-      if flag.startswith( path_flag ):
-        path = flag[ len( path_flag ): ]
-        new_flag = path_flag + os.path.join( working_directory, path )
-        break
-
-    if new_flag:
-      new_flags.append( new_flag )
-  return new_flags
-
-
-def IsHeaderFile( filename ):
-  extension = os.path.splitext( filename )[ 1 ]
-  return extension in [ '.h', '.hxx', '.hpp', '.hh' ]
-
-
-def GetCompilationInfoForFile( filename ):
-  # The compilation_commands.json file generated by CMake does not have entries
-  # for header files. So we do our best by asking the db for flags for a
-  # corresponding source file, if any. If one exists, the flags for that file
-  # should be good enough.
-  if IsHeaderFile( filename ):
-    basename = os.path.splitext( filename )[ 0 ]
-    for extension in SOURCE_EXTENSIONS:
-      replacement_file = basename + extension
-      if os.path.exists( replacement_file ):
-        compilation_info = database.GetCompilationInfoForFile(
-          replacement_file )
-        if compilation_info.compiler_flags_:
-          return compilation_info
-    return None
-  return database.GetCompilationInfoForFile( filename )
-
-
-def FlagsForFile( filename, **kwargs ):
-  if database:
-    # Bear in mind that compilation_info.compiler_flags_ does NOT return a
-    # python list, but a "list-like" StringVec object
-    compilation_info = GetCompilationInfoForFile( filename )
-    if not compilation_info:
-      return None
-
-    final_flags = MakeRelativePathsInFlagsAbsolute(
-      compilation_info.compiler_flags_,
-      compilation_info.compiler_working_dir_ )
-
-    # NOTE: This is just for YouCompleteMe; it's highly likely that your 
project
-    # does NOT need to remove the stdlib flag. DO NOT USE THIS IN YOUR
-    # ycm_extra_conf IF YOU'RE NOT 100% SURE YOU NEED IT.
-    try:
-      final_flags.remove( '-stdlib=libc++' )
-    except ValueError:
-      pass
-  else:
-    relative_to = DirectoryOfThisScript()
-    final_flags = MakeRelativePathsInFlagsAbsolute( flags, relative_to )
-
-  return {
-    'flags': final_flags,
-    'do_cache': True
-  }
Binary files old/nss_wrapper-1.1.6/.ycm_extra_conf.pyc and 
new/nss_wrapper-1.1.7/.ycm_extra_conf.pyc differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nss_wrapper-1.1.6/CMakeLists.txt 
new/nss_wrapper-1.1.7/CMakeLists.txt
--- old/nss_wrapper-1.1.6/CMakeLists.txt        2019-05-17 07:45:09.000000000 
+0200
+++ new/nss_wrapper-1.1.7/CMakeLists.txt        2019-11-11 15:46:02.000000000 
+0100
@@ -11,7 +11,7 @@
 include(DefineCMakeDefaults)
 include(DefineCompilerFlags)
 
-project(nss_wrapper VERSION 1.1.6 LANGUAGES C)
+project(nss_wrapper VERSION 1.1.7 LANGUAGES C)
 
 # global needed variables
 set(APPLICATION_NAME ${PROJECT_NAME})
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nss_wrapper-1.1.6/ChangeLog 
new/nss_wrapper-1.1.7/ChangeLog
--- old/nss_wrapper-1.1.6/ChangeLog     2019-05-17 07:45:09.000000000 +0200
+++ new/nss_wrapper-1.1.7/ChangeLog     2019-11-11 15:45:48.000000000 +0100
@@ -1,6 +1,11 @@
 ChangeLog
 ==========
 
+version 1.1.7 (released 2019-11-11)
+  * Added NSS_WRAPPER_DISABLE_DEEPBIND env variable
+  * Improvded logging
+  * Fixed location in cmake config
+
 version 1.1.6 (released 2019-05-19)
   * Fixed issues with memory alignment of getgrnam()
   * Fixed getpwnam() on FreeBSD
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nss_wrapper-1.1.6/ConfigureChecks.cmake 
new/nss_wrapper-1.1.7/ConfigureChecks.cmake
--- old/nss_wrapper-1.1.6/ConfigureChecks.cmake 2019-02-28 12:50:00.000000000 
+0100
+++ new/nss_wrapper-1.1.7/ConfigureChecks.cmake 2019-11-11 15:44:13.000000000 
+0100
@@ -78,6 +78,9 @@
 
 check_function_exists(gethostbyname2 HAVE_GETHOSTBYNAME2)
 
+check_function_exists(getprogname HAVE_GETPROGNAME)
+check_function_exists(getexecname HAVE_GETEXECNAME)
+
 if (WIN32)
     check_function_exists(_vsnprintf_s HAVE__VSNPRINTF_S)
     check_function_exists(_vsnprintf HAVE__VSNPRINTF)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nss_wrapper-1.1.6/TODO new/nss_wrapper-1.1.7/TODO
--- old/nss_wrapper-1.1.6/TODO  2017-03-27 16:21:56.000000000 +0200
+++ new/nss_wrapper-1.1.7/TODO  2019-07-15 08:10:34.000000000 +0200
@@ -3,7 +3,7 @@
 
 Library
 --------
-* None at the moment.
+* Replace hcreate() as it messes with applications also using it.
 
 Testing
 --------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nss_wrapper-1.1.6/config.h.cmake 
new/nss_wrapper-1.1.7/config.h.cmake
--- old/nss_wrapper-1.1.6/config.h.cmake        2019-02-28 12:50:00.000000000 
+0100
+++ new/nss_wrapper-1.1.7/config.h.cmake        2019-11-11 15:44:13.000000000 
+0100
@@ -59,6 +59,9 @@
 /* Define to 1 if you have the `gethostbyname2' function. */
 #cmakedefine HAVE_GETHOSTBYNAME2 1
 
+#cmakedefine HAVE_GETPROGNAME 1
+#cmakedefine HAVE_GETEXECNAME 1
+
 #cmakedefine HAVE___POSIX_GETPWNAM_R 1
 #cmakedefine HAVE___POSIX_GETPWUID_R 1
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nss_wrapper-1.1.6/doc/nss_wrapper.1 
new/nss_wrapper-1.1.7/doc/nss_wrapper.1
--- old/nss_wrapper-1.1.6/doc/nss_wrapper.1     2015-11-11 11:51:25.000000000 
+0100
+++ new/nss_wrapper-1.1.7/doc/nss_wrapper.1     2019-07-15 08:10:34.000000000 
+0200
@@ -1,13 +1,13 @@
 '\" t
 .\"     Title: nss_wrapper
-.\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\"      Date: 2015-09-12
+.\"    Author: Samba Team
+.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
+.\"      Date: 2019-05-21
 .\"    Manual: \ \&
 .\"    Source: \ \&
 .\"  Language: English
 .\"
-.TH "NSS_WRAPPER" "1" "2015\-09\-12" "\ \&" "\ \&"
+.TH "NSS_WRAPPER" "1" "2019\-05\-21" "\ \&" "\ \&"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -162,6 +162,11 @@
 3 = TRACE
 .RE
 .RE
+.PP
+\fBNSS_WRAPPER_DISABLE_DEEPBIND\fR
+.RS 4
+This allows you to disable deep binding in nss_wrapper\&. This is useful for 
running valgrind tools or sanitizers like (address, undefined, thread)\&.
+.RE
 .SH "EXAMPLE"
 .sp
 .if n \{\
@@ -181,3 +186,9 @@
 .if n \{\
 .RE
 .\}
+.SH "AUTHOR"
+.PP
+\fBSamba Team\fR
+.RS 4
+Author.
+.RE
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nss_wrapper-1.1.6/doc/nss_wrapper.1.txt 
new/nss_wrapper-1.1.7/doc/nss_wrapper.1.txt
--- old/nss_wrapper-1.1.6/doc/nss_wrapper.1.txt 2015-11-11 11:51:25.000000000 
+0100
+++ new/nss_wrapper-1.1.7/doc/nss_wrapper.1.txt 2019-07-15 08:10:34.000000000 
+0200
@@ -1,6 +1,7 @@
 nss_wrapper(1)
 ==============
-:revdate: 2015-09-12
+:revdate: 2019-05-21
+:author: Samba Team
 
 NAME
 ----
@@ -90,6 +91,11 @@
 - 2 = DEBUG
 - 3 = TRACE
 
+*NSS_WRAPPER_DISABLE_DEEPBIND*::
+
+This allows you to disable deep binding in nss_wrapper. This is useful for
+running valgrind tools or sanitizers like (address, undefined, thread).
+
 EXAMPLE
 -------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nss_wrapper-1.1.6/nss_wrapper-config.cmake.in 
new/nss_wrapper-1.1.7/nss_wrapper-config.cmake.in
--- old/nss_wrapper-1.1.6/nss_wrapper-config.cmake.in   2019-02-28 
12:50:00.000000000 +0100
+++ new/nss_wrapper-1.1.7/nss_wrapper-config.cmake.in   2019-11-06 
18:43:55.000000000 +0100
@@ -1 +1 @@
-set(NSS_WRAPPER_LIBRARY @CMAKE_INSTALL_LIBDIR@/@NSS_WRAPPER_LIB@)
+set(NSS_WRAPPER_LIBRARY @CMAKE_INSTALL_FULL_LIBDIR@/@NSS_WRAPPER_LIB@)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nss_wrapper-1.1.6/src/nss_wrapper.c 
new/nss_wrapper-1.1.7/src/nss_wrapper.c
--- old/nss_wrapper-1.1.6/src/nss_wrapper.c     2019-02-28 12:50:00.000000000 
+0100
+++ new/nss_wrapper-1.1.7/src/nss_wrapper.c     2019-11-11 15:44:13.000000000 
+0100
@@ -243,9 +243,18 @@
        NWRAP_LOG_TRACE
 };
 
-#ifdef NDEBUG
-# define NWRAP_LOG(...)
+#ifndef HAVE_GETPROGNAME
+static const char *getprogname(void)
+{
+#if defined(HAVE_PROGRAM_INVOCATION_SHORT_NAME)
+       return program_invocation_short_name;
+#elif defined(HAVE_GETEXECNAME)
+       return getexecname();
 #else
+       return NULL;
+#endif /* HAVE_PROGRAM_INVOCATION_SHORT_NAME */
+}
+#endif /* HAVE_GETPROGNAME */
 
 static void nwrap_log(enum nwrap_dbglvl_e dbglvl, const char *func, const char 
*format, ...) PRINTF_ATTRIBUTE(3, 4);
 # define NWRAP_LOG(dbglvl, ...) nwrap_log((dbglvl), __func__, __VA_ARGS__)
@@ -258,43 +267,49 @@
        va_list va;
        const char *d;
        unsigned int lvl = 0;
-       int pid = getpid();
+       const char *prefix = "NWRAP";
+       const char *progname = getprogname();
 
        d = getenv("NSS_WRAPPER_DEBUGLEVEL");
        if (d != NULL) {
                lvl = atoi(d);
        }
 
+       if (lvl < dbglvl) {
+               return;
+       }
+
        va_start(va, format);
        vsnprintf(buffer, sizeof(buffer), format, va);
        va_end(va);
 
-       if (lvl >= dbglvl) {
-               switch (dbglvl) {
-                       case NWRAP_LOG_ERROR:
-                               fprintf(stderr,
-                                       "NWRAP_ERROR(%d) - %s: %s\n",
-                                       pid, func, buffer);
-                               break;
-                       case NWRAP_LOG_WARN:
-                               fprintf(stderr,
-                                       "NWRAP_WARN(%d) - %s: %s\n",
-                                       pid, func, buffer);
-                               break;
-                       case NWRAP_LOG_DEBUG:
-                               fprintf(stderr,
-                                       "NWRAP_DEBUG(%d) - %s: %s\n",
-                                       pid, func, buffer);
-                               break;
-                       case NWRAP_LOG_TRACE:
-                               fprintf(stderr,
-                                       "NWRAP_TRACE(%d) - %s: %s\n",
-                                       pid, func, buffer);
-                               break;
-               }
+       switch (dbglvl) {
+               case NWRAP_LOG_ERROR:
+                       prefix = "NWRAP_ERROR";
+                       break;
+               case NWRAP_LOG_WARN:
+                       prefix = "NWRAP_WARN";
+                       break;
+               case NWRAP_LOG_DEBUG:
+                       prefix = "NWRAP_DEBUG";
+                       break;
+               case NWRAP_LOG_TRACE:
+                       prefix = "NWRAP_TRACE";
+                       break;
+       }
+
+       if (progname == NULL) {
+               progname = "<unknown>";
        }
+
+       fprintf(stderr,
+               "%s[%s (%u)] - %s: %s\n",
+               prefix,
+               progname,
+               (unsigned int)getpid(),
+               func,
+               buffer);
 }
-#endif /* NDEBUG NWRAP_LOG */
 
 struct nwrap_libc_fns {
        struct passwd *(*_libc_getpwnam)(const char *name);
@@ -824,7 +839,6 @@
     NWRAP_LIBSOCKET,
 };
 
-#ifndef NDEBUG
 static const char *nwrap_str_lib(enum nwrap_lib lib)
 {
        switch (lib) {
@@ -839,7 +853,6 @@
        /* Compiler would warn us about unhandled enum value if we get here */
        return "unknown";
 }
-#endif
 
 static void *nwrap_load_lib_handle(enum nwrap_lib lib)
 {
@@ -848,15 +861,25 @@
        int i;
 
 #ifdef RTLD_DEEPBIND
-       const char *env = getenv("LD_PRELOAD");
+       const char *env_preload = getenv("LD_PRELOAD");
+       const char *env_deepbind = getenv("NSS_WRAPPER_DISABLE_DEEPBIND");
+       bool enable_deepbind = true;
 
        /* Don't do a deepbind if we run with libasan */
-       if (env != NULL && strlen(env) < 1024) {
-               const char *p = strstr(env, "libasan.so");
-               if (p == NULL) {
-                       flags |= RTLD_DEEPBIND;
+       if (env_preload != NULL && strlen(env_preload) < 1024) {
+               const char *p = strstr(env_preload, "libasan.so");
+               if (p != NULL) {
+                       enable_deepbind = false;
                }
        }
+
+       if (env_deepbind != NULL && strlen(env_deepbind) >= 1) {
+               enable_deepbind = false;
+       }
+
+       if (enable_deepbind) {
+               flags |= RTLD_DEEPBIND;
+       }
 #endif
 
        switch (lib) {



Reply via email to