Bug 9926 - root preexec/postexec behavior change
Summary: root preexec/postexec behavior change
Status: NEW
Alias: None
Product: Samba 3.6
Classification: Unclassified
Component: File services (show other bugs)
Version: 3.6.17
Hardware: All All
: P5 normal
Target Milestone: ---
Assignee: Volker Lendecke
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-03 12:59 UTC by Cedric Bellegarde
Modified: 2013-08-19 12:07 UTC (History)
2 users (show)

See Also:


Attachments
SMB negotiation packets compared (27.79 KB, text/plain)
2013-08-19 11:40 UTC, Claudio Laurita
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Cedric Bellegarde 2013-06-03 12:59:38 UTC
I use this on my samba server to do various actions on shares:

[netlogon]
        root preexec = /usr/local/sbin/logon.sh -s %S %u %m %I %a
        root postexec = /usr/local/sbin/logon.sh -k %S %u %m %I %a

Since recent mount.cifs release, logon.sh receive this arguments:

dossiers cbellega 192.168.65.1 Vista

With older release:

dossiers cbellega nsat-cdd-pc01 192.168.65.1 CIFSFS

Bug: mount.cifs should send machine name and CIFSFS as architecture.
Comment 1 Jeff Layton 2013-06-03 19:48:21 UTC
(In reply to comment #0)
> I use this on my samba server to do various actions on shares:
> 
> [netlogon]
>         root preexec = /usr/local/sbin/logon.sh -s %S %u %m %I %a
>         root postexec = /usr/local/sbin/logon.sh -k %S %u %m %I %a
> 
> Since recent mount.cifs release, logon.sh receive this arguments:
> 
> dossiers cbellega 192.168.65.1 Vista
> 
> With older release:
> 
> dossiers cbellega nsat-cdd-pc01 192.168.65.1 CIFSFS
> 
> Bug: mount.cifs should send machine name and CIFSFS as architecture.

Reassigning component to samba...

mount.cifs doesn't pass any arguments here. Any arguments passed via the root preexec/postexec are done via samba. So, perhaps a better description of the problem is:

"Since a recent release of samba the arguments passed via root preexec and root postexec have changed..."

You should also be specific about what version of samba last worked and most recently broke.
Comment 2 Jeff Layton 2013-06-03 19:48:48 UTC
..also guessing that this is v4.0.0 since I have no idea what version of samba you're using.
Comment 3 Cedric Bellegarde 2013-06-04 06:48:26 UTC
>mount.cifs doesn't pass any arguments here. Any arguments passed via the root
>preexec/postexec are done via samba.

Strange:
- Server is Debian Squeeze
- Client is Ubuntu 12.04 => Working as expected
- Client is Ubuntu 13.04/Fedora 19 => Not working

Does cifs-utils depend on samba version?
Comment 4 Jeff Layton 2013-06-04 15:21:05 UTC
(In reply to comment #3)
> >mount.cifs doesn't pass any arguments here. Any arguments passed via the root
> >preexec/postexec are done via samba.
> 
> Strange:
> - Server is Debian Squeeze
> - Client is Ubuntu 12.04 => Working as expected
> - Client is Ubuntu 13.04/Fedora 19 => Not working
> 
> Does cifs-utils depend on samba version?

No, they're completely separate projects. Again, I don't think this has anything to do with cifs-utils. It sounds like your logon.sh scripts is expecting certain arguments from samba, and it's not getting them. I'd look into that.
Comment 5 Claudio Laurita 2013-08-19 11:40:13 UTC
Created attachment 9145 [details]
SMB negotiation packets compared
Comment 6 Claudio Laurita 2013-08-19 11:41:49 UTC
I can confirm this behavior on Debian wheezy (64 bit) kernel 3.10, cifs-utils 6.1, samba 3.6.17

In the attached wireshark capture, the "Session Setup AndX Request, NTLMSSP_AUTH" packet from a windows machine (first packet, lines 1-218) is compared with the same packet from the linux machine (lines 220-)
As you can see on lines 170 (windows) and 433 (mount.cifs), in the first case the client name is regularly sent, while in the second it's NULL.
Obviously, the machines are accessing the same samba server (3.0.32).

Hope this could help.
Regards
Claudio
Comment 7 Jeff Layton 2013-08-19 12:04:24 UTC
These packets are generated by the kernel, so moving this to correct component.