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

Notify do not work on smbclient 4.7.3 #62

Open
ariselseng opened this issue Feb 9, 2018 · 8 comments
Open

Notify do not work on smbclient 4.7.3 #62

ariselseng opened this issue Feb 9, 2018 · 8 comments

Comments

@ariselseng
Copy link
Contributor

ariselseng commented Feb 9, 2018

Using latest wonderfall/nextcloud docker image (smbclient version 4.7.x). There is no notify events working.
When I test with ubuntu 17.10, smbclient version 4.6.7-Ubuntu , it works perfect.

I am using the example in the readme for checking notify output of a windows share.

smb.conf:
[global]
client NTLMv2 auth = no
client lanman auth = yes
client use spnego = no
client min protocol = CORE
client max protocol = NT1

running smbclient on both machines works good, so maybe icewind1991/SMB just is isn't compatible with latest smbclient.
$ smbclient -U USER -W WORKGROUP //IP/SHARE
smb: > notify Testfolder

EDIT: mentioned version of smbclient in docker image.
EDIT: TLDR:
IT seems like there is something in smbclient 4.7.x that does not work with icewind1991/SMB and notify events.

@ariselseng
Copy link
Contributor Author

I have tracked down some of the problem. The notify command is not written to smbclient. It all stops after the function clearTillPrompt() has been called.

@icewind1991
Copy link
Owner

Are you testing with the latest version? 0ef64a9 should fix this issue

@ariselseng
Copy link
Contributor Author

@icewind1991
Yes I do,
I made some adjustment to the function to make it work, at least good enough.

        public function clearTillPrompt() {
                $this->write('');
                $promptLine = $this->readLine();

                if (!$this->isPrompt($promptLine)) {
                        $this->write('');
                } else {
                        $this->write('');
                        $this->readLine();
                }
        }

With this code, the very first notify event does not get registered but the ones after does. This only happens on 4.7.x though.

@ariselseng
Copy link
Contributor Author

ariselseng commented Feb 13, 2018

With these adjustments, this function does not block forever on 4.7.x.

@ariselseng
Copy link
Contributor Author

@icewind1991
Does my code make any sense? Maybe you see why the first event does not get reported on 4.7 ?

@ariselseng
Copy link
Contributor Author

Tested on latest 2.0.5. With the same issue.
@icewind1991 Is there anything I can do to help you debug this?

@theroch
Copy link

theroch commented Jan 30, 2019

It is related to #56?

raffis added a commit to raffis/SMB that referenced this issue Mar 28, 2019
@raffis raffis mentioned this issue Mar 28, 2019
icewind1991 pushed a commit to raffis/SMB that referenced this issue Oct 28, 2021
@joshtrichards
Copy link

Fixed in #108 awhile ago. This should be closed out.

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

No branches or pull requests

4 participants