Hello community,
here is the log from the commit of package python3-smbc for openSUSE:Factory checked in at 2016-12-02 16:39:27
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python3-smbc (Old)
and /work/SRC/openSUSE:Factory/.python3-smbc.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python3-smbc"
Changes:
--------
--- /work/SRC/openSUSE:Factory/python3-smbc/python3-smbc.changes 2016-05-17 17:12:46.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.python3-smbc.new/python3-smbc.changes 2016-12-02 16:39:28.000000000 +0100
@@ -1,0 +2,6 @@
+Sat Nov 26 18:08:29 UTC 2016 - arun@gmx.de
+
+- update to version 1.0.15.6:
+ (no changelog available)
+
+-------------------------------------------------------------------
@@ -6 +11,0 @@
-
Old:
----
pysmbc-1.0.15.5.tar.bz2
New:
----
pysmbc-1.0.15.6.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python3-smbc.spec ++++++
--- /var/tmp/diff_new_pack.lC4WRx/_old 2016-12-02 16:39:29.000000000 +0100
+++ /var/tmp/diff_new_pack.lC4WRx/_new 2016-12-02 16:39:29.000000000 +0100
@@ -20,7 +20,7 @@
BuildRequires: libsmbclient-devel
BuildRequires: pkg-config
BuildRequires: python3-devel
-Version: 1.0.15.5
+Version: 1.0.15.6
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Url: http://cyberelk.net/tim/software/pysmbc/
++++++ pysmbc-1.0.15.5.tar.bz2 -> pysmbc-1.0.15.6.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pysmbc-1.0.15.5/PKG-INFO new/pysmbc-1.0.15.6/PKG-INFO
--- old/pysmbc-1.0.15.5/PKG-INFO 2015-09-25 21:50:57.000000000 +0200
+++ new/pysmbc-1.0.15.6/PKG-INFO 2016-11-22 10:50:18.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: pysmbc
-Version: 1.0.15.5
+Version: 1.0.15.6
Summary: Python bindings for libsmbclient
Home-page: http://cyberelk.net/tim/software/pysmbc/
Author: ['Tim Waugh ', 'Tsukasa Hamano ', 'Roberto Polli ']
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pysmbc-1.0.15.5/setup.py new/pysmbc-1.0.15.6/setup.py
--- old/pysmbc-1.0.15.5/setup.py 2015-09-25 21:48:51.000000000 +0200
+++ new/pysmbc-1.0.15.6/setup.py 2016-11-22 10:49:18.000000000 +0100
@@ -64,7 +64,7 @@
return dirs
setup (name="pysmbc",
- version="1.0.15.5",
+ version="1.0.15.6",
description="Python bindings for libsmbclient",
long_description=__doc__,
author=["Tim Waugh ",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pysmbc-1.0.15.5/smbc/context.c new/pysmbc-1.0.15.6/smbc/context.c
--- old/pysmbc-1.0.15.5/smbc/context.c 2015-09-25 21:48:51.000000000 +0200
+++ new/pysmbc-1.0.15.6/smbc/context.c 2016-11-22 10:43:57.000000000 +0100
@@ -520,28 +520,59 @@
int ret;
char *uri = NULL;
char *name = NULL;
- char value[1024];
+ char *buffer = NULL;
static smbc_getxattr_fn fn;
- bzero(value, sizeof (value));
-
// smbc_getxattr takes two string parameters
if (!PyArg_ParseTuple (args, "ss", &uri, &name))
{
return NULL;
}
+ /* The security descriptor string returned by this call will vary depending on the requested attribute
+ * A call with system.nt_sec_desc.* will return the longest string which would be in the following format:
+ *
+ * REVISION:<revision number>,OWNER:<sid>,GROUP:<sid>,ACL:<sid>:<type>/<flags>/<mask>
+ *
+ * There could be multiple ACL entries up to a reasonable maximum of 1820.
+ *
+ * <revision number> : 3 chars
+ * <sid> : 184 chars
+ * <type>: 1 char
+ * <flags>: 3 chars
+ * <mask>: 10 chars
+ *
+ * The maximum size of the security descriptor string returned can be
+ * derived as follows (includes space for terminating null):
+ * Sec Desc = 13 + 2 x (7 + <sid>) + 1820 * (5 + <acl>) = 375315
+ *
+ * References: https://msdn.microsoft.com/en-us/library/cc246018.aspx
+ * https://technet.microsoft.com/en-us/library/cc961995.aspx
+ * https://technet.microsoft.com/en-us/library/cc961986.aspx
+ */
+
+ size_t size = 375315;
+ buffer = (char *)malloc (size);
+ if(!buffer)
+ return PyErr_NoMemory ();
+
+ bzero(buffer, size);
+
errno = 0;
fn = smbc_getFunctionGetxattr(self->context);
- ret = (*fn)(self->context, uri, name, value, sizeof (value));
+ ret = (*fn)(self->context, uri, name, buffer, size);
if (ret < 0)
{
pysmbc_SetFromErrno ();
+ free(buffer);
return NULL;
- }
+ }
+
+ PyObject *value = PyUnicode_FromString(buffer);
+ free(buffer);
- return PyUnicode_FromString (value);
+ return value;
}