1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-29 21:47:30 +03:00

75480 Commits

Author SHA1 Message Date
Vicentiu Ciorbaru
0c7f1d32e8 s3-net: Implemented net rpc conf setparm command
The function creates the share key if it does not exist.
If the share key was present it deletes the previous value.
After this the function sets the new value accordingly.

Signed-off-by: Michael Adam <obnox@samba.org>
2011-08-22 13:59:27 +02:00
Vicentiu Ciorbaru
ffe98b51ef s3-net: Added net rpc conf setparm command to net rpc conf
The function only appears in the commands list usage of net rpc
conf.

Signed-off-by: Michael Adam <obnox@samba.org>
2011-08-22 13:59:27 +02:00
Vicentiu Ciorbaru
1a3b88cfb3 s3-net: Implemented net rpc conf delparm command
The function makes use of existing code from delincludes.
It has the same logic, except it uses the second argument
passed to determine which value to delete from the registry.

Signed-off-by: Michael Adam <obnox@samba.org>
2011-08-22 13:59:27 +02:00
Vicentiu Ciorbaru
689edf8ae1 s3-net: Added net rpc conf delparm command to net rpc conf
The function only appears in the commands list usage of net rpc
conf.

Signed-off-by: Michael Adam <obnox@samba.org>
2011-08-22 13:59:27 +02:00
Vicentiu Ciorbaru
f370965c34 s3-net: Refactored part of rpc_conf_delincludes_internal
The function now makes use of rpc_conf_del_value to delete
the includes of a given share.

Signed-off-by: Michael Adam <obnox@samba.org>
2011-08-22 13:59:27 +02:00
Vicentiu Ciorbaru
4b3e2adf8c s3-net: Created function net_rpc_conf_del_value
Function is used to refactor some of the code used in
delincludes and also to be used in the other key manipulating
functions.

Signed-off-by: Michael Adam <obnox@samba.org>
2011-08-22 13:59:27 +02:00
Vicentiu Ciorbaru
704d7d02ac s3-net: Implemented net rpc conf delincludes command
The function openes the key attached to the service passed as a
parameter to the command and it uses dcerpc_winreg_DeleteValue to
delete the includes value if it exists

Signed-off-by: Michael Adam <obnox@samba.org>
2011-08-22 13:59:26 +02:00
Vicentiu Ciorbaru
a974f01b6b s3-net: Added net rpc conf delincludes command to net rpc conf
The function only appears in the commands list usage of net rpc
conf.

Signed-off-by: Michael Adam <obnox@samba.org>
2011-08-22 13:59:26 +02:00
Vicentiu Ciorbaru
8d335a3ad8 s3-net: Implemented net rpc conf getincludes command
The function creates a smconf_service struct that holds the share
passed as the first argument to the command and searches in it for
"include" parameters. If any are found, they are displayed.

Signed-off-by: Michael Adam <obnox@samba.org>
2011-08-22 13:59:26 +02:00
Vicentiu Ciorbaru
b52bfc1a9a s3-net: Added net rpc conf getincludes command to net rpc conf
The function only appears in the commands list usage of net rpc
conf.

Signed-off-by: Michael Adam <obnox@samba.org>
2011-08-22 13:59:26 +02:00
Vicentiu Ciorbaru
5a36306704 s3-net: Implemented net rpc conf getparm command
The function creates a smconf_service struct that holds the share
passed as the first argument to the command and searches in it for
the parameter passed as the second argument to the command

Signed-off-by: Michael Adam <obnox@samba.org>
2011-08-22 13:59:26 +02:00
Vicentiu Ciorbaru
8e2ee72bcd s3-net: Added net rpc conf getparm command to net rpc conf
The function only appears in the commands list usage of net rpc conf.

Signed-off-by: Michael Adam <obnox@samba.org>
2011-08-22 13:59:26 +02:00
Vicentiu Ciorbaru
7de814c5a7 s3-net: Implemented net rpc conf delshare command
The function makes use of dcerpc_winreg_delete_subkeys_recursive
to clear the share.

Signed-off-by: Michael Adam <obnox@samba.org>
2011-08-22 13:59:26 +02:00
Vicentiu Ciorbaru
4728cf66c5 s3-net: Added net rpc conf delshare command to net rpc conf
The function only appears in the commands list usage of net rpc conf.

