Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

workaround for regression in libsmbclient 4.16.9/4.17.5 #100

Merged
merged 1 commit into from Apr 17, 2023

Conversation

remicollet
Copy link
Contributor

@remicollet remicollet commented Apr 3, 2023

Possible fix for #98

feedback welcome
but can wait a little for samba upstream feedback

@eduardok
Copy link
Owner

Does the workaround work for anybody?

@Doud-FR
Copy link

Doud-FR commented Apr 15, 2023

Does the workaround work for anybody?

How can i try your fix please?
i'm on latest version and smb share don't work

@theroch
Copy link

theroch commented Apr 16, 2023

Samba 4.18.1
libsmbclient 1.1.0
PHP 7.4.x

And applied this patch

Patch works fine for me

You can use this test script to verify the patch:

<?php

$user = "*****";
$pwd = "****";
$share = 'smb://my.host.local/share';
$file = "testfile_in_share";

// Create new state:
$state = smbclient_state_new();

// Initialize the state with workgroup, username and password:
smbclient_state_init($state, null, $user, $pwd);

// Open a directory:
$dir = smbclient_opendir($state, $share);

if (!$dir) {
        echo "path or credentials invalid\n";
        exit -1;
}

$attr = smbclient_getxattr($state, "$share/$file", 'system.*');
var_dump($attr);

// Close the directory handle:
smbclient_closedir($state, $dir);

// Free the state:
smbclient_state_free($state);

I can confirm that the patch also works fine with nextcloud 25.x.

see #98
see nextcloud/server#36773

@eduardok eduardok merged commit 46ef427 into eduardok:master Apr 17, 2023
@remicollet remicollet deleted the issue-reg-getxattr branch April 17, 2023 05:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants