forked from pool/php-smbclient
This commit is contained in:
commit
64aa684ef1
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
## Default LFS
|
||||||
|
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.png filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
.osc
|
36
0001-fix-incorrect-deallocation-of-zend_string.patch
Normal file
36
0001-fix-incorrect-deallocation-of-zend_string.patch
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
From 8945cd9d07069af37aedd42593638cf6b49c815f Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Cristian=20Rodr=C3=ADguez?= <crodriguez@owncloud.com>
|
||||||
|
Date: Fri, 11 Jan 2019 10:24:50 -0300
|
||||||
|
Subject: [PATCH] fix incorrect deallocation of zend_string
|
||||||
|
|
||||||
|
zend_strings are to be zend_string_release'd and emalloc'ed
|
||||||
|
memory efree'd.
|
||||||
|
---
|
||||||
|
smbclient.c | 3 ++-
|
||||||
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/smbclient.c b/smbclient.c
|
||||||
|
index 81ebd5a..bae1d54 100644
|
||||||
|
--- a/smbclient.c
|
||||||
|
+++ b/smbclient.c
|
||||||
|
@@ -1345,15 +1345,16 @@ PHP_FUNCTION(smbclient_read)
|
||||||
|
|
||||||
|
if ((ZSTR_LEN(buf) = smbc_read(state->ctx, file, ZSTR_VAL(buf), count)) >= 0) {
|
||||||
|
RETURN_STR(buf);
|
||||||
|
+ zend_string_release(buf);
|
||||||
|
#else
|
||||||
|
void *buf = emalloc(count);
|
||||||
|
ssize_t nbytes;
|
||||||
|
|
||||||
|
if ((nbytes = smbc_read(state->ctx, file, buf, count)) >= 0) {
|
||||||
|
RETURN_STRINGL(buf, nbytes, 0);
|
||||||
|
+ efree(buf);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
- efree(buf);
|
||||||
|
switch (state->err = errno) {
|
||||||
|
case EISDIR: php_error(E_WARNING, "Read error: Is a directory"); break;
|
||||||
|
case EBADF: php_error(E_WARNING, "Read error: Not a valid file resource or not open for reading"); break;
|
||||||
|
--
|
||||||
|
2.20.1
|
||||||
|
|
28
php7-smbclient.changes
Normal file
28
php7-smbclient.changes
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Jan 11 13:41:36 UTC 2019 - Cristian Rodríguez <crodriguez@owncloud.com>
|
||||||
|
|
||||||
|
- Upgrade to version 1.0.0 (boo#1123503)
|
||||||
|
* stream optimization: reuse previous connections (Remi)
|
||||||
|
- 0001-fix-incorrect-deallocation-of-zend_string.patch: zend_strings
|
||||||
|
are to be zend_string_release()'ed not efree()'ed.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Dec 20 16:48:09 UTC 2018 - jweberhofer@weberhofer.at
|
||||||
|
|
||||||
|
- Added php7-smbclient-fix_for_PHP_7.3.patch to allow building with PHP 7.3
|
||||||
|
as discussed in gh#eduardok/libsmbclient-php#60
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Jul 23 09:50:15 UTC 2018 - idonmez@suse.com
|
||||||
|
|
||||||
|
- Cleanup with spec-cleaner
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Mar 27 23:55:54 UTC 2018 - crrodriguez@opensuse.org
|
||||||
|
|
||||||
|
- Build module with -fvisibility=hidden
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Nov 20 15:15:07 UTC 2017 - crrodriguez@opensuse.org
|
||||||
|
|
||||||
|
- Initial version for php 7
|
63
php7-smbclient.spec
Normal file
63
php7-smbclient.spec
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
#
|
||||||
|
# spec file for package php7-smbclient
|
||||||
|
#
|
||||||
|
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||||
|
#
|
||||||
|
# All modifications and additions to the file contributed by third parties
|
||||||
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
|
# upon. The license for this file, and modifications and additions to the
|
||||||
|
# file, is the same license as for the pristine package itself (unless the
|
||||||
|
# license for the pristine package is not an Open Source License, in which
|
||||||
|
# case the license is the MIT License). An "Open Source License" is a
|
||||||
|
# license that conforms to the Open Source Definition (Version 1.9)
|
||||||
|
# published by the Open Source Initiative.
|
||||||
|
|
||||||
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
%define pkg_name smbclient
|
||||||
|
Name: php7-smbclient
|
||||||
|
Version: 1.0.0
|
||||||
|
Release: 0
|
||||||
|
Summary: A PHP wrapper for libsmbclient
|
||||||
|
License: PHP-3.01
|
||||||
|
Group: Productivity/Networking/Web/Servers
|
||||||
|
URL: http://pecl.php.net/package/smbclient
|
||||||
|
Source: http://pecl.php.net/get/%{pkg_name}-%{version}.tgz
|
||||||
|
BuildRequires: php7-devel >= 7.0
|
||||||
|
BuildRequires: pkgconfig
|
||||||
|
BuildRequires: pkgconfig(smbclient)
|
||||||
|
Patch0: 0001-fix-incorrect-deallocation-of-zend_string.patch
|
||||||
|
Requires: php(api) = %{php_core_api}
|
||||||
|
Requires: php(zend-abi) = %{php_zend_api}
|
||||||
|
Provides: php-smbclient = %{version}
|
||||||
|
Obsoletes: php-smbclient < %{version}
|
||||||
|
|
||||||
|
%description
|
||||||
|
smbclient is a PHP extension that uses Samba's libsmbclient library to provide
|
||||||
|
Samba related functions and 'smb' streams to PHP programs.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q -n %{pkg_name}-%{version}
|
||||||
|
%patch0 -p1
|
||||||
|
%build
|
||||||
|
export CFLAGS="%{optflags} -fvisibility=hidden"
|
||||||
|
%{_bindir}/phpize
|
||||||
|
%configure
|
||||||
|
make %{?_smp_mflags}
|
||||||
|
|
||||||
|
%check
|
||||||
|
make %{?_smp_mflags} test PHP_EXECUTABLE=%{_bindir}/php NO_INTERACTION=1
|
||||||
|
|
||||||
|
%install
|
||||||
|
make install INSTALL_ROOT=%{buildroot}
|
||||||
|
mkdir -p %{buildroot}%{_sysconfdir}/php7/conf.d
|
||||||
|
echo "; comment out next line to disable smbclient extension in php" > %{buildroot}%{_sysconfdir}/php7/conf.d/%{pkg_name}.ini
|
||||||
|
echo 'extension = smbclient.so' >> %{buildroot}%{_sysconfdir}/php7/conf.d/%{pkg_name}.ini
|
||||||
|
|
||||||
|
%files
|
||||||
|
%{_libdir}/php7/extensions/%{pkg_name}.so
|
||||||
|
%config(noreplace) %{_sysconfdir}/php7/conf.d/%{pkg_name}.ini
|
||||||
|
|
||||||
|
%changelog
|
3
smbclient-1.0.0.tgz
Normal file
3
smbclient-1.0.0.tgz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:c57cd1be108673ada51f9cc14d874a6b24d849d7e817d5e2774c18ebd6a389a5
|
||||||
|
size 32017
|
Loading…
Reference in New Issue
Block a user