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

3673 Commits

Author SHA1 Message Date
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
Andreas Schneider
455bbd5e1e s3-spoolss: Fixed print job access. 2010-10-02 00:04:45 +02:00
Andreas Schneider
b3fd5e11e5 s3-spoolss: Fixed print_access_check server_info. 2010-10-02 00:04:45 +02:00
Günther Deschner
a88a7c76de s3-dcerpc: no point for printing NDR twice for internal pipes in log level 10.
Guenther
2010-10-01 22:30:22 +02:00
Günther Deschner
3975203a02 s3-spoolss: fix do_drv_upgrade_printer() which must have been broken since the
days we moved away from fstrings.

Guenther
2010-10-01 08:33:47 +02:00
Günther Deschner
5cb5e0aa98 s3-spoolss: make sure we dont crash on NULL setprinter level2 elements as seen from win7.
Guenther
2010-10-01 08:33:46 +02:00
Günther Deschner
48fca54a29 s3-spoolss: dont overwrite location change notify.
Guenther
2010-10-01 08:33:46 +02:00
Günther Deschner
c82d6c0b96 s3-spoolss: make sure to exit early and with the appropriate error code in
_spoolss_GetPrinterDriver2.

Guenther
2010-09-30 02:59:36 +02:00
Günther Deschner
3797d48b76 s3-spoolss: Fix servername/printername handling which turns out to be very important to get right.
Guenther
2010-09-30 02:59:35 +02:00
Günther Deschner
77d4c28032 s3-spoolss: Fix _spoolss_EnumPrintProcDataTypes error handling 2010-09-28 01:17:16 +02:00
Günther Deschner
2921888a08 s3-spoolss: Fix _spoolss_EnumPrintProcessors error handling 2010-09-28 01:17:12 +02:00
Volker Lendecke
6ee0d866c2 s3: Lift talloc_autofree_context() from make_auth_context_fixed() 2010-09-26 01:12:37 +02:00
Volker Lendecke
242e329610 s3: Lift talloc_autofree_context() from make_auth_context_subsystem() 2010-09-26 01:12:37 +02:00
Jeremy Allison
d8814b1a48 Fix bug 7694 - Crash bug with invalid SPNEGO token.
Found by the CodeNomicon test suites at the SNIA plugfest.

http://www.codenomicon.com/

If an invalid SPNEGO packet contains no OIDs we crash in the SMB1/SMB2 server
as we indirect the first returned value OIDs[0], which is returned as NULL.

Jeremy.
2010-09-23 21:44:24 -07:00
Simo Sorce
76f249fb44 s3-dcerps: check auth_type
make sure the auth type used throught the auth operation is consistent.

Signed-off-by: Günther Deschner <gd@samba.org>
2010-09-23 10:54:25 -07:00
Simo Sorce
b11fff1f48 s3-dcerpc: remove auth_data_free_func
Everything is using a talloc pointer now, no need to have an
accessor function to free data anymore.

Signed-off-by: Günther Deschner <gd@samba.org>
2010-09-23 10:54:24 -07:00
Simo Sorce
3453bc7b11 s3-dcerpc: make auth context opaque
This way we always double check in advance that the context
is of the right type with talloc_get_type_abort instead of
potentially accessing random memory by addressing the wrong
structure in the union.

Signed-off-by: Günther Deschner <gd@samba.org>
2010-09-23 10:54:24 -07:00
Simo Sorce
0ec3720573 srv_pipe: reorganize code so that related functions are close to each other
Signed-off-by: Günther Deschner <gd@samba.org>
2010-09-23 10:54:23 -07:00
Simo Sorce
d10e192b83 s3-dcerpc: finally remove the legaqcy spnego_type variable from pipe_auth_data
Signed-off-by: Günther Deschner <gd@samba.org>
2010-09-23 10:54:23 -07:00
Simo Sorce
b475cfd0b2 s3-dcerpc: use new spnego server code
Signed-off-by: Günther Deschner <gd@samba.org>
2010-09-23 10:54:23 -07:00
Simo Sorce
4cdee9b0ed s3-dcerpc: add spnego server helpers
squashed: add michlistMIC signature checks

