SAMBA and the year of 2000

David Collier-Brown davecb at Canada.Sun.COM
Wed Nov 5 13:21:58 GMT 1997

Stotsky Haim <stots at asked:
> Does anyone knows about some problems in year of 2000 and SAMBA ?

 I just ran the Solaris y2k diagnostic against everything
in bin, and the only warning I got were of the form:

	./smbd calls one or more of the time functions and contains:
	%D %T

  This means that:
	%D	It will print dates as %m/%d/%y
		or mm/dd/yy, with a two-digit year
	%T	It will print time as %H:%M:%S, or

	I recommend changing %D to %m/%d/%Y, which will
cause the genrated string (in strftime, in timestring(),
in time.c) to produce dates of the from mm/dd/yyyy.

	I ran cscope, and it appears that timestring() is
caled a lot in DEBUG statements (eg, DEBUG(3,("%s client started
(version %s)\n",timestring(),VERSION)), but also in at least:

  File        Function             Line Call Fragment
1 nameelect.c check_master_browser   86 timestring(), work->work_group,
2 nameserv.c  add_domain_names      228 timestring(), myworkgroup,
3 nameserv.c  add_domain_names      245 timestring(), myworkgroup,
4 nameserv.c  add_domain_names      258 timestring(), myworkgroup));
1 nmblib.c    read_packet           536 timestring(), length, 						
2 nmblib.c    send_udp              557 timestring(),len,inet_ntoa(ip), 
2 reply.c     reply_unknown         289 timestring(),

1 reply.c     reply_writebraw      1654 timestring(), fnum, cnum, 
					startpos, numtowrite, nwritten,
2 reply.c     reply_writebraw      1700 timestring(),fnum,cnum, 					
startpos, numtowrite,
3 reply.c     reply_writeunlock    1762 timestring(), fnum, cnum, 
2 reply.c     reply_close          2004 timestring(), 
					Files[fnum].fd_ptr->fd, fnum
3 reply.c     reply_writeclose     2047 timestring(), fnum, cnum,
					numtowrite, nwritten
2 reply.c     reply_unknown         289 timestring(),
3 reply.c     reply_printqueue     2309 timestring(),cnum,start_index, 
1 reply.c     reply_lockingX       3070 timestring(),fnum,cnum, 
1 server.c    close_file           1328 timestring(), 
5 trans2.c    call_trans2findfirst  712 timestring(),
6 trans2.c    call_trans2findnext   868 timestring(),
2 uid.c       unbecome_user         324 timestring(),OriginalDir));

  If any of thses are actually used as part of the SMB protocol,
we'll have a problem in year 2000...  Butso will Microsoft. If they're
just log stuff, we're safe.

  A simple (minded!) test might be to change the %D and see if
Samba crashes out in the regression tests (:-))

  I would very much like to know if there are date problem with
the protocol...  

David Collier-Brown,  | Cherish your enemies: they're harder
185 Ellerslie Ave.,   | to come by than friends, and MUCH more
Willowdale, Ontario   | motivated. -- davecb at
M2N 1Y3. 416-223-8968 |

More information about the samba mailing list