Signed-off-by: Michael Adam <obnox@samba.org>
2011-08-22 13:59:25 +02:00
Vicentiu Ciorbaru
f94c8e366f s3-net: Implemented net rpc conf drop command
The function makes use of dcerpc_winreg_delete_subkeys_recursive
to clear the configuration.

Signed-off-by: Michael Adam <obnox@samba.org>
2011-08-22 13:59:25 +02:00
Vicentiu Ciorbaru
01e80f81d8 s3-net: Added net rpc conf drop command to net rpc conf
The function only appears in the commands list usage of net rpc conf.

Signed-off-by: Michael Adam <obnox@samba.org>
2011-08-22 13:59:25 +02:00
Vicentiu Ciorbaru
5f8ec78768 s3-net: Implemented net rpc conf showshare command
The function has the same logic as net rpc conf list, however it
only loads the specific share.

Signed-off-by: Michael Adam <obnox@samba.org>
2011-08-22 13:59:25 +02:00
Vicentiu Ciorbaru
2db3696303 s3-net: Added net rpc conf showshare command to net rpc conf
The function only appears in the commands list usage of net rpc conf.

Signed-off-by: Michael Adam <obnox@samba.org>
2011-08-22 13:59:25 +02:00
Vicentiu Ciorbaru
ed0c5f54aa s3-net: Implemented net rpc conf listshares command.
The function prints the names of the remote shares found, one per line.

Signed-off-by: Michael Adam <obnox@samba.org>
2011-08-22 13:59:25 +02:00
Vicentiu Ciorbaru
1ca6e99141 s3-net: Added net rpc conf listshares command to net rpc conf
The function only appears in the commands list usage of net rpc conf.

Signed-off-by: Michael Adam <obnox@samba.org>
2011-08-22 13:59:24 +02:00
Vicentiu Ciorbaru
8efd30ca61 s3-net: rpc_conf_list now uses the wrapper rpc_conf_open_conf
Signed-off-by: Michael Adam <obnox@samba.org>
2011-08-22 13:59:24 +02:00
Vicentiu Ciorbaru
f16d092ad9 s3-net: Added rpc_conf_open_conf function
The function is used as a wrapper to open the HKLM hive key and
the smbconf key.

Signed-off-by: Michael Adam <obnox@samba.org>
2011-08-22 13:59:24 +02:00
Vicentiu Ciorbaru
08be91b011 s3-net: Added the net rpc conf list command.
The command make use of the smbconf_service struct,
via the function rpc_conf_get_share(). This allows for
further expansion with the use of smbconf.

Signed-off-by: Michael Adam <obnox@samba.org>
2011-08-22 13:59:24 +02:00
Vicentiu Ciorbaru
283da12a73 s3-net: Added the command rpc conf to the net binary.
The net binary now has an extra item linked to it, the
net_rpc_conf.c module.

Signed-off-by: Michael Adam <obnox@samba.org>
2011-08-22 13:59:24 +02:00
Vicentiu Ciorbaru
b46655bd18 s3-net: Fixed whitespace errors
Fixed previously existing whitespace errors in net_rpc.c

Signed-off-by: Michael Adam <obnox@samba.org>
2011-08-22 13:59:24 +02:00
Andrew Bartlett
43c0863333 set passdb backend in Samba4 make test environments too
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Mon Aug 22 03:46:21 CEST 2011 on sn-devel-104
2011-08-22 03:46:21 +02:00
Andrew Bartlett
28f84aa55a selftest: skip all plugin_s4_dc tests if we do not have LDAP libs
This is needed as otherwise make test fails on any system without
OpenLDAP libs and headers, which causes our users concern.

Andrew Bartlett
2011-08-22 10:00:31 +10:00
Andrew Bartlett
399eae13a1 s4-provision set passdb backend to 'samba4' in template smb.conf files
This will allow smbpasswd, net sam and pdbedit to 'just work' against
the newly created databases.

Andrew Bartlett
2011-08-22 09:00:59 +10:00
Andreas Schneider
d713f9e9f5 s3-passdb: Only delete 1 entry from memcache.
If we delete or update one user we shouldn't flush the complete
memcache.

Signed-off-by: Simo Sorce <idra@samba.org>

