idmap and samba4

Matthieu Patou mat at matws.net
Tue Sep 9 20:35:41 GMT 2008


Dear all,

It seems to me that idmap is at least partial implemented in Samba4, 
what is the exact status ?

I tried to get information with the samba4 version of wbinfo but it 
fails because it looks for a pipe here : /tmp/.winbind (as defined with 
WINBINDD_SOCKET_DIR  in  nsswitch/winbind_struct_protocol.h).

After modifying this file and recompiling wbinfo so that it looks for 
this pipe at /usr/local/samba/var/run/winbindd/pipe, I restarted wbinfo 
and I saw that it tries to connect to the private socket located here :

/usr/local/samba/private/smbd.tmp/winbind_pipe/pipe
This is in function winbind_open_pipe_sock of nsswitch/wb_common.c.

Unfortunately the server create the private socket here :
/usr/local/samba/var/lib/winbindd_privileged/pipe

As the logic to define this path seems rather complicated I choosed to 
make a hard link between the expected path of wbinfo and the real path.

After tweaking the sockets, wbinfo seems to connect but keeps on doing 
select calls


lstat64("/usr/local/samba/var/run/winbindd", 
{st_mode=S_IFDIR|S_ISGID|0755, st_size=17, ...}) = 0
lstat64("/usr/local/samba/var/run/winbindd/pipe", 
{st_mode=S_IFSOCK|0777, st_size=0, ...}) = 0
socket(PF_FILE, SOCK_STREAM, 0)         = 3
fcntl64(3, F_GETFL)                     = 0x2 (flags O_RDWR)
fcntl64(3, F_SETFL, O_RDWR|O_NONBLOCK)  = 0
fcntl64(3, F_GETFD)                     = 0
fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0
connect(3, {sa_family=AF_FILE, 
path="/usr/local/samba/var/run/winbindd/pipe"}, 110) = 0
select(4, [3], NULL, NULL, {0, 0})      = 0 (Timeout)
write(3, "0\10\0\0\0\0\0\0\0\0\0\0\1P\0\0\0\10\0\0\0\0\0\0\0\0\0"..., 
2096) = 2096
select(4, [3], NULL, NULL, {5, 0})      = 1 (in [3], left {5, 0})
read(3, "\250\f\0\0\2\0\0\0\23\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 
3240) = 3240
select(4, [3], NULL, NULL, {0, 0})      = 0 (Timeout)
write(3, "0\10\0\0-\0\0\0\0\0\0\0\1P\0\0\0\10\0\0\0\0\0\0\0\0\0\0"..., 
2096) = 2096
select(4, [3], NULL, NULL, {5, 0})      = 1 (in [3], left {5, 0})
read(3, "\327\f\0\0\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 
3240) = 3240
select(4, [3], NULL, NULL, {5, 0})      = 1 (in [3], left {5, 0})
read(3, "/usr/local/samba/private/smbd.tm"..., 47) = 47
lstat64("/usr/local/samba/private/smbd.tmp/winbind_pipe", 
{st_mode=S_IFDIR|S_ISGID|0755, st_size=6, ...}) = 0
lstat64("/usr/local/samba/private/smbd.tmp/winbind_pipe/pipe", 
{st_mode=S_IFSOCK|0777, st_size=0, ...}) = 0
socket(PF_FILE, SOCK_STREAM, 0)         = 4
fcntl64(4, F_GETFL)                     = 0x2 (flags O_RDWR)
fcntl64(4, F_SETFL, O_RDWR|O_NONBLOCK)  = 0
fcntl64(4, F_GETFD)                     = 0
fcntl64(4, F_SETFD, FD_CLOEXEC)         = 0
connect(4, {sa_family=AF_FILE, 
path="/usr/local/samba/private/smbd.tmp/winbind_pipe/pipe"}, 110) = 0
close(3)                                = 0
select(5, [4], NULL, NULL, {0, 0})      = 0 (Timeout)
write(4, "0\10\0\0\21\0\0\0\0\0\0\0\1P\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 
2096) = 2096
select(5, [4], NULL, NULL, {5, 0})      = 0 (Timeout)
select(5, [4], NULL, NULL, {5, 0})      = 0 (Timeout)
select(5, [4], NULL, NULL, {5, 0})      = 0 (Timeout)
select(5, [4], NULL, NULL, {5, 0})      = 0 (Timeout)
select(5, [4], NULL, NULL, {5, 0})      = 0 (Timeout)
select(5, [4], NULL, NULL, {5, 0})      = 0 (Timeout)
select(5, [4], NULL, NULL, {5, 0}


is able to connect to the server but I didn't get any result.
Meanwhile in the server log (debug level = 10, log level =10)

single_terminate: reason[NT_STATUS_END_OF_FILE]
Got winbind samba3 request 0
Got winbind samba3 request 45
single_terminate: reason[NT_STATUS_END_OF_FILE]
Got winbind samba3 request 17
wbsrv_samba3_list_users called
wb_cmd_list_users_send called


And that's pretty much everything.

Any clue ?

Matthieu



More information about the samba-technical mailing list