We are running an archiving protocol over CIFS and file's last access time is assigned a new meaning (it means file retention), so the values received on the server side should be allowed to go far into the future. But although we are running on x64, samba will impose limit of Jan 2038 (31bit, signed int). This is done in nt_time_to_unix_timespec: if (d >= (int64_t)TIME_T_MAX) { ret.tv_sec = TIME_T_MAX; ... and: /* * we use the INT32_MAX here as on 64 bit systems, * gmtime() fails with INT64_MAX */ #ifndef TIME_T_MAX #define TIME_T_MAX MIN(INT32_MAX,_TYPE_MAXIMUM(time_t)) #endif From the log, when we tried to set atime 40 years ahead of now: [2010/11/10 00:15:49.885710, 5] lib/util.c:627(show_msg) size=116 smb_com=0x32 smb_rcls=0 smb_reh=0 smb_err=0 smb_flg=24 smb_flg2=51207 smb_tid=1 smb_pid=3304 smb_uid=100 smb_mid=46080 smt_wct=15 smb_vwv[ 0]= 6 (0x6) smb_vwv[ 1]= 40 (0x28) smb_vwv[ 2]= 2 (0x2) smb_vwv[ 3]= 0 (0x0) 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]= 6 (0x6) smb_vwv[10]= 68 (0x44) smb_vwv[11]= 40 (0x28) smb_vwv[12]= 76 (0x4C) smb_vwv[13]= 1 (0x1) smb_vwv[14]= 8 (0x8) smb_bcc=51 [2010/11/10 00:15:49.885862, 10] ../lib/util/util.c:278(_dump_data) [0000] 00 00 00 2E 18 EC 03 00 00 00 00 00 00 00 00 00 ........ ........ [0010] 00 00 00 00 94 74 DC 49 8F 03 02 00 00 00 00 00 .....t.I ........ [0020] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........ [0030] 00 00 00 ... [2010/11/10 00:15:49.885932, 3] smbd/process.c:1294(switch_message) switch message SMBtrans2 (pid 30707) conn 0x555556026030 [2010/11/10 00:15:49.885950, 4] smbd/uid.c:257(change_to_user) change_to_user: Skipping user change - already user [2010/11/10 00:15:49.885983, 3] smbd/trans2.c:7706(call_trans2setfilepathinfo) call_trans2setfilepathinfo(8) pn4/2010/11-09/A/128/A128C362F3D2A94F1F6E54DBCD3 B4931~DD~B8DBA113~00~1.DVSCC (fnum 6190) info_level=1004 totdata=40 [2010/11/10 00:15:49.886006, 3] smbd/trans2.c:7304(smbd_do_setfilepathinfo) smbd_do_setfilepathinfo: pn4/2010/11-09/A/128/A128C362F3D2A94F1F6E54DBCD3B4931 ~DD~B8DBA113~00~1.DVSCC (fnum 6190) info_level=1004 totdata=40 [2010/11/10 00:15:49.886036, 6] smbd/trans2.c:5502(smb_set_file_dosmode) smb_set_file_dosmode: dosmode: 0x0 [2010/11/10 00:15:49.886057, 10] smbd/trans2.c:6287(smb_set_file_basic_info) smb_set_file_basic_info: file pn4/2010/11-09/A/128/A128C362F3D2A94F1F6E54DBCD3 B4931~DD~B8DBA113~00~1.DVSCC [2010/11/10 00:15:49.886075, 5] smbd/trans2.c:5420(smb_set_file_time) smb_set_filetime: actime: Tue Jan 19 11:14:07 2038
Created attachment 6082 [details] git am patch for 3.5.x. Fix for 3.5.x. Jeremy.
Comment on attachment 6082 [details] git am patch for 3.5.x. Looks good
Pushed to v3-5-test. Closing out bug report. Thanks!
This patch had side effects: see bug 8561.