diff options
author | Andreas Schneider <asn@samba.org> | 2010-08-10 13:45:55 +0200 |
---|---|---|
committer | Simo Sorce <idra@samba.org> | 2010-08-13 12:20:10 -0400 |
commit | ca8db7fd63749989dcb3daae0c38b8b788ebdfb8 (patch) | |
tree | 2a5f3b489ceded219dc0fff7f87238db2fcfe3a7 /source3/smbd/server.c | |
parent | aff002e829b8169997f7f446959e2f1d5baf3a60 (diff) | |
download | samba-ca8db7fd63749989dcb3daae0c38b8b788ebdfb8.tar.gz samba-ca8db7fd63749989dcb3daae0c38b8b788ebdfb8.tar.bz2 samba-ca8db7fd63749989dcb3daae0c38b8b788ebdfb8.zip |
s3-smbd: Publish nt printers.
Reloading of the printers requires rpc services up and running! The
first call in reload_services will be skipped.
Signed-off-by: Simo Sorce <idra@samba.org>
Diffstat (limited to 'source3/smbd/server.c')
-rw-r--r-- | source3/smbd/server.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/source3/smbd/server.c b/source3/smbd/server.c index ca6f6c8e16..1c614dad0b 100644 --- a/source3/smbd/server.c +++ b/source3/smbd/server.c @@ -982,8 +982,17 @@ extern void build_options(bool screen); if (smbd_messaging_context() == NULL) exit(1); - if (!reload_services(smbd_messaging_context(), False)) - return(-1); + /* + * Reloading of the printers will not work here as we don't have a + * server info and rpc services set up. It will be called later. + */ + if (!reload_services(smbd_messaging_context(), False)) { + exit(1); + } + + /* ...NOTE... Log files are working from this point! */ + + DEBUG(3,("loaded services\n")); init_structs(); @@ -1002,8 +1011,6 @@ extern void build_options(bool screen); } #endif - DEBUG(3,( "loaded services\n")); - if (!is_daemon && !is_a_socket(0)) { if (!interactive) DEBUG(0,("standard input is not a socket, assuming -D option\n")); @@ -1156,6 +1163,9 @@ extern void build_options(bool screen); static_init_rpc; + /* Publish nt printers, this requires a working winreg pipe */ + reload_printers(smbd_messaging_context()); + /* only start the background queue daemon if we are running as a daemon -- bad things will happen if smbd is launched via inetd and we fork a copy of |