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

3642 Commits

Author SHA1 Message Date
Günther Deschner
55bc1cfae3 s3-lsa: implement _lsa_CreateTrustedDomainEx().
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
2011-02-16 11:35:20 +01:00
Sumit Bose
162fd0e891 s3-lsa: Let _lsa_CreateTrustedDomainEx2() use pdb_set_trusted_domain().
Signed-off-by: Günther Deschner <gd@samba.org>
2011-02-16 11:35:07 +01:00
Günther Deschner
a6bd93b8c3 s3-lsa: implement _lsa_CreateTrustedDomainEx2().
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
2011-02-16 11:34:46 +01:00
Günther Deschner
424dc1b6a3 s3-lsa: add LSA_HANDLE_TRUST_TYPE.
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
2011-02-16 11:34:46 +01:00
Günther Deschner
5b412117b2 s3-lsa: add create_lsa_policy_handle().
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
2011-02-16 11:34:46 +01:00
Volker Lendecke
9ef0e1ef22 s3: Pass "code_page" through samr 2011-02-15 21:12:22 +01:00
Volker Lendecke
63c556e306 s3: Pass "country_code" through samr 2011-02-15 21:12:22 +01:00
Günther Deschner
7ff5bf56c8 s3-rpc_server: fix some buildwarnings in non-developer mode.
Guenther
2011-02-11 16:06:06 +01:00
Günther Deschner
4063bde3ed s3-rpc_server: move services into individual directories.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Thu Feb 10 22:13:17 CET 2011 on sn-devel-104
2011-02-10 22:13:17 +01:00
Andreas Schneider
f0a90551b2 s3-rpc_server: Fixed possible segfaults in svcctl server.
Signed-off-by: Günther Deschner <gd@samba.org>
2011-02-10 17:47:04 +01:00
Günther Deschner
7a558ea27c s3-waf: fix the build after auth changes.
Andrews, please check.

Guenther
2011-02-10 12:58:06 +01:00
Andrew Bartlett
2b05ba77b4 s3-auth Rename cryptic 'ptok' to security_token
This will allow the auth_serversupplied_info struct to be migrated
to auth_session_info easier.

Adnrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-02-10 06:51:06 +01:00
Andrew Bartlett
d66150c14d libcli/named_pipe_auth Change from 'info3' to auth_session_info_transport
This changes the structure being used to convey the current user state
from the netlogon-derived 'netr_SamInfo3' structure to a purpose-built
structure that matches the internals of the Samba auth subsystem and
contains the final group list, as well as the final privilege set and
session key.

These previously had to be re-created on the server side of the pipe
each time.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-02-10 06:51:06 +01:00
Andreas Schneider
edbd6f4a93 s3-rpc_server: We need a messaging context for rpc.
Autobuild-User: Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date: Wed Feb  9 17:26:00 CET 2011 on sn-devel-104
2011-02-09 17:26:00 +01:00
Andreas Schneider
1b5609aa4d s3-rpc_server: Fixed possible segfault with client_id. 2011-02-09 16:42:19 +01:00
Stefan Metzmacher
d04c2c575a s3:rpc_server: create binding_handle in rpc_pipe_open_external()
metze

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Wed Feb  9 12:30:50 CET 2011 on sn-devel-104
2011-02-09 12:30:50 +01:00
Volker Lendecke
5a0ee95b95 s3: Fix some nonempty blank lines and some typos
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Wed Feb  9 00:01:45 CET 2011 on sn-devel-104
2011-02-09 00:01:45 +01:00
Günther Deschner
8b64d0607b s3-spoolss: Dont wipe out all drivers when only one should be deleted.
Great catch from Bjoern Baumbach <bb@sernet.de> !

Andreas, Simo, please check.

