Bug 4268 - set posix acl failure occured through cifs(1.45)
Summary: set posix acl failure occured through cifs(1.45)
Status: RESOLVED WORKSFORME
Alias: None
Product: CifsVFS
Classification: Unclassified
Component: kernel fs (show other bugs)
Version: 2.6
Hardware: x86 Linux
: P3 normal
Target Milestone: ---
Assignee: Steve French
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-11-29 04:13 UTC by Hiroshi Furukawa
Modified: 2010-01-08 12:10 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hiroshi Furukawa 2006-11-29 04:13:18 UTC
[enviroment]
1)FileServer with samba
Debian 3.1 kernel 2.6.12 samba 3.0.21b
2)client
Debian 3.1 kernel 2.6.12 cifs 1.45

[operation]
1)We have several japanese filenames on the server (they are utf-8). 
2)We mount the share with
 mount.cifs //fileserver/share /home/user1/ -o user=user1,iocharset=utf8
3)we set the posix acl from client (with "setfacl")to the file and we have the
trouble.

[trouble-case]
1)if we do the same file,one time success,the other time fail.
2)if we do directly from server ,never fail

[countermeasure]
we had the doubt in the source code of cifs and investigated.
It is thought that there is a problem in the initialization of the memory. 
--old information remains and set to acl_entry_count

At present the problem did not occur by the following actions. 

cifssmb.c
ACL_to_cifs_posix()
-------------
        int zero = 0; <--add
        if(acl_type == ACL_TYPE_ACCESS) {
                cifs_acl->access_entry_count = cpu_to_le16(count);
                cifs_acl->default_entry_count = cpu_to_le16(zero);  <--add
        }
        else if(acl_type == ACL_TYPE_DEFAULT) {
                cifs_acl->default_entry_count = cpu_to_le16(count);
                cifs_acl->access_entry_count = cpu_to_le16(zero);   <--add
        }
-------------

[logs]

smbd log level 10 follows:
-----
[2006/11/15 10:59:10, 6] smbd/process.c:process_smb(1193)
  got message type 0x0 of len 0x14c
[2006/11/15 10:59:10, 3] smbd/process.c:process_smb(1194)
  Transaction 831 of length 336
[2006/11/15 10:59:10, 5] lib/util.c:show_msg(454)
[2006/11/15 10:59:10, 5] lib/util.c:show_msg(464)
  size=332
  smb_com=0x32
  smb_rcls=0
  smb_reh=0
  smb_err=0
  smb_flg=0
  smb_flg2=49153
  smb_tid=2
  smb_pid=2554
  smb_uid=100
  smb_mid=832
  smt_wct=15
  smb_vwv[ 0]=  208 (0xD0)
  smb_vwv[ 1]=   56 (0x38)
  smb_vwv[ 2]=    2 (0x2)
  smb_vwv[ 3]= 1000 (0x3E8)
  smb_vwv[ 4]=    0 (0x0)
  smb_vwv[ 5]=    0 (0x0)
  smb_vwv[ 6]=    0 (0x0)
  smb_vwv[ 7]=    0 (0x0)
  smb_vwv[ 8]=    0 (0x0)
  smb_vwv[ 9]=  208 (0xD0)
  smb_vwv[10]=   68 (0x44)
  smb_vwv[11]=   56 (0x38)
  smb_vwv[12]=  276 (0x114)
  smb_vwv[13]=    1 (0x1)
  smb_vwv[14]=    6 (0x6)
  smb_bcc=267
