Unnecessary lines in SAMBA3 printing/printing.c

Aleksey Fedoseev fedoseev at ru.ibm.com
Wed Jul 19 11:29:29 GMT 2006


I found one interesting place in current samba-3 code.

Printing start_background_queue (printing/printing.c) forks main smbd
process. After the fork we've to reinitialize locking/messaging/etc
based on TDB (tdb_reopen_all),. But the code here is:

  if (!locking_init(0)) {
       exit(1);
  }

This code is unnecessary, cause locking was already initialized in smbd
(see server.c:937) and the second call of locking_init will exit
immediately (as all databased were initialized).

May be this code should be replaced with tdb_reopen_all as in
server.c:479?..

-- 
Aleksey Fedoseev
Linux Center of Competence, IBM EE/A
IBM Linux Technology Center: Samba Team
Phone: +7495 775-8800 x 2133


More information about the samba-technical mailing list