1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
Commit Graph

690 Commits

Author SHA1 Message Date
Andrew Tridgell
c8297073db s3-fault: removed the cont_fn from fault_setup()
cont_fn() was supposed to be a way to continue after a seg fault. It
could never be called however, as smb_panic() from fault_report()
could never return, as dump_core() never returns at the end of
smb_panic()

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Tue Mar 22 05:07:58 CET 2011 on sn-devel-104
2011-03-22 05:07:58 +01:00
Andreas Schneider
bd66fc81b6 s3-rpc_server: Start the Endpoint Mapper Dameon if enabled.
Endpoint Mapper is still disabled by default!

Signed-off-by: Günther Deschner <gd@samba.org>
2011-03-08 11:41:29 +01:00
Günther Deschner
8643683dd8 s3-server_id: only include server_id where needed.
Guenther
2011-03-02 12:12:31 +01:00
Andreas Schneider
eece80e62c s3-smbd: Pass tevent context to messaging functions.
Autobuild-User: Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date: Mon Feb 28 19:00:08 CET 2011 on sn-devel-104
2011-02-28 19:00:08 +01:00
Gregor Beck
58081884f7 s3: smbcontrol to notify smbd about idmap changes
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Mon Feb 28 14:07:23 CET 2011 on sn-devel-104
2011-02-28 14:07:23 +01:00
Günther Deschner
8225c0ad6c s3-printing: only include printing where really needed.
Guenther
2011-02-22 21:52:18 +01:00
Günther Deschner
5a0cf0c77e s3-printing: fix pcacp prototypes and includes.
Guenther
2011-02-22 21:52:18 +01:00
Andreas Schneider
fc46ea981f s3-rpc_server: Rename srv_rpc_register.c. 2011-02-21 23:00:02 +01:00
Andreas Schneider
116144a4d0 s3-rpc_server: Rename srv_rpc_register. 2011-02-21 23:00:02 +01:00
Andreas Schneider
184702a43d s3-rpc_server: Pass tevent_context to dcerpc endpoints. 2011-02-21 23:00:02 +01:00
Volker Lendecke
51b84a9ed7 s3: Convert init_system_info to NTSTATUS 2011-02-20 10:23:29 +01:00
David Disseldorp
9c12232f1a s3: increase the log level for missing PIDs on SIGCHLD
Since the fix for bso#7836, the parent smbd is responsible for
maintaining an up-to-date printcap cache. It does this by forking a
child process to asynchronously fetch printcap data from CUPS.

When the child process exits after fetching all printcap data, the
parent smbd is sent SIGCHLD. This triggers smbd_sig_chld_handler() which
looks for the exited process PID on a "children" list.
Child smbd process PIDs are added to the "children" list to ensure
cleanup on unclean shutdown and log level change notification messages.

Printcap update process PIDs are not added to the list as they do not
maintain any state that requires cleanup, nor do they wait on tevent for
messages.

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Thu Feb 17 11:11:45 CET 2011 on sn-devel-104
2011-02-17 11:11:45 +01:00
Andreas Schneider
e3bdfd2d46 s3-smbd: Added a function to setup rpc services.
Move the complete setup of the rpc service to its own file and use
callbacks to register at the endpoint mapper.
2011-02-02 12:44:20 +01:00
Andreas Schneider
84995397a7 s3-epmapper: Added a endpoint mapper skeleton. 2011-02-02 12:44:20 +01:00
David Disseldorp
0b188e7784 s3-printing: Initiate pcap reload from parent smbd
Since commit 7022554, smbds share a printcap cache (printer_list.tdb),
therefore ordering of events between smbd processes is important when
updating printcap cache information. Consider the following two process
example:
1) smbd1 receives HUP or printcap cache time expiry
2) smbd1 checks whether pcap needs refresh, it does
3) smbd1 marks pcap as refreshed
4) smbd1 forks child1 to obtain cups printer info
5) smbd2 receives HUP or printcap cache time expiry
6) smbd2 checks whether pcap needs refresh, it does not (due to step 3)
7) smbd2 reloads printer shares prior to child1 completion (stale pcap)
8) child1 completion, pcap cache (printer_list.tdb) is updated by smbd1
9) smbd1 reloads printer shares based on new pcap information

