Win2k & Samba compatibility?

Romeril, Alan a.romeril at ic.ac.uk
Tue Feb 15 22:02:23 GMT 2000


Nothing gets returned in the debug logs by unpack_unix_permissions() or
map_nt_perms().  It doesn`t seem to be an ACL issue.

Here`s a grab when writing the profile back.  A link to a machine called
icnts3 was created.

[2000/02/15 20:36:38, 3] smbd/process.c:switch_message(448)
  switch message SMBtrans2 (pid 19768)
[2000/02/15 20:36:38, 4] smbd/uid.c:become_user(186)
  Skipping become_user - already user
[2000/02/15 20:36:38, 3] smbd/trans2.c:call_trans2qfilepathinfo(1351)
  call_trans2qfilepathinfo: TRANSACT2_QPATHINFO: level = 257
[2000/02/15 20:36:38, 5] smbd/filename.c:unix_convert(348)
  unix_convert called on file "\pc\sm79.pds\nethood\icnts3\target.lnk"
[2000/02/15 20:36:38, 3] lib/util.c:unix_clean_name(522)
  unix_clean_name [/pc/sm79.pds/nethood/icnts3/target.lnk]
[2000/02/15 20:36:38, 5] smbd/filename.c:unix_convert(455)
  unix_convert begin: name = pc/sm79.pds/nethood/icnts3/target.lnk, dirpath
= pc/sm79.pds/nethood/icnts3, start = target.lnk
[2000/02/15 20:36:38, 3] smbd/filename.c:scan_directory(716)
  scan dir didn't open dir [pc/sm79.pds/nethood/icnts3]
[2000/02/15 20:36:38, 5] smbd/filename.c:unix_convert(583)
  New file target.lnk
[2000/02/15 20:36:38, 8] lib/util.c:is_in_path(2416)
  is_in_path: pc/sm79.pds/nethood/icnts3/target.lnk
[2000/02/15 20:36:38, 8] lib/util.c:is_in_path(2421)
  is_in_path: no name list.
[2000/02/15 20:36:38, 3] lib/util.c:unix_clean_name(522)
  unix_clean_name [pc/sm79.pds/nethood/icnts3/target.lnk]
[2000/02/15 20:36:38, 3] smbd/trans2.c:call_trans2qfilepathinfo(1357)
  fileinfo of pc/sm79.pds/nethood/icnts3/target.lnk failed (Permission
denied)
[2000/02/15 20:36:38, 3] smbd/error.c:error_packet(138)
  error packet at line 1363 cmd=50 (SMBtrans2) eclass=1 ecode=5
[2000/02/15 20:36:38, 3] smbd/error.c:error_packet(143)
  error string = Permission denied


And here a link to a machine called smnts1


[2000/02/15 19:59:16, 3] smbd/process.c:switch_message(448)
  switch message SMBtrans2 (pid 19550)
[2000/02/15 19:59:16, 4] smbd/uid.c:become_user(186)
  Skipping become_user - already user
[2000/02/15 19:59:16, 3] smbd/trans2.c:call_trans2qfilepathinfo(1351)
  call_trans2qfilepathinfo: TRANSACT2_QPATHINFO: level = 257
[2000/02/15 19:59:16, 5] smbd/filename.c:unix_convert(348)
  unix_convert called on file "\pc\sm79.pds\nethood\smnts1\target.lnk"
[2000/02/15 19:59:16, 3] lib/util.c:unix_clean_name(522)
  unix_clean_name [/pc/sm79.pds/nethood/smnts1/target.lnk]
[2000/02/15 19:59:16, 5] smbd/filename.c:unix_convert(455)
  unix_convert begin: name = pc/sm79.pds/nethood/smnts1/target.lnk, dirpath
= pc/sm79.pds/nethood/smnts1, start = target.lnk
[2000/02/15 19:59:16, 3] smbd/filename.c:scan_directory(716)
  scan dir didn't open dir [pc/sm79.pds/nethood/smnts1]
[2000/02/15 19:59:16, 5] smbd/filename.c:unix_convert(583)
  New file target.lnk
[2000/02/15 19:59:16, 8] lib/util.c:is_in_path(2416)
  is_in_path: pc/sm79.pds/nethood/smnts1/target.lnk
[2000/02/15 19:59:16, 8] lib/util.c:is_in_path(2421)
  is_in_path: no name list.
[2000/02/15 19:59:16, 3] lib/util.c:unix_clean_name(522)
  unix_clean_name [pc/sm79.pds/nethood/smnts1/target.lnk]
[2000/02/15 19:59:16, 3] smbd/trans2.c:call_trans2qfilepathinfo(1357)
  fileinfo of pc/sm79.pds/nethood/smnts1/target.lnk failed (Permission
denied)
[2000/02/15 19:59:16, 3] smbd/error.c:error_packet(138)
  error packet at line 1363 cmd=50 (SMBtrans2) eclass=1 ecode=5
[2000/02/15 19:59:16, 3] smbd/error.c:error_packet(143)
  error string = Permission denied

I wondered what W2K would do if I made the directory in nethood that
contained the target.lnk.
So, with W2K logged on.  I made a link in the "My network places" tool on
the desktop to a machine called csy.  Then made a directory called csy in
the nethood directory of the home directory, chown chgrp and chmod `ing so
it could be written to.

drwxr-xr-x   2 sm79     dk           512 Feb 15 21:09 csy
drwxr-xr-x   2 sm79     dk           512 Feb 15 21:09 hhb
drwxr-xr-x   2 sm79     dk           512 Feb 15 21:09 icnts3

and during the write this changed to 
d---------   2 sm79     dk           512 Feb 15 21:12 csy
drwxr-xr-x   2 sm79     dk           512 Feb 15 21:09 hhb
drwxr-xr-x   2 sm79     dk           512 Feb 15 21:09 icnts3

I quickly chmod`d it to 777 and the profile managed to get written back
leaving the directory like this.

drwxr-xr-x   2 sm79     dk           512 Feb 15 21:12 csy
drwxr-xr-x   2 sm79     dk           512 Feb 15 21:09 hhb
drwxr-xr-x   2 sm79     dk           512 Feb 15 21:09 icnts3


So, where from here?

Alan Romeril




Ok - I bet this is W2K doing a SetAcl call in the nttrans.c
code - with some combination of requested security flags that
we're not mapping right.

Can you get a debug level 10 log from the saves, and look
at the lines doing unpack_unix_permissions and the mapping
done in map_nt_perms() function. Post it to the group and
I'll take a look at it (when I'm back in the USA).

It'd be good to fix this before the next 2.0.7pre snapshot
(I'm sure we'll have at least one more before official
ship).

Cheers,

	Jeremy Allison,
	Samba Team.






More information about the samba-technical mailing list