Hello community,

here is the log from the commit of package nss_wrapper for openSUSE:Factory 
checked in at 2016-04-01 13:01:45
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/nss_wrapper (Old)
 and      /work/SRC/openSUSE:Factory/.nss_wrapper.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "nss_wrapper"

Changes:
--------
--- /work/SRC/openSUSE:Factory/nss_wrapper/nss_wrapper.changes  2016-02-17 
12:16:55.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.nss_wrapper.new/nss_wrapper.changes     
2016-04-01 13:01:50.000000000 +0200
@@ -1,0 +2,7 @@
+Mon Mar 21 18:19:18 UTC 2016 - a...@cryptomilk.org
+
+- Update to version 1.1.3
+  * Added support for BSD 'struct passwd' members
+  * Replaced strcpy() with snprintf()
+
+-------------------------------------------------------------------

Old:
----
  nss_wrapper-1.1.2.tar.gz

New:
----
  nss_wrapper-1.1.3.tar.gz

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

Other differences:
------------------
++++++ nss_wrapper.spec ++++++
--- /var/tmp/diff_new_pack.yZSkbw/_old  2016-04-01 13:01:51.000000000 +0200
+++ /var/tmp/diff_new_pack.yZSkbw/_new  2016-04-01 13:01:51.000000000 +0200
@@ -24,7 +24,7 @@
 ############################# NOTE ##################################
 
 Name:           nss_wrapper
-Version:        1.1.2
+Version:        1.1.3
 Release:        0
 
 Summary:        A wrapper for the user, group and hosts NSS API

++++++ nss_wrapper-1.1.2.tar.gz -> nss_wrapper-1.1.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nss_wrapper-1.1.2/CMakeLists.txt 
new/nss_wrapper-1.1.3/CMakeLists.txt
--- old/nss_wrapper-1.1.2/CMakeLists.txt        2015-12-17 08:57:54.000000000 
+0100
+++ new/nss_wrapper-1.1.3/CMakeLists.txt        2016-03-18 11:58:10.000000000 
+0100
@@ -8,7 +8,7 @@
 
 set(APPLICATION_VERSION_MAJOR "1")
 set(APPLICATION_VERSION_MINOR "1")
-set(APPLICATION_VERSION_PATCH "2")
+set(APPLICATION_VERSION_PATCH "3")
 
 set(APPLICATION_VERSION 
"${APPLICATION_VERSION_MAJOR}.${APPLICATION_VERSION_MINOR}.${APPLICATION_VERSION_PATCH}")
 
@@ -19,7 +19,7 @@
 #     Increment AGE. Set REVISION to 0
 #   If the source code was changed, but there were no interface changes:
 #     Increment REVISION.
-set(LIBRARY_VERSION "0.2.2")
+set(LIBRARY_VERSION "0.2.3")
 set(LIBRARY_SOVERSION "0")
 
 # where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is 
checked
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nss_wrapper-1.1.2/ChangeLog 
new/nss_wrapper-1.1.3/ChangeLog
--- old/nss_wrapper-1.1.2/ChangeLog     2015-12-17 09:00:25.000000000 +0100
+++ new/nss_wrapper-1.1.3/ChangeLog     2016-03-18 11:57:56.000000000 +0100
@@ -1,6 +1,10 @@
 ChangeLog
 ==========
 