In this case both smbd1 and smbd2 are reliant on the pcap update
performed on child1 completion.
The prior commit "reload shares after pcap cache fill" ensures that
smbd1 only reloads printer shares following pcap update, however smbd2
continues to present shares based on stale pcap data.

This commit addresses the above problem by driving pcap cache and
printer share updates from the parent smbd process.
1) smbd0 (parent) receives a HUP or printcap cache time expiry
2) smbd0 forks child0 to obtain cups printer info
3) child0 completion, pcap cache (printer_list.tdb) is updated by smbd0
4) smbd0 reloads printer shares
5) smbd0 notifies child smbds of pcap update via message_send_all()
6) child smbds read fresh pcap data and reload printer shares

This architecture has the additional advantage that only a single
process (the parent smbd) requests printer information from the printcap
backend.

Use time_mono in housekeeping functions As suggested by Björn Jacke.
2011-01-07 15:37:39 -08:00
David Disseldorp
04248c2cfa s3-printing: reload shares after pcap cache fill
Since commit eada8f8a, updates to the cups pcap cache are performed
asynchronously - cups_cache_reload() forks a child process to request
cups printer information and notify the parent smbd on completion.

Currently printer shares are reloaded immediately following the call to
cups_cache_reload(), this occurs prior to smbd receiving new cups pcap
information from the child process. Such behaviour can result in stale
print shares as outlined in bug 7836.

This fix ensures print shares are only reloaded after new pcap data has
been received.

Pair-Programmed-With: Lars Müller <lars@samba.org>
2011-01-07 15:37:39 -08:00
Andreas Schneider
8925b03b59 s3-rpcecho: Only register rpcecho in the developer build.
Autobuild-User: Andreas Schneider <asn@samba.org>
Autobuild-Date: Tue Jan  4 18:56:38 CET 2011 on sn-devel-104
2011-01-04 18:56:38 +01:00
Andreas Schneider
9aa8763976 s3-smbd: Call all the rpc services in the right order. 2011-01-04 11:23:21 +01:00
Michael Adam
813fe0bc4d s3:smbd: remove some commented out legacy code
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Thu Dec  2 01:18:19 CET 2010 on sn-devel-104
2010-12-02 01:18:19 +01:00
Volker Lendecke
f2456cd542 s3: Allow disabling of mdns registrations
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Fri Nov  5 11:24:41 UTC 2010 on sn-devel-104
2010-11-05 11:24:41 +00:00
Andrew Bartlett
ed111d11eb s3-debug Move 'load_case_tables()' before lp_set_cmdline() and popt calls
The problem here is that we cannot run lp_set_cmdline() (directly or
indirectly via the popt helpers) until load_case_tables() has been run.

However, load_case_tables does not have auto-initialisation, so we
must init it once, and once only.

Andrew Bartlett
2010-11-02 04:36:04 +00:00
Andrew Bartlett
9da4ace1d9 s3-debug Impove setup_logging() to specify logging to stderr
This change improves the setup_logging() API so that callers which
wish to set up logging to stderr can simply ask for it, rather than
directly modify the dbf global variable.

Andrew Bartlett
2010-11-02 04:36:04 +00:00
Volker Lendecke
ef96bfe885 s3: Call printer_list_parent_init in the parent
Simo, please check!
2010-10-08 21:11:46 +02:00
Volker Lendecke
b5ed09c3af Move talloc_enable_null_tracking() to the s3 daemons 2010-10-08 21:11:45 +02:00
Volker Lendecke
94dc2c106b s3: Lift smbd_messaging_context() from open_sockets_smbd() 2010-09-28 07:36:18 +02:00
Volker Lendecke
d26d79b640 s3: Remove talloc_autofree_context() from files.c 2010-09-28 07:36:18 +02:00
Volker Lendecke
3b2efdc7d7 s3: Remove talloc_autofree_context() from notify_internal_parent_init() 2010-09-26 17:36:40 +02:00
Volker Lendecke
34c0b166b6 s3: Remove talloc_autofree_context() from serverid_parent_init() 2010-09-26 03:29:28 +02:00
Volker Lendecke
8c55a9b459 s3: Remove talloc_autofree_context() from messaging_tdb_parent_init() 2010-09-26 03:29:28 +02:00
Michael Adam
d25b2adf34 s3:registry: move prototype from reg_init_full.c to its own header. 2010-09-21 08:52:06 +02:00
Günther Deschner
8e16d6dbdf s3-build: only include ctdbd_conn.h where needed.
Guenther
2010-09-20 13:54:50 -07:00
Andreas Schneider
fc1a5dbffb s3-spoolss: Don't leak memory on the session counter list.
Thanks Günther, please check.
2010-09-10 16:10:46 +02:00
Volker Lendecke
5648c3f67e s3: messaging_ctdbd_connection() was only called with procid_self()
Eventually we'll get this right...
2010-08-31 17:07:41 +02:00
Volker Lendecke
e466bb4af4 s3: Remove smbd_server_fd()
This breaks the perfcol_onefs() build.