Signed-off-by: Günther Deschner <gd@samba.org>
2010-09-23 10:54:23 -07:00
Simo Sorce
62d7226b78 s3-dcesrv: use gssapi helper in srv_pipe.c
Signed-off-by: Günther Deschner <gd@samba.org>
2010-09-23 10:54:22 -07:00
Simo Sorce
28c22d04fb s3-dcerpc: add server helpers for gssapi auth
Signed-off-by: Günther Deschner <gd@samba.org>
2010-09-23 10:54:19 -07:00
Simo Sorce
8efd31ccad s3-dcesrv: use ntlmssp helper in srv_pipe.c
Signed-off-by: Günther Deschner <gd@samba.org>
2010-09-23 10:53:46 -07:00
Simo Sorce
bbf535764b s3-dcerpc: add server helpers for ntlmssp auth
Signed-off-by: Günther Deschner <gd@samba.org>
2010-09-23 10:53:42 -07:00
Simo Sorce
4194383cfe gssapi: remove unused function argument
Signed-off-by: Günther Deschner <gd@samba.org>
2010-09-23 10:36:54 -07:00
Simo Sorce
412ebad02b gssapi: avoid explicit dependency on dcerpc specific structures
Signed-off-by: Günther Deschner <gd@samba.org>
2010-09-23 10:36:54 -07:00
Simo Sorce
0e5eb82a6f s3-dcerpc: move crypto stuff in /librpc/crypto
Signed-off-by: Günther Deschner <gd@samba.org>
2010-09-23 10:36:54 -07:00
Günther Deschner
a233c0c0d2 s3-lsa: Fix sid in DEBUG in_lsa_EnumAccountRights.
Andrew, you removed the sid_copy buit forgot the sid, please check.

Guenther
2010-09-21 21:00:32 -07:00
Michael Adam
4696cd6cbe s3:registry: move reg_api_regf prototypes to their own header file.
These two calls are currently only used in the WINREG rpc server.
And this reqires linking in the regfio code.
2010-09-21 08:52:06 +02:00
Michael Adam
b11cc30508 s3:registry: move the reg_api prototypes to their own header. 2010-09-21 08:52:06 +02:00
Michael Adam
e869af9e0e s3:rpc_server:ntsvcs: registry is not directly used an more. 2010-09-21 06:53:32 +02:00
Michael Adam
d760e543a1 s3:rpc_server:ntsvcs: use svcctl_lookup_dispname instead of legacy svcctl in _PNP_GetDeviceRegProp 2010-09-21 06:53:32 +02:00
Michael Adam
4cee4bbd02 s3:rpc_server: registry is not direclty used in the svcctl server any more 2010-09-21 06:53:31 +02:00
Michael Adam
3cab109754 s3:srv_ntsvcs_nt: make fill_svc_config() use svcctl_get_string_value()
instead of using legacy svcctl_fetch_regvalues()
2010-09-21 06:53:31 +02:00
Michael Adam
9bfd587358 s3:services_db: remove the TALLOC_CTX argument from svcctl_set_secdesc 2010-09-21 06:53:30 +02:00
Günther Deschner
102a70e809 s3-util: use shared dom_sid_dup.
Guenther
2010-09-20 14:05:07 -07:00
Günther Deschner
4dbd743e46 s3-util_sid: use shared dom_sid_compare_auth and dom_sid_equal_X functions.
Guenther
2010-09-20 14:04:37 -07:00
Michael Adam
0f7e503d21 s3:registry: move higher level function reg_open_path to new module reg_api_util
The reg_api.c code should just export functions that direclty relate to winreg
api calls.
2010-09-20 19:58:01 +02:00
Andrew Tridgell
dc59de5627 s4-netlogon: added IDL for netr_DsrUpdateReadOnlyServerDnsRecords
this is used by a RODC to do DNS updates, as TSIG updates are not
allowed by RODCs

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-09-16 21:09:17 +10:00
Günther Deschner
33d05a85e5 s3-rpc_server: fix some uninitalized variables and c++ build warnings.
Guenther
2010-09-15 13:24:44 +02:00
Andreas Schneider
e580c6d88f s3-rpc_server: Use talloc_stackframe. 2010-09-15 12:53:43 +02:00
Simo Sorce
8ec7aaef48 s3-rpc_server: Moved ncacn_np declarations in common header file.
Signed-off-by: Andreas Schneider <asn@samba.org>
2010-09-15 12:53:42 +02:00
Simo Sorce
390642a9e6 s3-rpc_server: Moved "external" pipe functions to rpc_ncacn_np.c.
Signed-off-by: Andreas Schneider <asn@samba.org>
2010-09-15 12:53:42 +02:00
Andreas Schneider
34225c93af s3-rpc_server: Added new parametric option 'rpc_server'
Signed-off-by: Andreas Schneider <asn@samba.org>
2010-09-15 12:53:42 +02:00
Simo Sorce
738c843e99 s3-rpc_server: Renamed rpc_ncacn_np_internal.c.
Signed-off-by: Andreas Schneider <asn@samba.org>
2010-09-15 12:53:42 +02:00
Simo Sorce
5685914344 s3-rpc_server: Convert rpc_connect_spoolss_pipe into a generic interface.
This way we have one common way to open internal pipes whether they
are shortcircuited or piped to an external process.
2010-09-15 12:53:42 +02:00
Simo Sorce
344260d03e s3-rpc_server: Added support for internal connections to external daemons.
Signed-off-by: Andreas Schneider <asn@samba.org>
2010-09-15 12:53:42 +02:00
Simo Sorce
e7c4555b7c s3-rpc_server: Accept connections and process requests.
Signed-off-by: Andreas Schneider <asn@cynapses.org>
2010-09-15 12:53:42 +02:00
Simo Sorce
f7f9916dc7 s3-rpc_server: Added helper functions to read data from a ncacn socket.
Signed-off-by: Andreas Schneider <asn@cynapses.org>
2010-09-15 12:53:42 +02:00
Simo Sorce
a1f1da7226 s3-rpc_server: Addded function to create custom pipes_struct.
Signed-off-by: Andreas Schneider <asn@cynapses.org>
2010-09-15 12:53:41 +02:00
Simo Sorce
b1fdc5a704 s3-rpc_server: Add generic listener callback.
Signed-off-by: Andreas Schneider <asn@cynapses.org>
2010-09-15 12:53:41 +02:00
Simo Sorce
3c26e95840 s3-rpc_server: Added initial generic RPC server infrastructure.
Signed-off-by: Andreas Schneider <asn@cynapses.org>
2010-09-15 12:53:41 +02:00
Simo Sorce
11721874c3 s3-rpc_server: Added debug to see how much data has been read out.
Signed-off-by: Andreas Schneider <asn@cynapses.org>
2010-09-15 12:53:41 +02:00
Simo Sorce
5ccd7a56fa s3-rpc_server: Make process_incoming_data() public.
Signed-off-by: Andreas Schneider <asn@cynapses.org>
2010-09-15 12:53:41 +02:00
Simo Sorce
2ef693e3c8 s3-rpc_server: Make pipe destructor public.
Signed-off-by: Andreas Schneider <asn@cynapses.org>
2010-09-15 12:53:41 +02:00
Simo Sorce
3f04b54197 s3-rpc_server: Fixed unhandled error condition.
Signed-off-by: Andreas Schneider <asn@samba.org>
2010-09-15 12:53:40 +02:00
Andrew Bartlett
b733d9dee0 s3-samr Explian better the use of two privileges in this call
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-09-11 18:46:13 +10:00
Andrew Bartlett
aefe60da8c s3-util_sid Tidy up global struct security_token
This no longer needs to be global, and should be const.  We now also
init it with the C99 style initialisers.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-09-11 18:46:12 +10:00
Andrew Bartlett
9883993b66 s3-privs Overhaul PRIVILEGE_SET handling, avoid dealing with the bitmap
This avoids us dealing with the privilege bitmap in the LSA server, and
overhauls much of the rest of the handling to be currnet with the modern
world of talloc.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-09-11 18:46:11 +10:00
Andrew Bartlett
ad5ec58a71 s3-privs Hide the bitmap-based grant_privilege and revoke_privilege
The new wrappers avoid anything but the core privileges code
dealing with the bitmap values directly.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-09-11 18:46:11 +10:00
Andrew Bartlett
4080ff7af5 s3-privs Make privilege_enum_sids() take an LUID, not a bitmap
This moves one more privileges call away from direct bitmap manipuation.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-09-11 18:46:11 +10:00
Andrew Bartlett
6d78e11e17 libcli/security make sec_privilege_id() return SEC_PRIV_INVALID on failure.
Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-09-11 18:46:10 +10:00
Andrew Bartlett
62e5900cd1 s3-privs Rework access_check_object() to take two privileges
This allows the privileges bitmap to be used only when setting
privileges, and uses an the LUID constant for all 'does this user
have this privilege' operations.