We now have a torture test (rpc.spoolss.driver.driver.multiple_drivers) for this.

Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Tue Feb  8 18:11:48 CET 2011 on sn-devel-104
2011-02-08 18:11:48 +01:00
Günther Deschner
7637e1df8e s3-waf: fix the build after winreg and rpc services changes.
Andreas, please check.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Mon Feb  7 13:18:41 CET 2011 on sn-devel-104
2011-02-07 13:18:41 +01:00
Andreas Schneider
1c6276ce7a s3-rpc_server: Migrated spoolss to dcerpc_winreg_set_multi_sz.
Signed-off-by: Günther Deschner <gd@samba.org>
2011-02-07 12:32:02 +01:00
Andreas Schneider
1f0c766fa6 s3-rpc_server: Migrated spoolss to dcerpc_winreg_query_dword.
Signed-off-by: Günther Deschner <gd@samba.org>
2011-02-07 12:32:02 +01:00
Andreas Schneider
df75045e0d s3-rpc_server: Migrated spoolss to dcerpc_winreg_set_X.
Signed-off-by: Günther Deschner <gd@samba.org>
2011-02-07 12:32:02 +01:00
Andreas Schneider
ee817f63ce s3-rpc_server: Migrated spoolss to dcerpc_winreg_set_X.
Signed-off-by: Günther Deschner <gd@samba.org>
2011-02-07 12:32:01 +01:00
Andreas Schneider
e8bf397eb0 s3-rpc_server: Migrated spoolss to dcerpc_winreg_set_dword.
Signed-off-by: Günther Deschner <gd@samba.org>
2011-02-07 12:32:01 +01:00
Andreas Schneider
460aedc4b1 s3-rpc_server: Migrated spoolss to dcerpc_winreg_set_sz..
Signed-off-by: Günther Deschner <gd@samba.org>
2011-02-07 12:32:01 +01:00
Andreas Schneider
8238732330 s3-rpc_server: Migrated spoolss to dcerpc_winreg_enum_keys.
Signed-off-by: Günther Deschner <gd@samba.org>
2011-02-07 12:32:01 +01:00
Andreas Schneider
b2ddfc642d s3-smbd: Init the svcctl registry keys on service startup.
Signed-off-by: Günther Deschner <gd@samba.org>
2011-02-07 12:32:01 +01:00
Andreas Schneider
f1d5cea322 s3-rpc_server: Added a winreg based svcctl registry init.
Signed-off-by: Günther Deschner <gd@samba.org>
2011-02-07 12:32:01 +01:00
Andreas Schneider
09dafc4a25 s3-rpc_server: Added a svcctl shutdown function.
Signed-off-by: Günther Deschner <gd@samba.org>
2011-02-07 12:32:01 +01:00
Andreas Schneider
96565db5f6 s3-services: Migrated svcctl registry functions to winreg.
This is a bigger commit. It moves the relevant function to
svc_winreg_glue. We need to use them in the same commit else we have
problems with prototypes in proto.h.

Signed-off-by: Günther Deschner <gd@samba.org>
2011-02-07 12:32:01 +01:00
Andreas Schneider
a3a38fdb55 s3-smbd: Init the eventlog registry on service startup.
Signed-off-by: Günther Deschner <gd@samba.org>
2011-02-07 12:32:00 +01:00
Andreas Schneider
22ea293381 s3-rpc_server: Added a winreg based eventlog registry init.
This enumerates the keys first and only creates them if they don't exist
yet.

Signed-off-by: Günther Deschner <gd@samba.org>
2011-02-07 12:32:00 +01:00
Andreas Schneider
75abfa6f94 s3-rpc_server: Migrated eventlog to winreg.
Signed-off-by: Günther Deschner <gd@samba.org>
2011-02-07 12:32:00 +01:00
Stefan Metzmacher
8111d95655 s3:rpc_server: fix make_external_rpc_pipe_p() and create read and write queues
They are needed for the callers in rpc_server/srv_pipe_hnd.c.

It seems I only looked at the caller in rpc_server/rpc_ncacn_np.c
when I've done the change of commit e55426fe79.