+version 1.1.3 (released 2015-03-18)
+  * Added support for BSD 'struct passwd' members
+  * Replaced strcpy() with snprintf()
+
 version 1.1.2 (released 2015-12-17)
   * Fixed segfault while reloading hosts file
   * Fixed issue where are not fault tolerant if an alias has already
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nss_wrapper-1.1.2/ConfigureChecks.cmake 
new/nss_wrapper-1.1.3/ConfigureChecks.cmake
--- old/nss_wrapper-1.1.2/ConfigureChecks.cmake 2015-11-11 11:51:25.000000000 
+0100
+++ new/nss_wrapper-1.1.3/ConfigureChecks.cmake 2016-03-17 20:26:09.000000000 
+0100
@@ -191,6 +191,9 @@
 
 # STRUCT MEMBERS
 check_struct_has_member("struct sockaddr" sa_len "sys/socket.h netinet/in.h" 
HAVE_STRUCT_SOCKADDR_SA_LEN)
+check_struct_has_member("struct passwd" pw_class "pwd.h" 
HAVE_STRUCT_PASSWD_PW_CLASS)
+check_struct_has_member("struct passwd" pw_change "pwd.h" 
HAVE_STRUCT_PASSWD_PW_CHANGE)
+check_struct_has_member("struct passwd" pw_expire "pwd.h" 
HAVE_STRUCT_PASSWD_PW_EXPIRE)
 
 # IPV6
 check_c_source_compiles("
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nss_wrapper-1.1.2/config.h.cmake 
new/nss_wrapper-1.1.3/config.h.cmake
--- old/nss_wrapper-1.1.2/config.h.cmake        2015-11-11 11:51:25.000000000 
+0100
+++ new/nss_wrapper-1.1.3/config.h.cmake        2016-03-17 20:26:09.000000000 
+0100
@@ -86,6 +86,10 @@
 #cmakedefine HAVE_LINUX_GETNAMEINFO_UNSIGNED 1
 
 #cmakedefine HAVE_STRUCT_SOCKADDR_SA_LEN 1
+#cmakedefine HAVE_STRUCT_PASSWD_PW_CLASS 1
+#cmakedefine HAVE_STRUCT_PASSWD_PW_CHANGE 1
+#cmakedefine HAVE_STRUCT_PASSWD_PW_EXPIRE 1
+
 #cmakedefine HAVE_IPV6 1
 
 #cmakedefine HAVE_ATTRIBUTE_PRINTF_FORMAT 1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nss_wrapper-1.1.2/src/nss_wrapper.c 
new/nss_wrapper-1.1.3/src/nss_wrapper.c
--- old/nss_wrapper-1.1.2/src/nss_wrapper.c     2015-12-17 09:14:13.000000000 
+0100
+++ new/nss_wrapper-1.1.3/src/nss_wrapper.c     2016-03-17 20:26:09.000000000 
+0100
@@ -154,6 +154,14 @@
 #define SAFE_FREE(x) do { if ((x) != NULL) {free(x); (x)=NULL;} } while(0)
 #endif
 
+#ifndef discard_const
+#define discard_const(ptr) ((void *)((uintptr_t)(ptr)))
+#endif
+
+#ifndef discard_const_p
+#define discard_const_p(type, ptr) ((type *)discard_const(ptr))
+#endif
+
 #ifdef HAVE_IPV6
 #define NWRAP_INET_ADDRSTRLEN INET6_ADDRSTRLEN
 #else
@@ -1963,6 +1971,28 @@
 
        NWRAP_LOG(NWRAP_LOG_TRACE, "gid[%u]\n", pw->pw_gid);
 
+#ifdef HAVE_STRUCT_PASSWD_PW_CLASS
+       pw->pw_class = discard_const_p(char, "");
+
+       NWRAP_LOG(NWRAP_LOG_TRACE, "class[%s]", pw->pw_class);
+#endif /* HAVE_STRUCT_PASSWD_PW_CLASS */
+
+#ifdef HAVE_STRUCT_PASSWD_PW_CHANGE
+       pw->pw_change = 0;
+
+       NWRAP_LOG(NWRAP_LOG_TRACE,
+                 "change[%lu]",
+                 (unsigned long)pw->pw_change);
+#endif /* HAVE_STRUCT_PASSWD_PW_CHANGE */
+
+#ifdef HAVE_STRUCT_PASSWD_PW_EXPIRE
+       pw->pw_expire = 0;
+
+       NWRAP_LOG(NWRAP_LOG_TRACE,
+                 "expire[%lu]",
+                 (unsigned long)pw->pw_expire);
+#endif /* HAVE_STRUCT_PASSWD_PW_EXPIRE */
+
        /* gecos */
        p = strchr(c, ':');
        if (!p) {
@@ -5421,7 +5451,7 @@
                if (he != NULL && he->h_name != NULL) {
                        if (strlen(he->h_name) >= hostlen)
                                return EAI_OVERFLOW;
-                       strcpy(host, he->h_name);
+                       snprintf(host, hostlen, "%s", he->h_name);
                        if (flags & NI_NOFQDN)
                                host[strcspn(host, ".")] = '\0';
                } else {
@@ -5439,7 +5469,7 @@
                if (service != NULL) {
                        if (strlen(service->s_name) >= servlen)
                                return EAI_OVERFLOW;
-                       strcpy(serv, service->s_name);
+                       snprintf(serv, servlen, "%s", service->s_name);
                } else {
                        if (snprintf(serv, servlen, "%u", port) >= (int) 
servlen)
                                return EAI_OVERFLOW;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nss_wrapper-1.1.2/tests/testsuite.c 
new/nss_wrapper-1.1.3/tests/testsuite.c
--- old/nss_wrapper-1.1.2/tests/testsuite.c     2015-11-11 11:51:25.000000000 
+0100
+++ new/nss_wrapper-1.1.3/tests/testsuite.c     2016-03-17 20:26:09.000000000 
+0100
@@ -75,6 +75,15 @@
        p->pw_passwd    = strdup(pwd->pw_passwd);
        p->pw_uid       = pwd->pw_uid;
        p->pw_gid       = pwd->pw_gid;
+#ifdef HAVE_STRUCT_PASSWD_PW_CLASS
+       p->pw_class     = strdup(pwd->pw_class);
+#endif
+#ifdef HAVE_STRUCT_PASSWD_PW_CHANGE
+       p->pw_change    = pwd->pw_change;
+#endif
+#ifdef HAVE_STRUCT_PASSWD_PW_EXPIRE
+       p->pw_expire    = pwd->pw_expire;
+#endif
        p->pw_gecos     = strdup(pwd->pw_gecos);
        p->pw_dir       = strdup(pwd->pw_dir);
        p->pw_shell     = strdup(pwd->pw_shell);
@@ -86,6 +95,9 @@
 {
        SAFE_FREE(p->pw_name);
        SAFE_FREE(p->pw_passwd);
+#ifdef HAVE_STRUCT_PASSWD_PW_CLASS
+       SAFE_FREE(p->pw_class);
+#endif
        SAFE_FREE(p->pw_gecos);
        SAFE_FREE(p->pw_dir);
        SAFE_FREE(p->pw_shell);


Reply via email to