Tim, Steve, this use of smbd_server_fd is replacable by calls into
substitute.c. I don't have a onefs environment around to build a fix, so I've
decided to insert an #error, making it not compile. The fix should be pretty
obvious, you can get the socket data via "%I" and "%i" substitutions.
2010-08-29 21:55:25 +02:00
Volker Lendecke
e784e160ec s3: Remove two uses of smbd_server_fd()
Actually, this is a bit cheating. But those two files depend on
smbd_server_conn anyway, it does not make things worse.
2010-08-29 21:55:25 +02:00
Volker Lendecke
6432383926 s3: Remove a use of smbd_server_fd() in smbd main()
The effect this might have is that we set the socket options a bit later in
inetd mode.
2010-08-29 21:55:24 +02:00
Volker Lendecke
4a58c640cc s3: Set the client_id in substitute.c once
This never changes during a client connection's life, so we can set it
once.
2010-08-29 21:55:23 +02:00
Volker Lendecke
0a8d49575c s3: Remove some references to smbd_server_fd() 2010-08-28 15:05:27 +02:00
Günther Deschner
aba1bf4b5e s3-build: only include memcache.h where needed.
Guenther
2010-08-26 00:20:28 +02:00
Volker Lendecke
7b6835ec1d s3: Add smbd_server_connection->client_id 2010-08-18 11:18:22 +02:00
Volker Lendecke
ac7b63384d s3: Lift smbd_server_fd from reload_services() 2010-08-18 11:18:21 +02:00
Volker Lendecke
2f53d1deb7 s3: Add "sock" to smbd_server_connection 2010-08-16 22:39:16 +02:00
Volker Lendecke
96ae457023 s3: Remove get_client_fd() 2010-08-16 13:13:10 +02:00
Andreas Schneider
ca8db7fd63 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>
2010-08-13 12:20:10 -04:00
Andreas Schneider
aff002e829 s3-smbd: Move rpc services init to smbd parent.
The move to the parent makes it possible to use an internal rpc pipe
really early and as we migrated serveral parts of samba to rpc function
this is required. This should speed up the fork of a smbd a bit cause
the rpc services are already running.

We still have several problems here which aren't solved. We don't have a
dependency tree here. For example we have to make sure that the registry
is initialized before we can use the winreg pipe. The spoolss server
requires winreg, so we have to start winreg before we can start the
spoolss server. I'm sure there are more dependencies.

Signed-off-by: Simo Sorce <idra@samba.org>
2010-08-13 12:20:10 -04:00
Andreas Schneider
62a2a9e27f s3-smbd: Regroup some init functions.
Signed-off-by: Simo Sorce <idra@samba.org>
2010-08-13 12:20:10 -04:00
Andreas Schneider
e18039062c s3-smbd: Cleanup the order of the init functions.
Signed-off-by: Simo Sorce <idra@samba.org>
2010-08-13 12:20:10 -04:00
Andreas Schneider
120bd9775a s3-smbd: Make sure the event context is initialized.
Signed-off-by: Simo Sorce <idra@samba.org>
2010-08-13 12:20:10 -04:00
Volker Lendecke
d0ac5c69fb s3: Remove the smbd_messaging_context from smb_conf_updated 2010-08-08 23:37:47 +02:00
Volker Lendecke
37d71a56fd s3: Pass sconn to smbd_process 2010-08-08 23:37:47 +02:00