Thanks Volker for finding this :-)

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon Feb  7 11:40:20 CET 2011 on sn-devel-104
2011-02-07 11:40:20 +01:00
Günther Deschner
f1d51aa6f2 s3-netlogon: fix typo.
Guenther
2011-02-07 10:02:05 +01:00
Volker Lendecke
a61b17ce56 s3: Make "endpoint_table" static
Andreas, this is only used in srv_epmapper right now. Make public again when
this will be used somewhere else.

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sun Feb  6 21:33:04 CET 2011 on sn-devel-104
2011-02-06 21:33:04 +01:00
Stefan Metzmacher
17c01a5e90 s3:rpc_server/netlogon: reject validation level 6 without ads support
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri Feb  4 10:06:26 CET 2011 on sn-devel-104
2011-02-04 10:06:26 +01:00
Günther Deschner
62048fa95c s3-waf: fix the build after epmapper changes.
Andreas, please check.

Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Wed Feb  2 17:14:40 CET 2011 on sn-devel-104
2011-02-02 17:14:40 +01:00
Günther Deschner
50be0b2c1e s3: Remove superfluous ;
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Wed Feb  2 15:44:21 CET 2011 on sn-devel-104
2011-02-02 15:44:21 +01:00
Andreas Schneider
d0d5d59943 s3-smbd: Disable the endpoint mapper by default. 2011-02-02 12:44:20 +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
612060d677 s3-rpc_server: Only allow registering endpoints on priviledged pipes. 2011-02-02 12:44:20 +01:00
Andreas Schneider
bd5d14e6fa s3-epmapper: Commented unimplemented functions. 2011-02-02 12:44:20 +01:00
Andreas Schneider
c451a454b3 s3-epmapper: Improved the epm_Map function. 2011-02-02 12:44:20 +01:00
Andreas Schneider
1d33f5c6d6 s3-epmapper: Implemented epm_Lookup. 2011-02-02 12:44:20 +01:00
Andreas Schneider
5b93e06e6c s3-epmapper: Implemented epm_LookupHandleFree. 2011-02-02 12:44:20 +01:00
Andreas Schneider
3584dd18df s3-epmapper: Added arg to match uuid in build_ep_list(). 2011-02-02 12:44:20 +01:00
Andreas Schneider
658c05b939 s3-epmapper: Added epm_Map function from Samba4. 2011-02-02 12:44:20 +01:00
Andreas Schneider
6747b89b3c s3-epmapper: Added epm_Delete function. 2011-02-02 12:44:20 +01:00
Andreas Schneider
c31ee9a152 s3-epmapper: Added epm_Insert function. 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
Stefan Metzmacher
4507d2b9eb s3:rpc_server/netlogon: add _netr_LogonSamLogon_check()
We need to check for invalid parameters before we check for
access denied.

metze
2011-02-02 11:58:26 +01:00
Stefan Metzmacher
1f83325261 s3:srv_spoolss: use dcerpc_spoolss_X() functions
metze

Signed-off-by: Andreas Schneider <asn@samba.org>
2011-01-21 12:30:22 +01:00
Günther Deschner
8db3258983 s3-spoolss: make it more obvious what winreg_create_printer() does.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Fri Jan 21 11:43:29 CET 2011 on sn-devel-104
2011-01-21 11:43:29 +01:00
Günther Deschner
be884c1bfd s3-spoolss: as smbtorture testing proves: devmode size is the size of the devicemode minus the driverdata extra size.
Jeremy, please check.

Guenther
2011-01-21 10:58:20 +01:00
Günther Deschner
9b1878e538 s3-spoolss: disallow storing an invalid devmode size.
Guenther
2011-01-21 10:58:20 +01:00
Günther Deschner
6feed0c9d2 s3-netlogon: no need to include ../librpc/gen_ndr/ndr_lsa_c.h anymore.
Guenther
2011-01-18 23:54:31 +01:00
Günther Deschner
6ed4121d54 s3-netlogon: no need to include ../librpc/gen_ndr/cli_samr.h anymore.
Guenther
2011-01-18 23:54:31 +01:00
Jeremy Allison
7754b75065 Fix error where Windows client spoolss returns WERR_INVALID_DATA W_ERROR(0x0000000D)
on opening a printer. We can't return zero for devmode->size. Guenther please check !

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Tue Jan 18 23:45:33 CET 2011 on sn-devel-104
2011-01-18 23:45:33 +01:00
Günther Deschner
d7af8753ab s3-waf: fix the build after rpc_winreg removal.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Fri Jan 14 11:38:40 CET 2011 on sn-devel-104
2011-01-14 11:38:40 +01:00
Günther Deschner
a451c54b3d s3-spoolss: no need to include cli_winreg header anymore.
Guenther