The advantage is that we now only need one API to determine if a
token has a privilege, and much less code needs to know what type
is used for the underlying bitmap.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-09-11 18:46:10 +10:00
Andrew Bartlett
2bb7b827d6 libcli/security Remove luid_to_se_priv() and luid_to_privilege_name()
These functions duplicate other functions in the merged code.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-09-11 18:46:10 +10:00
Andrew Bartlett
3bb77516b8 s3-privs Convert from user_has_privileges() -> security_token_has_privilege()
This new call is available in the merged privileges code, and
takes an enum as the parameter, rather than a bitmask.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-09-11 18:46:09 +10:00
Andrew Bartlett
b057867de3 s3-privs Remove a pointer from grant_privilege()
Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-09-11 18:46:09 +10:00
Andrew Bartlett
0e2142a927 s3-privs Remove pointer indirection from se_priv_to_privilege_set()
Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-09-11 18:46:09 +10:00
Andrew Bartlett
a02ae674dd s3-privs Remove a pointer indirection from revoke_privilege()
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-09-11 18:46:08 +10:00
Andrew Bartlett
cbd72ab93b libcli/security Don't export privs[] as a global variable
Instead, provide access functions for the LSA and net sam callers
for the information they need.

They still only enumerate the first 8 privileges that have traditionally
been exposed.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-09-11 18:46:08 +10:00