[2006/11/15 10:59:10, 10] lib/util.c:dump_data(2058)
  [000] 00 00 00 04 02 00 00 00  00 2F 00 74 00 65 00 73  ........ ./.t.e.s
  [010] 00 74 00 2F 00 B9 65 0F  5F 2F 00 2D 8A 99 50 27  .t./..e. _/.-..P'
  [020] 60 FD 80 2F 00 30 00 31  00 30 00 20 00 34 00 21  `../.0.1 .0. .4.!
  [030] 6B B7 30 B9 30 C6 30 E0  30 A2 95 23 90 2F 00 30  k.0.0.0. 0..#./.0
  [040] 00 39 00 20 00 AD 30 E3  30 D1 30 B7 30 C6 30 A3  .9. ..0. 0.0.0.0.
  [050] 30 A1 7B 06 74 2F 00 30  00 32 00 20 00 4B 90 28  0.{.t/.0 .2. .K.(
  [060] 75 42 66 93 95 1C 69 3C  8A 2F 00 10 30 48 00 31  uBf...i< ./..0H.1
  [070] 00 39 00 2E 00 31 00 28  00 4D 00 09 FF 8B 95 7A  .9...1.( .M.....z
  [080] 76 11 54 51 30 11 30 4B  90 28 75 42 66 93 95 1C  v.TQ0.0K .(uBf...
  [090] 69 3C 8A 11 54 51 30 1C  69 3C 8A 24 50 97 7B FA  i<..TQ0. i<.$P.{.
  [0A0] 51 33 00 2F 00 10 30 31  00 35 00 11 30 08 FF 6D  Q3./..01 .5..0..m
  [0B0] 69 D9 52 2D 00 4C 7D B6  55 09 FF 41 00 52 00 43  i.R-.L}. U..A.R.C
  [0C0] 00 4E 00 54 00 88 63 D7  53 EB 30 FC 30 C8 30 CF  .N.T..c. S.0.0.0.
  [0D0] 25 00 00 01 00 0D 08 05  00 01 07 FF FF FF FF FF  %....... ........
  [0E0] FF FF FF 02 07 A4 86 01  00 00 00 00 00 04 07 FF  ........ ........
  [0F0] FF FF FF FF FF FF FF 10  07 FF FF FF FF FF FF FF  ........ ........
  [100] FF 20 07 FF FF FF FF FF  FF FF FF                 . ...... ...
[2006/11/15 10:59:10, 3] smbd/process.c:switch_message(993)
  switch message SMBtrans2 (pid 9240) conn 0x844b980
[2006/11/15 10:59:10, 4] smbd/uid.c:change_to_user(222)
  change_to_user: Skipping user change - already user
[2006/11/15 10:59:10, 5] smbd/filename.c:unix_convert(108)
  unix_convert called on file "test/方式/設備性能/010 4次システム関連/09 キャパシティ管理/02 運用時間検証/【H19.1(M)開発向け】運用時間検証向け検証値算出3/【15】(業務-経営)ARCNT授受ルート●"
[2006/11/15 10:59:10, 5] smbd/filename.c:unix_convert(180)
  conversion finished test/方式/設備性能/010 4次システム関連/09 キャパシティ管理/02 運用時間検証/【H19.1(M)開発向け】運用時間検証向け検証値算出3/【15】(業務-経営)ARCNT授受ルート● -> test/方式/設備性能/010 4次システム関連/09 キャパシティ管理/02 運用時間検証/【H19.1(M)開発向け】運用時間検証向け検証値算出3/【15】(業務-経営)ARCNT授受ルート●
[2006/11/15 10:59:10, 3] smbd/trans2.c:call_trans2setfilepathinfo(3700)
  call_trans2setfilepathinfo(6) test/方式/設備性能/010 4次システム関連/09 キャパシティ管理/02 運用時間検証/【H19.1(M)開発向け】運用時間検証向け検証値算出3/【15】(業務-経営)ARCNT授受ルート● (fnum -1) info_level=516 totdata=56
[2006/11/15 10:59:10, 8] smbd/dosmode.c:dos_mode(300)
  dos_mode: test/方式/設備性能/010 4次システム関連/09 キャパシティ管理/02 運用時間検証/【H19.1(M)開発向け】運用時間検証向け検証値算出3/【15】(業務-経営)ARCNT授受ルート●
[2006/11/15 10:59:10, 8] smbd/dosmode.c:dos_mode_from_sbuf(167)
  dos_mode_from_sbuf returning d
[2006/11/15 10:59:10, 8] smbd/dosmode.c:dos_mode(334)
  dos_mode returning d
[2006/11/15 10:59:10, 3] smbd/error.c:error_packet(146)
  error packet at smbd/trans2.c(4328) cmd=50 (SMBtrans2) NT_STATUS_INVALID_PARAMETER
-----
Comment 1 Laurynas Butkus 2007-09-28 11:10:29 UTC
I have experienced CIFS ACL problem on Ubuntu Feisty (Samba 3.0.24). Extra executable flags were set for the files.

There is a patch for this problem:
http://lists.samba.org/archive/samba-technical/2006-September/049397.html
Comment 2 shirishpargaonkar@gmail.com 2009-11-08 18:29:17 UTC
Is this still an issue?
I have setfacl a few times now and has not caused any errors.

/usr/sbin/smbd -V
Version 3.0.28-0.el5.8

Comment 3 shirishpargaonkar@gmail.com 2010-01-07 10:53:33 UTC
I do not think this is a concern anymore. If it is, please let us know, 
otherwise plan on closing this bug in a month's time.
Comment 4 Steve French 2010-01-08 12:10:38 UTC
Please reopen if it recurrs.