Signed-off-by: Andreas Schneider <asn@samba.org>
2011-01-13 14:14:36 +01:00
Andreas Schneider
b17eb8256d s3-netlogon: Move to new dcerpc client funtions.
Signed-off-by: Günther Deschner <gd@samba.org>
2011-01-10 18:20:55 +01: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
d2e93cce88 s3-waf: Fixed the static rpc service build.
Autobuild-User: Andreas Schneider <asn@samba.org>
Autobuild-Date: Tue Jan  4 12:09:48 CET 2011 on sn-devel-104
2011-01-04 12:09:48 +01:00
Günther Deschner
d0e164458d s3-spoolss: handle NTTIME(0) as "01/01/1601" REG_SZ in driver dates.
Guenther
2010-12-22 13:33:18 +01:00
Volker Lendecke
d096de56b1 s3: Remove unused "retry" from cli_full_connection 2010-12-20 17:10:58 +01:00
Günther Deschner
1b293c90be spoolss: fill in PerMachineConnections add and delete IDL.
Guenther
2010-12-16 10:52:50 +01:00
Stefan Metzmacher
e55426fe79 s3:rpc_client: let rpc_transport_tstream_init() create read and write queue
metze
2010-12-15 15:26:05 +01:00
Günther Deschner
5130e4a622 s3-waf: rework rpc_server handling a bit.
Guenther
2010-12-15 10:56:18 +01:00
Günther Deschner
8be11b2477 s3-waf: fix pam dependencies of the RPC_SAMR server.
Guenther
2010-12-07 11:49:57 +01:00
Günther Deschner
133a2ffd00 s3-waf: avoid module name uppercasing.
This finally allows mixed case module names like the classic build
(./configure --shared_modules=charset_CP850)

Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Wed Dec  1 18:39:14 CET 2010 on sn-devel-104
2010-12-01 18:39:14 +01:00
Günther Deschner
2b0905aeae s3-waf: convert RPC_LSARPC into a subsystem.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Wed Dec  1 00:13:58 CET 2010 on sn-devel-104
2010-12-01 00:13:58 +01:00
Günther Deschner
c291195251 s3-waf: convert RPC_SAMR into a subsystem.
Guenther
2010-11-30 23:27:15 +01:00
Günther Deschner
5855194894 s3-spoolss: fix typo in debug message.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Fri Nov 19 12:05:10 CET 2010 on sn-devel-104
2010-11-19 12:05:10 +01:00
Günther Deschner
98612fe793 s3-spoolss: make sure members of "BUILTIN\Print Operators" can open printers
with admin privileges.

Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Wed Nov 17 15:05:02 UTC 2010 on sn-devel-104
2010-11-17 15:05:01 +00:00
Günther Deschner
ee8c035c41 s3-spoolss: add debug statement for access denied cases in OpenPrinterEx path.
Guenther
2010-11-17 15:20:15 +01:00
David Disseldorp
1c579318ae s3-spoolss: fix spoolss GetPrinterData behaviour
Windows sends spoolss GetPrinterData requests with an offered buffer
size of zero, Model and TrayFormTable data is commonly requested in
this way.

Samba's GetPrinterData response for the above case includes the correct
error code (WERR_MORE_DATA), however the type field is set to REG_NONE.
This causes Windows (seen on XP and 2k3) to give up on the request.

If the type field is retained (not set to REG_NONE) when responding with
WERR_MORE_DATA, Windows reissues the GetPrinterData request with an
increased offered buffer size.

Signed-off-by: Günther Deschner <gd@samba.org>
2010-11-10 15:23:22 +01:00
Jeremy Allison
f0dcc90f72 Fix bug 7781 - Samba transforms ShareName to lowercase (sharename) when adding new share via MMC
Change the find_service() interface to not depend on fstring, and
create a useable talloc-based interface.

Jeremy.
2010-11-10 01:14:17 +00:00
Jeremy Allison
9997ee813b Remove fstring from map_username. Create a more sane interface than the called-parameter-is-modified.
Jeremy.
2010-11-10 01:14:17 +00:00
Andrew Tridgell
986a00dcef s3-waf: fixed paths in s3 waf build for rpc_server
paths in waf rules are relative

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-10-25 11:12:03 +11:00
Jeremy Allison
272feb7bd1 Revert "Wrap security_token_has_privilege() with a check for lp_enable_privileges(). Needed"
Not needed - privileges code prevents "enable privileges = no" from adding privileges
anyway.