Autobuild-User: Simo Sorce <idra@samba.org>
Autobuild-Date: Sun Aug 21 16:39:10 CEST 2011 on sn-devel-104
2011-08-21 16:39:10 +02:00
Andreas Schneider
99bb3eed1d s3-passdb: Remove always the user from getpwsid cache.
We should do it always, not only in the pdb_default_delete_user()
function.

Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21 09:08:25 -04:00
Andreas Schneider
1152aa8e03 s3-passdb: Keep caches coherent
When deleting a user send a message to all interested parties so they can
purge their caches. Otherwise some processes may positively respond with a
cached getpwnam, when the user have actully been removed.

Without this some tests that remove and then immediately create users are
flakey.

Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21 09:08:25 -04:00
Andreas Schneider
61ada700a6 s3-id_cache: Use better names for id cache management ops
The IDMAP term is normally associated with Winbind's idmap stuff.
These functions deal with id caching not id mapping.

Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21 09:08:25 -04:00
Andreas Schneider
177db0a880 s3-id_cache: Move id caches mgmt out of smbd
We must leave the MSG_IDMAP_KILL operation in SMBD as it uses smbd
specific internal globals and makes sense only in the context of a smbd
daemon.
The rest is moved under lib/ as we need to deal with id cache cleanups
in other daemons too (like lsasd).

Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21 09:08:25 -04:00
Andreas Schneider
0f4ee5d1b7 s3-lsasd: Listen on \PIPE\lsass.
Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21 09:08:24 -04:00
Andreas Schneider
8efdac83ff s3-lsasd: Add missing ncalrpc listeners.
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21 09:05:07 -04:00
Andreas Schneider
b501f6f758 s3-rpc_server: Add create_dcerpc_ncalrpc_socket().
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21 09:05:07 -04:00
Andreas Schneider
8a1572fe1b s3-rpc_server: Increase epm monitor wait time.
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21 09:05:07 -04:00
Simo Sorce
51d4b3c55d s3-prefork: Listening fds must be in non-blocking mode
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21 09:05:07 -04:00
Simo Sorce
a4188aaf7b s3-spoolss: Remove useless check
If we *really* are a bout to exit (PF_WORKER_EXITING) then the event will not
be called as the loop will exit. Otherwise PF_SRV_MSG_EXIT may not  be honoured
for a long time if we have cients connected, therefore keep handling SIGHUP
properly in those cases.

Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21 09:05:06 -04:00
Simo Sorce
2c45954622 s3-lsasd: Remove useless check
If we *really* are a bout to exit (PF_WORKER_EXITING) then the event will not
be called as the loop will exit. Otherwise PF_SRV_MSG_EXIT may not  be honoured
for a long time if we have cients connected, therefore keep handling SIGHUP
properly in those cases.

Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21 09:05:06 -04:00
Simo Sorce
7bb4b991a5 s3-prefork: Fix code to retire children
We have to be more careful when retiring children. We cannot stop
accepting connections as soon as the server tells us to quit because if
max_children is reached and we still have clients connected, the server will
not be able to spawn new children until one exits. And children will not exit
until all the clients closed the connections. So we keep operating past our
recall until we have 0 connections.
Also do not try to recall children that still have >= 1 clients connected, they
couldn't anyway.
Also use messaging to warn children and not SIGHUP.

Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21 09:05:06 -04:00
Simo Sorce
feadd849ba s3-spoolssd: Listen on parent messages
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21 09:05:06 -04:00
Simo Sorce
cce8c72eb1 s3-lsasd: Listen on parent messages
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21 09:05:06 -04:00
Simo Sorce
91ba8aec13 s3-prefork: Add parent->client messaging
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21 09:05:06 -04:00
Simo Sorce
98d2bf052e s3-lsasd: Send a message to the parent when we accept a connection
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21 09:05:06 -04:00
Simo Sorce
72746498a4 s3-spoolssd: Send a message to the parent when we accept a connection
Every time we accept a connection wanr the parent, so it can run management
routines and reallocate more resources if necessary.

Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21 09:05:06 -04:00
Simo Sorce
5c1a8dcf8e s3-messaging: Add preforked child-parent message types
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21 09:05:06 -04:00
Simo Sorce
0f71639d33 s3-prefork: Improve error detection when handling new connections
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21 09:05:05 -04:00
Simo Sorce
75f3da76e4 s3-prefork: Improve heuristics
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21 09:05:05 -04:00
Simo Sorce
89dde6b7fc s3-lsasd: User new prefork helpers to simplify code.
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21 09:05:05 -04:00