This reverts commit a8b95686a7.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Oct 22 23:41:36 UTC 2010 on sn-devel-104
2010-10-22 23:41:36 +00:00
Jeremy Allison
a8b95686a7 Wrap security_token_has_privilege() with a check for lp_enable_privileges(). Needed
to maintain compatibility with smb.conf manpage.

Jeremy.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Oct 22 18:15:48 UTC 2010 on sn-devel-104
2010-10-22 18:15:48 +00:00
Günther Deschner
fa2a2d562f s3-waf: convert rpc into a subsystem.
Guenther
2010-10-19 18:26:59 +02:00
Andreas Schneider
a8f26f60ec s3-rpc_server: Normalize rpc_pipe_open_interface pipe name.
Autobuild-User: Andreas Schneider <asn@samba.org>
Autobuild-Date: Fri Oct 15 12:15:45 UTC 2010 on sn-devel-104
2010-10-15 12:15:45 +00:00
Andreas Schneider
f22e6cf3b7 s3-rpc_server: Make auth_serversupplied_info const. 2010-10-15 11:34:03 +00:00
Andrew Bartlett
170b345e0c s3-auth Use security_token_debug() from common code
This prints the security token including the privileges as strings
instead of just a bitmap.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-10-14 02:35:04 +00:00
Andrew Bartlett
deb7c02436 s3 Replace is_sid_in_token() with security_token_has_sid() from common code
The two routines are identical, so there is no need to keep both.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-10-14 02:35:04 +00:00
Andrew Bartlett
f768b32e37 libcli/security Provide a common, top level libcli/security/security.h
This will reduce the noise from merges of the rest of the
libcli/security code, without this commit changing what code
is actually used.

This includes (along with other security headers) dom_sid.h and
security_token.h

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Tue Oct 12 05:54:10 UTC 2010 on sn-devel-104
2010-10-12 05:54:10 +00:00
Günther Deschner
33c6a4eb8a s3-spoolss: add more userlevel info validation to _spoolss_OpenPrinterEx.
Guenther
2010-10-11 14:31:06 +00:00
Günther Deschner
025290e9bf s3-spoolss: let set_printer_hnd_name return WERROR.
Guenther
2010-10-11 14:31:06 +00:00
Günther Deschner
c8a295ab7f s3-spoolss: convert open_printer_hnd to return WERROR.
Guenther
2010-10-11 14:31:06 +00:00
Günther Deschner
fe724c70d2 s3-spoolss: fix set_printer_hnd_name() to match torture test.
Guenther
2010-10-11 14:31:06 +00:00
Volker Lendecke
5e482aeebf s3: Implement echo_TestSleep 2010-10-08 21:11:45 +02:00
Günther Deschner
d8c86a7f77 s3-spoolss: make it possible to have and announce a [prnproc$] share on the printserver.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Thu Oct  7 16:09:14 UTC 2010 on sn-devel-104
2010-10-07 16:09:14 +00:00
Günther Deschner
b7683a2c9d samr: for correctness, rename samr_RidTypeArray to samr_RidAttrArray.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Thu Oct  7 12:04:32 UTC 2010 on sn-devel-104
2010-10-07 12:04:32 +00:00
Günther Deschner
71ab8f326b s3-samr: fix _samr_QueryGroupMember().
that array contains attributes, not sid types.

Guenther
2010-10-07 13:24:22 +02:00
Jeremy Allison
4618e25c95 Fix bug 7704 - Possible error in fix to rpc_server/srv_spoolss_nt.c.
From pjb1008@cam.ac.uk - Service numbers start from 0.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Tue Oct  5 17:32:34 UTC 2010 on sn-devel-104
2010-10-05 17:32:34 +00:00
Günther Deschner
279e0c9610 spoolss: fill in spoolss_SetPort IDL.
Guenther
2010-10-04 09:29:47 +02:00
Volker Lendecke
da0ef65e04 s3: Remove talloc_autofree_context() from srv_samr_nt.c
The dispinfo structs need to survive within a process across pipe opens,
but they don't have a special destructor
2010-10-03 10:45:57 +02:00
Günther Deschner
d17a6f0493 s3-spoolss: Strip off ", DrvConvert" and ",LocalOnly" in OpenPrinterEx as seen from Win7 clients.
These suffixes and their meaning are not documented (yet).

Guenther
2010-10-02 00:42:52 +02:00