Andreas Schneider
6ffd7dc780
s3-rpc: Use struct pipes_struct.
2010-07-28 11:07:20 +02:00
Andreas Schneider
d34fc3d168
s3-wkssvc: Use struct pipes_struct.
2010-07-28 10:39:25 +02:00
Andreas Schneider
31a4240b8d
s3-winreg: Use struct pipes_struct.
2010-07-28 10:39:24 +02:00
Andreas Schneider
ce59e69bca
s3-svcctl: Use struct pipes_struct.
2010-07-28 10:39:24 +02:00
Andreas Schneider
0fee377a52
s3-srvsvc: Use struct pipes_struct.
2010-07-28 10:39:24 +02:00
Andreas Schneider
64fbaad942
s3-spoolss: Use struct pipes_struct.
2010-07-28 10:39:24 +02:00
Andreas Schneider
c3817fe9d2
s3-samr: Use struct pipes_struct.
2010-07-28 10:39:24 +02:00
Andreas Schneider
667d43d4c8
s3-rpc_pipe: Use struct pipes_struct.
2010-07-28 10:39:24 +02:00
Andreas Schneider
33d30926d1
s3-ntsvcs: Use struct pipes_struct.
2010-07-28 10:39:24 +02:00
Andreas Schneider
3fd138fae3
s3-netlogon: Use struct pipes_struct.
2010-07-28 10:39:23 +02:00
Andreas Schneider
872f965558
s3-lsa: Use struct pipes_struct.
2010-07-28 10:39:23 +02:00
Andreas Schneider
35d629d54c
s3-initshutdown: Use struct pipes_struct.
2010-07-28 10:39:23 +02:00
Andreas Schneider
ba023aeaa9
s3-eventlog: Use struct pipes_struct.
2010-07-28 10:39:23 +02:00
Andreas Schneider
c9e3737536
s3-echo: Use struct pipes_struct.
2010-07-28 10:39:23 +02:00
Andreas Schneider
96786a7df0
s3-dssetup: Use struct pipes_struct.
2010-07-28 10:39:23 +02:00
Andreas Schneider
2956bc986f
s3-dfs: Use struct pipes_struct.
2010-07-28 10:39:23 +02:00
Andreas Schneider
46397f788b
s3-rpc_server: Use struct pipes_struct.
2010-07-28 10:39:23 +02:00
Andreas Schneider
9168713774
s3-spoolss: Fixed FILL_DRIVER_STRING leading to wrong results.
2010-07-27 10:27:16 -04:00
Simo Sorce
90c1782882
s3-spoolss: Avoid segfault, check drivername is actually not NULL.
2010-07-27 10:27:16 -04:00
Simo Sorce
6cd2f2ff31
s3-spoolss: Fixed a possible segfault in winreg_get_printer.
2010-07-27 10:27:16 -04:00
Andreas Schneider
bb0226f10e
s3-spoolss: Correctly set the default values.
2010-07-27 10:27:16 -04:00
Andreas Schneider
b95d5563dd
s3-printing: Added automatic migration of printing tdbs.
...
Signed-off-by: Jim McDonough <jmcd@samba.org>
2010-07-27 10:27:15 -04:00
Andreas Schneider
924cc43d1b
s3-spoolss: Move the standard mappings to spoolss.
...
Signed-off-by: Jim McDonough <jmcd@samba.org>
2010-07-27 10:27:15 -04:00
Andreas Schneider
1be454538b
s3-spoolss: Remove the program global current_user_info.
...
Signed-off-by: Jim McDonough <jmcd@samba.org>
2010-07-27 10:27:15 -04:00
Andreas Schneider
d8c81423aa
s3-spoolss: Remove unused MAGIC_DISPLAY_FREQUENCY
...
Signed-off-by: Jim McDonough <jmcd@samba.org>
2010-07-27 10:27:15 -04:00
Simo Sorce
bdab6b10d2
s3-printing: Moved printing.c headers to include/printing.h.
...
Signed-off-by: Jim McDonough <jmcd@samba.org>
2010-07-27 10:27:14 -04:00
Simo Sorce
628f9bee05
s3-spoolss: Use WERROR for print_job_delete.
...
And also check for PJOB_SMBD_SPOOLING in print_job_write.
Signed-off-by: Jim McDonough <jmcd@samba.org>
2010-07-27 10:27:13 -04:00
Simo Sorce
660506d359
s3-printing: Handled case when smbd spools a file on behalf of spoolss.
2010-07-27 10:27:13 -04:00
Simo Sorce
94ee35f9cc
s3-printing: Made print_job_start more robust.
...
Explicitly return ntstatus errors instead of relying on elusive errno.
Split the function to make it easier to follow.
Signed-off-by: Jim McDonough <jmcd@samba.org>
2010-07-27 10:27:13 -04:00
Andreas Schneider
8d44b11c6b
s3-spoolss: Removed wrong comment.
...
This doesn't reflect the current implementation.
Signed-off-by: Jim McDonough <jmcd@samba.org>
2010-07-27 10:27:12 -04:00
Andreas Schneider
f6db3694ed
s3-spoolss: Moved shared printing functions to nt_printing.h
...
Signed-off-by: Jim McDonough <jmcd@samba.org>
2010-07-27 10:27:11 -04:00
Andreas Schneider
395dcbd111
s3-spoolss: Removed the last free_a_printer() call in spoolss_nt.c.
...
Signed-off-by: Jim McDonough <jmcd@samba.org>
2010-07-27 10:27:11 -04:00
Simo Sorce
c26bfd228d
s3-spoolss: Removed unused set_printer_dataex().
...
Signed-off-by: Jim McDonough <jmcd@samba.org>
2010-07-27 10:27:11 -04:00
Andreas Schneider
6d6ce4d1ad
s3-spoolss: Create and update DsSpooler values.
2010-07-27 10:27:11 -04:00
Andreas Schneider
3fe2f6443d
s3-spoolss: Use a temporary talloc context in update_printer.
...
Signed-off-by: Jim McDonough <jmcd@samba.org>
2010-07-27 10:27:11 -04:00
Andreas Schneider
c52e019ae1
s3-spoolss: Use the existing memory context for winreg_get_printer.
...
Signed-off-by: Jim McDonough <jmcd@samba.org>
2010-07-27 10:27:11 -04:00
Andreas Schneider
c7ae6cb046
s3-spoolss: Don't return the printer devicemode in spoolss_EnumJobs.
...
Jobs have their own DeviceMode, see print_job_devmode().
Signed-off-by: Jim McDonough <jmcd@samba.org>
2010-07-27 10:27:11 -04:00
Andreas Schneider
48828ab154
s3-spoolss: Fixed the driver unc strings for dependent files.
...
Signed-off-by: Jim McDonough <jmcd@samba.org>
2010-07-27 10:27:10 -04:00
Simo Sorce
a1fe2ed68a
s3-spoolss: Use winreg_delete_printer_key to delete printers.
...
Signed-off-by: Jim McDonough <jmcd@samba.org>
2010-07-27 10:27:10 -04:00
Simo Sorce
fdf669d377
s3-spoolss: Get rid of get_server_name.
...
This function was useless the structure is public and used everywhere.
Signed-off-by: Jim McDonough <jmcd@samba.org>
2010-07-27 10:27:10 -04:00
Simo Sorce
44bc6714b0
s3-printing: Converted printer publishing functions.
...
Use spoolss_PrintInfo2 and winreg calls.
Signed-off-by: Jim McDonough <jmcd@samba.org>
2010-07-27 10:27:10 -04:00
Simo Sorce
afc4a38762
s3-spoolss: Use spoolss_PrinterInfo2 in notify code.
2010-07-27 10:27:10 -04:00
Simo Sorce
78b985ac3e
s3-spoolss: Convert do_drv_upgrade_printer() to winreg functions.
...
Signed-off-by: Jim McDonough <jmcd@samba.org>
2010-07-27 10:27:09 -04:00
Simo Sorce
375bdfc7f8
s3-spoolss: Removed construct_dev_mode() function.
...
Replace it with spoolss_create_default_devmode() or
copy_devicemode() where needed.
Signed-off-by: Jim McDonough <jmcd@samba.org>
2010-07-27 10:27:09 -04:00
Simo Sorce
0d694e1261
s3-spoolss: Use spoolss_PrinterInfo2 in construct_printer_driver_info_level.
...
Signed-off-by: Jim McDonough <jmcd@samba.org>
2010-07-27 10:27:09 -04:00
Simo Sorce
7f6f5806ff
s3-spoolss: Use spoolss_PrinterInfo2 for job info.
...
Signed-off-by: Jim McDonough <jmcd@samba.org>
2010-07-27 10:27:09 -04:00
Simo Sorce
52b8f1f471
s3-spoolss: Migrated driver functions to winreg.
...
Signed-off-by: Jim McDonough <jmcd@samba.org>
2010-07-27 10:27:09 -04:00
Andreas Schneider
e517588a20
s3-spoolss: Set c_setprinter always to 0.
...
This value is only used for the well known printers list which Samba
doesn't implement.
Signed-off-by: Jim McDonough <jmcd@samba.org>
2010-07-27 10:27:09 -04:00
Andreas Schneider
90e96d3ee2
s3-spoolss: Migrated spoolss_DeletePrinter to cleanup winreg keys.
...
Signed-off-by: Jim McDonough <jmcd@samba.org>
2010-07-27 10:27:09 -04:00
Andreas Schneider
be6dc65b9e
s3-spoolss: Migrated spoolss_GetPrinter and spoolss_EnumPrinters to winreg_update_printer.
...
Signed-off-by: Jim McDonough <jmcd@samba.org>
2010-07-27 10:27:08 -04:00
Andreas Schneider
a2c51a88cc
s3-spoolss: Migrated spoolss_OpenPrinter to create defaults with winreg_create_printer.
...
Signed-off-by: Jim McDonough <jmcd@samba.org>
2010-07-27 10:27:08 -04:00
Andreas Schneider
653364f5a3
s3-spoolss: Removed unused function printer_info2_to_nt_printer_info2().
...
Signed-off-by: Jim McDonough <jmcd@samba.org>
2010-07-27 10:27:08 -04:00
Andreas Schneider
665eba334e
s3-spoolss: Removed unused function convert_printer_info().
...
Signed-off-by: Jim McDonough <jmcd@samba.org>
2010-07-27 10:27:08 -04:00
Andreas Schneider
e2c9ad93cb
s3-spoolss: Migrated spoolss_AddPrinter and spoolss_SetPrinter.
...
Signed-off-by: Jim McDonough <jmcd@samba.org>
2010-07-27 10:27:08 -04:00
Andreas Schneider
2a5dba5555
s3-spoolss: Migrated spoolss_Forms to use the winreg changeid function.
...
Signed-off-by: Jim McDonough <jmcd@samba.org>
2010-07-27 10:27:08 -04:00
Andreas Schneider
67bdaa5616
s3-spoolss: Migrated spoolss_GetForm to the winreg function.
...
Signed-off-by: Jim McDonough <jmcd@samba.org>
2010-07-27 10:27:08 -04:00
Andreas Schneider
a879bba0ac
s3-spoolss: Migrated spoolss_SetForm to the winreg function.
...
Signed-off-by: Jim McDonough <jmcd@samba.org>
2010-07-27 10:27:08 -04:00
Andreas Schneider
76f72fe515
s3-spoolss: Migrated spoolss_DeleteForm to the winreg function.
...
Signed-off-by: Jim McDonough <jmcd@samba.org>
2010-07-27 10:27:07 -04:00
Andreas Schneider
fad361aa8a
s3-spoolss: Migrated spoolss_AddForm to the winreg function.
...
Signed-off-by: Jim McDonough <jmcd@samba.org>
2010-07-27 10:27:07 -04:00
Andreas Schneider
2ae1796b09
s3-spoolss: Migrated spoolss_EnumForms to the winreg function.
...
Signed-off-by: Jim McDonough <jmcd@samba.org>
2010-07-27 10:27:07 -04:00
Andreas Schneider
142431d097
s3-spoolss: Migrated spoolss_DeletePrinterKey to the winreg functions.
...
Signed-off-by: Jim McDonough <jmcd@samba.org>
2010-07-27 10:27:07 -04:00
Andreas Schneider
fb5529f623
s3-spoolss: Migrated spoolss_DeletePrinterDataEx to the winreg functions.
...
Signed-off-by: Jim McDonough <jmcd@samba.org>
2010-07-27 10:27:07 -04:00
Andreas Schneider
e210230587
s3-spoolss: Migrated spoolss_EnumPrinterKey to the winreg functions.
...
Signed-off-by: Jim McDonough <jmcd@samba.org>
2010-07-27 10:27:07 -04:00
Andreas Schneider
df35b343db
s3-spoolss: Migrated spoolss_EnumPrinterDataEx to the winreg functions.
...
Signed-off-by: Jim McDonough <jmcd@samba.org>
2010-07-27 10:27:07 -04:00
Andreas Schneider
795618a592
s3-spoolss: Migrated spoolss_GetPrinterDataEx to the winreg functions.
...
Signed-off-by: Jim McDonough <jmcd@samba.org>
2010-07-27 10:27:06 -04:00
Andreas Schneider
3d7e99e2c3
s3-spoolss: Migrated spoolss_SetPrinterDataEx to the winreg functions.
...
Signed-off-by: Jim McDonough <jmcd@samba.org>
2010-07-27 10:27:06 -04:00
Simo Sorce
5604a78f09
s3-spoolss: Migrated NT_DEVICEMODE to spoolss_DeviceMode.
...
Signed-off-by: Jim McDonough <jmcd@samba.org>
2010-07-27 10:27:06 -04:00
Simo Sorce
61cfbf342f
s3-rpc_server: Cleanup the way we free pipe auth data
2010-07-21 19:14:59 -04:00
Simo Sorce
3b502d899d
s3-dcerpc: Fix potential memleak
...
Use a free function for schannel data too for now.
2010-07-21 19:13:27 -04:00
Simo Sorce
a3713d7469
s3-dcerpc: Properly initialize output buffers on nak/fault
2010-07-21 19:12:59 -04:00
Jeremy Allison
5002b3a90d
Add approriate TALLOC_CTX's thoughout the spnego code. No more implicit NULL contexts.
...
Jeremy.
2010-07-20 16:17:58 -07:00
Jeremy Allison
4ed9437b7e
Add TALLOC_CTX argument to spnego_parse_negTokenInit, reduce
...
use of malloc, and data_blob().
Jeremy.
2010-07-20 13:35:43 -07:00
Simo Sorce
e958b39042
s3-auth: Move auth_ntlmssp wrappers in their own file
...
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-20 15:52:31 +10:00
Simo Sorce
a04bbd281c
s3-auth: Refactor and rename auth_ntlmssp_server_info()
...
Rename it to auth_ntlmssp_steal_server_info() to make it clear that
the server_info struct is stolen from the auth_ntlmssp_state structure.
Use talloc_move instead of manual steal&clear
Add comments to explain what is going on.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-20 15:52:24 +10:00
Jeremy Allison
625a511389
Remove parse_negTokenTarg(), as it's actually incorrect. We're processing
...
negTokenInit's here. Use common code in spnego_parse_negTokenInit().
Jeremy.
2010-07-19 15:41:45 -07:00
Andreas Schneider
5cefbfef26
s3-rpc_server: Added callbacks for init and shutdown of a rpc service.
...
This adds two callback function for each rpc service. One is for
initialisation and the other for shutdown. rpc_<service>_unregister()
needs to be called to execute the shutdown function.
2010-07-19 12:59:18 +02:00
Andreas Schneider
b91e5cf17d
s3-rpc_server: Don't register the same rpc commands twice.
2010-07-19 12:59:18 +02:00
Simo Sorce
c09dcb903c
s3-auth: Use talloc hierarchies to properly free auth_ntlmssp_state contexts
...
Turn auth_ntlmssp_end into a destructor and attach it to auth_ntlmssp_state.
Remote auth_ntlmssp_end and use TALLOC_FREE in the callers.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-19 14:20:04 +10:00
Simo Sorce
e60ed80754
s3-auth: Simplify how we free the auth_context
...
Turn the freeing function into a destructor and attach it to the
auth_context.
Make all callers TALLOC_FREE() the auth_context instead of calling
the free function.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-19 14:20:00 +10:00
Simo Sorce
3c0e10d70c
s3-dcerpc: Fix build and remove unneeded headers
...
Sorry, botched a rebase.
2010-07-17 15:44:19 -04:00
Simo Sorce
52f6bfea4b
s3-dcerpc: Move mere processing functions from srv_pipe_hnd.c to srv_pipe.c
2010-07-17 15:37:24 -04:00
Günther Deschner
c5e85a4987
s3-dcerpc: rename SCHANNEL_SIG_SIZE to NL_AUTH_SIGNATURE_SIZE and move to IDL.
...
Guenther
2010-07-16 23:09:54 +02:00
Simo Sorce
65116adceb
s3-dcerpc: Fix ability to receive Big Endian PDUs
2010-07-16 16:02:39 -04:00
Simo Sorce
f4c6c7e7b8
Move the remnants of rpc_parse code under registry/
...
The registry code is the only last user of this code.
Move everything under registry/ and hope someone will get rid od
it completely from there in the future.
Signed-off-by: Günther Deschner <gd@samba.org>
2010-07-16 01:51:18 +02:00
Simo Sorce
53945a2e99
s3-dcerpc: Use a local function to dump pdu regions
...
Signed-off-by: Günther Deschner <gd@samba.org>
2010-07-16 01:51:18 +02:00
Simo Sorce
100d37fc46
s3-dcerpc: Use DATA_BLOB for pipes_struct input data
...
Signed-off-by: Günther Deschner <gd@samba.org>
2010-07-16 01:51:18 +02:00
Simo Sorce
79c207ed62
s3-dceprc: Use IDL defined constants for length calculations
...
Signed-off-by: Günther Deschner <gd@samba.org>
2010-07-16 01:51:17 +02:00
Simo Sorce
ca3bdca52e
s3-dcerpc: Padding is never done on a DCERPC_PKT_BIND_ACK packet.
...
Empirically verified against Windows.
It never pads the auth credentials on this packet type.
Signed-off-by: Günther Deschner <gd@samba.org>
2010-07-16 01:51:17 +02:00
Simo Sorce
2452a7a4c1
s3-dcerpc: consolidate respones packet creation code
...
Signed-off-by: Günther Deschner <gd@samba.org>
2010-07-16 01:51:16 +02:00
Simo Sorce
8cd3912afa
s3-dcerpc: Convert frag from prs_struct to a simple DATA_BLOB
...
Signed-off-by: Günther Deschner <gd@samba.org>
2010-07-16 01:51:16 +02:00
Simo Sorce
31b59bbf99
s3-dcerpc: Convert rdata from prs_struct to a simple DATA_BLOB
...
Signed-off-by: Günther Deschner <gd@samba.org>
2010-07-16 01:51:16 +02:00
Simo Sorce
8ffac961db
s3-dcerpc: Stop using hand marshalling in create_next_pdu_noauth()
...
Signed-off-by: Günther Deschner <gd@samba.org>
2010-07-16 01:51:16 +02:00
Simo Sorce
a678d4e3b4
s3-dcerpc: Stop using hand marshalling in create_next_pdu_schannel()
...
Signed-off-by: Günther Deschner <gd@samba.org>
2010-07-16 01:51:16 +02:00
Simo Sorce
5918a6c751
s3-dcerpc: Stop using hand marshalling in create_next_pdu_ntlmssp()
...
Signed-off-by: Günther Deschner <gd@samba.org>
2010-07-16 01:51:16 +02:00
Simo Sorce
23ad6919a1
s3-dcerpc: Break memory hierarchy for shared structure
...
Handles are shared among multiple pipes_struct. We cannot allocate
them on any specific pipes_struct or it will vanish for all others
as soon as that pipes_struct is freed, leaving back dangling
pointers.
Signed-off-by: Andreas Schneider <asn@samba.org>
2010-07-14 15:03:02 +02:00
Günther Deschner
e30aa45666
s3-dcerpc: fix crash bug in error path of process_complete_pdu().
...
Guenther
2010-07-14 12:36:47 +02:00
Andrew Bartlett
0d95cee58f
s3:auth Change auth_ntlmssp_server_info API to return NTSTATUS
...
This fixes a bug where register_existing_vuid() could be called with a
NULL server_info if the alloction failed.
Andrew Bartlett
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-07-14 16:22:49 +10:00
Günther Deschner
80b47fcb0a
s3-libnet: better separate headers.
...
Guenther
2010-07-13 22:40:46 +02:00
Simo Sorce
bc6a3e0030
s3-dcerpc: Use dcerpc_push_ncacn_packet() in api_pipe_alter_context()
...
Signed-off-by: Günther Deschner <gd@samba.org>
2010-07-13 14:44:12 +02:00
Simo Sorce
3ba93a986f
s3-dcerpc: Use dcerpc_push_dcerpc_auth() for spnego auth continuations.
...
Signed-off-by: Günther Deschner <gd@samba.org>
2010-07-13 14:44:12 +02:00
Simo Sorce
70500734f9
s3-dceprc: Use dcerpc_push_ncacn_packet() in api_pipe_bind_req()
...
Signed-off-by: Günther Deschner <gd@samba.org>
2010-07-13 14:44:12 +02:00
Simo Sorce
f6648c500b
s3-dcerpc: Use a DATA_BLOB in bind processing and avoid one mem copy
...
Also move dcerpc_push_dcerpc_auth() invocation in api_pipe_bind_req()
to simplify the workflow.
Signed-off-by: Günther Deschner <gd@samba.org>
2010-07-13 14:44:11 +02:00
Simo Sorce
8213bba892
s3-dcerpc: Rearrange api_pipe_bind_req() to do checks before allocating memory
...
Signed-off-by: Günther Deschner <gd@samba.org>
2010-07-13 14:44:11 +02:00
Simo Sorce
87605e2030
s3-dcerpc: fix dcerpc_push_ncacn_packet, pass arg by address
...
There is no need to copy the whole structure twice by passing it in by value.
Signed-off-by: Günther Deschner <gd@samba.org>
2010-07-13 14:44:11 +02:00
Simo Sorce
fe9036cf5b
s3-dcerpc: pass the packet to setup_bind_nack()
...
Allows to not rely on p->call_id but use the value directly from the request
packet header.
Signed-off-by: Günther Deschner <gd@samba.org>
2010-07-13 14:44:11 +02:00
Simo Sorce
272704e8c2
s3-dceprc: Add debug messages
...
Signed-off-by: Günther Deschner <gd@samba.org>
2010-07-13 14:44:11 +02:00
Simo Sorce
29a3142be8
s3-dcerpc: Remove unused functions
...
Signed-off-by: Günther Deschner <gd@samba.org>
2010-07-13 14:44:11 +02:00
Simo Sorce
8e235df2de
s3-dcerpc: Use dcerpc_pull_ncacn_packet() to unmarshall dceprc requests
...
Signed-off-by: Günther Deschner <gd@samba.org>
2010-07-13 14:44:11 +02:00
Simo Sorce
77fb3649ce
s3-dceprc: Store opnum in its own variable
...
Signed-off-by: Günther Deschner <gd@samba.org>
2010-07-13 14:44:10 +02:00
Simo Sorce
a138b3d31e
s3-dceprc use a DATA_BLOB to hold the curren pdu in pipes_struct
...
Signed-off-by: Günther Deschner <gd@samba.org>
2010-07-13 14:44:10 +02:00
Simo Sorce
d078b54b22
s3-dcerpc: use dceprc_push_ncacn_packet_header in create_next_pdu_noauth()
...
Signed-off-by: Günther Deschner <gd@samba.org>
2010-07-13 14:44:10 +02:00
Simo Sorce
53e9c26271
s3-dcerpc: Use dcerpc_push_ncacn_packet_header() in create_next_pdu_schannel()
...
Signed-off-by: Günther Deschner <gd@samba.org>
2010-07-13 14:44:10 +02:00
Simo Sorce
98913d8f44
s3-dcerpc: use dcerpc_push_ncacn_packet_header() in create_next_pdu_ntlmssp()
...
Signed-off-by: Günther Deschner <gd@samba.org>
2010-07-13 14:44:10 +02:00
Simo Sorce
aca330a2c5
s3-dcerpc delay rpc header unmarshalling
...
Use dcerpc_get_frag_length() to get the whole pdu first
Signed-off-by: Günther Deschner <gd@samba.org>
2010-07-13 14:44:10 +02:00
Simo Sorce
cf664b73a4
s3-dcerpc: Use dcerpc_set_frag_length()
...
Automatically calculate the fragment length where possible.
Signed-off-by: Günther Deschner <gd@samba.org>
2010-07-13 14:44:09 +02:00
Simo Sorce
966641b9fe
s3-dcerpc: Use dcerpc_pull_dcerpc_auth in api_pipe_bind_auth3()
2010-07-08 18:39:12 -04:00
Simo Sorce
207600991c
s3-dcerpc: Use dcerpc_auth in api_pipe_bind_req()
2010-07-08 18:39:01 -04:00
Günther Deschner
690ed0c5e2
s3-rpc: when using rpc_pipe_open_internal, make sure to go through NDR.
...
Otherwise a lot of information that is usually generated in the ndr_push remains
in an uninitialized state.
Guenther
2010-07-08 16:35:26 +02:00
Simo Sorce
7236f8cda9
s3:dcerpc Use prs_parse_dcerpc_bind
2010-07-08 01:41:29 -04:00
Simo Sorce
ae526514a9
s3:rpc user idl define dcerpc_ctx_list instead of custom RPC_CONTEXT
2010-07-08 01:08:05 -04:00
Günther Deschner
0cbe0f3c5f
s3-dcerpc: use dcerpc_push_ncacn_packet() for setup_fault_pdu().
...
Guenther
Signed-off-by: Simo Sorce <idra@samba.org>
2010-07-07 23:45:50 -04:00
Günther Deschner
8fdc02aa63
s3-dcerpc: use dcerpc_push_ncacn_packet() for setup_bind_nak().
...
Guenther
Signed-off-by: Simo Sorce <idra@samba.org>
2010-07-07 23:45:50 -04:00
Volker Lendecke
b4c3f72d44
s3: Fix a segfault in the RPC server
...
After converting the rpc infratructure to talloc, read_from_internal_pipe freed
the outdata too early. If the last fragment was read in two pieces (as
rpcclient does it), all the outdata was freed during the read of the first
piece of the read of the last fragment. Later read&x calls, trying to read the
rest of the last fragment stepped into p->out_data.frag with non-zero offset
when this was already freed.
2010-07-06 15:11:31 +02:00
Matthias Dieter Wallnöfer
915ddf0dc7
samr.idl:UserInfo structures - fix some names according to MS-SAMR documentation
...
See MS-SAMR section "FULL IDL"
2010-07-05 15:35:54 +02:00
Volker Lendecke
dfc84ece9d
s3: Remove procid_self() from srv_spoolss_reply[open|close]printer()
2010-07-05 11:06:32 +02:00
Volker Lendecke
6436ea3e7a
s3: Remove procid_self() from srv_spoolss_drv_upgrade_printer()
2010-07-05 11:06:31 +02:00
Volker Lendecke
b0c83d50f9
s3: Replace register_message_flags() with serverid_register_msg_flags()
...
message_send_all is now done by walking the serverid.tdb, not the
connections.tdb anymore.
Günther, Simo, please check!
2010-07-04 21:49:03 +02:00
Günther Deschner
786198e523
s3-registry: remove unused reg_util_marshalling code.
...
Guenther
2010-07-02 10:50:21 +02:00
Günther Deschner
b381fba089
s3-registry: avoid using registry_value union.
...
Just pull and push data as is.
Guenther
2010-07-02 10:50:21 +02:00
Simo Sorce
3721161d90
s3:auth Fix switch statement referencing a uninitialized variable
...
Looking at the original commit (9a747d500f
)
this seem the right solution.
Andrew please check.
2010-07-01 18:18:41 -04:00
Günther Deschner
e4ba8fb3b9
s3-printing: Fix Bug #7541 , %D in "printer admin" causing smbd crash.
...
Guenther
2010-07-01 14:13:16 +02:00
Günther Deschner
2a4bd64973
s3-winreg: implement _winreg_QueryMultipleValues().
...
Guenther
2010-06-30 21:46:08 +02:00
Günther Deschner
de0d9e0bff
s3-winreg: implement _winreg_QueryMultipleValues2().
...
Guenther
2010-06-30 21:46:08 +02:00
Andreas Schneider
f8b6ac6a08
s3-eventlog: Fixed the keyname delimiter for the registry key.
2010-06-28 12:56:13 +02:00
Günther Deschner
b6100fa72f
s3-eventlog: make sure _eventlog_OpenEventLogW fails when we cannot open the registry key.
...
Guenther
2010-06-28 12:53:10 +02:00
Jeremy Allison
2e8c563961
Second part of fix converting prs_XX struct and functions to talloc. Remove unneeded prs_mem_free calls.
...
Jeremy.
Signed-off-by: Simo Sorce <idra@samba.org>
2010-06-18 07:42:05 -04:00
Jeremy Allison
f4e7d9d38e
Convert the prs_XXX struct and functions to use talloc instead of malloc. Passes valgrind and make tests for client and server. Second version of this patch after splitting up at Simo's request. Patch to follow will delete extraneous prs_mem_free() calls.
...
Jeremy.
Signed-off-by: Simo Sorce <idra@samba.org>
2010-06-18 07:41:47 -04:00
Jeremy Allison
7e388c8b27
Remove an unused chunk of code (will make it easier to talloc'ize prs_XXX).
...
Jeremy.
2010-06-16 10:27:54 -07:00
Andreas Schneider
47ae4a518c
s3-spoolss: Provide a memory context for clean_up_driver_struct().
...
If we use a stack variable to setup spoolss_AddDriverInfoCtr this would
segfault with a talloc bad magic value.
2010-06-16 12:03:46 +02:00
Volker Lendecke
3f7e2222f4
s3: Remove the pointless PRINTERNAME macro
2010-06-13 12:40:27 +02:00
Simo Sorce
a53ca94416
s3:rpc improve handles memory hierarchy and use better name.
...
While there also cleanup the code a bit.
Signed-off-by: Günther Deschner <gd@samba.org>
2010-06-11 00:43:23 +02:00
Andreas Schneider
0962763822
s3:misc make use of server_[event/messaging]_context directly
...
Untangle these functions from smbd specific dependencies so they can be freely
used in multiple servers.
2010-06-10 17:30:45 -04:00
Simo Sorce
405a0c558c
s3:cleaunp reformatting for readability
2010-06-10 14:57:06 -04:00
Simo Sorce
446deb0082
s3:cleanup remove trailing spaces
2010-06-10 14:56:59 -04:00
Volker Lendecke
34b29b1198
Revert "s3:auth Change auth_ntlmssp_server_info API to return NTSTATUS"
...
This reverts commit edba46ce94
.
Conflicts:
source3/auth/auth_ntlmssp.c
2010-06-08 11:38:08 +02:00
Simo Sorce
5da783f4a7
s3:smbd add utility function to check if there are open pipes
2010-06-07 17:25:48 -04:00
Simo Sorce
f9fc4df0c0
s3:rpc make num_pipe_handles get an actual pipe as argument
...
Let the function abstract out how handles are counted
2010-06-07 17:25:48 -04:00
Simo Sorce
22e9015e97
s3:rpc handles are used by all pipes, use better name
2010-06-07 17:25:48 -04:00
Simo Sorce
f7e2e8370b
s3:rpc fix potential out of bound memory access
...
memcpy copies memory unconditionally, we are passing "" in some cases here.
Use strncpy which will stop reading from src if the null byte is found and
will fill with nulls the destination.
2010-06-07 17:25:47 -04:00
Andrew Bartlett
9a747d500f
s3:auth add hooks to indicate if signing or sealing is desired with NTLMSSP
...
This allows the right hooks to be called in GENSEC when s3compat
implements the auth_ntlmssp interface. Otherwise, we can't do the
signing or sealing as we have not negoitated it's use.
Andrew Bartlett
2010-06-07 23:34:29 +10:00
Andrew Bartlett
edba46ce94
s3:auth Change auth_ntlmssp_server_info API to return NTSTATUS
...
It's nicer to have an NTSTATUS return, and in s3compat there may be a
reason other than 'no memory' why this can fail.
Andrew Bartlett
2010-06-07 23:34:29 +10:00
Andrew Bartlett
0af2dc43ad
s3:named pipe proxy Improve error messages when named pipes fail to forward
...
I hope this helps the next person who needs to debug this.
Andrew Bartlett
2010-06-07 23:34:29 +10:00
Günther Deschner
4591fdbc18
s3-privileges: use LUID defines from lsa IDL.
...
Guenther
2010-06-07 10:33:36 +02:00
Andreas Schneider
15f64af8e3
s3-rpc: Create a file with all functions for a internal named pipe.
...
This makes it possible to use the samr rpc server in winbind without
linking in smbd.
Reviewed-by: Simo Sorce <idra@samba.org>
2010-06-04 12:12:50 -04:00
Andreas Schneider
3344adc340
s3-rpc: Seperate rpc_srv_register for plain connection.
...
This will make it possible to create plain rpc named pipe connnections.
Reviewed-by: Simo Sorce <idra@samba.org>
2010-06-04 12:12:43 -04:00
Günther Deschner
84a8f0451d
s3-build: only include generated spoolss headers (not ndr headers).
...
Guenther
2010-06-03 11:00:27 +02:00
Günther Deschner
b6a2cea74d
s3-security: use shared "Standard access rights.".
...
Guenther
2010-06-03 11:00:26 +02:00
Günther Deschner
b5c2af9447
s3-security: use shared "File Object specific access rights".
...
Guenther
2010-06-03 11:00:25 +02:00
Günther Deschner
2794d2ee7f
s3-security: use shared Security Access Masks Rights.
...
Guenther
2010-06-03 11:00:25 +02:00
Günther Deschner
a75436e3ee
s3-security: use shared SECINFO_DACL define.
...
Guenther
2010-06-03 11:00:12 +02:00
Günther Deschner
e24a59f932
s3-security: use shared SECINFO_SACL define.
...
Guenther
2010-06-03 10:59:54 +02:00
Günther Deschner
630c27bdad
s3-security: use shared SECINFO_GROUP define.
...
Guenther
2010-06-03 10:59:38 +02:00
Günther Deschner
415d3d5fe7
s3-security: use shared SECINFO_OWNER define.
...
Guenther
2010-06-03 10:59:15 +02:00
Günther Deschner
1ba611a56c
s3-eventlog: try to pass RPC-EVENTLOG during make test as non-root.
...
Guenther
2010-06-01 23:05:17 +02:00
Günther Deschner
fca69a9e2f
s3-netlogon: Fix crash bug in _netr_NetrEnumerateTrustedDomains().
...
Guenther
2010-05-31 21:27:29 +02:00
Simo Sorce
471ed70c49
s3:smbd map_username() doesn't need sconn anymore
...
Signed-off-by: Andreas Schneider <asn@samba.org>
2010-05-31 18:21:29 +02:00
Günther Deschner
98641648d8
s3-netlogon: use LSA in _netr_NetrEnumerateTrustedDomains.
...
Guenther
2010-05-31 15:31:00 +02:00
Günther Deschner
4bb7e91cfd
s3-netlogon: use SAMR in _netr_ServerAuthenticate3.
...
Guenther
2010-05-31 15:31:00 +02:00
Günther Deschner
db5730cac4
s3-samr: give the system user a free pass for _samr_QueryUserInfo{2} level 18.
...
Guenther
2010-05-31 15:30:59 +02:00
Günther Deschner
a7805811c4
s3-netlogon: use SAMR in _netr_ServerPasswordSet{2}.
...
Guenther
2010-05-31 15:30:59 +02:00
Andrew Bartlett
d6fa371b92
s3:ntlmssp Use a TALLOC_CTX for ntlmssp_sign_packet() and ntlmssp_seal_packet()
...
This ensures the results can't be easily left to leak.
Andrew Bartlett
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-31 15:11:27 +02:00
Andrew Bartlett
ebae21f023
ntlmssp: Make the ntlmssp.h from source3/ a common header
...
The code is not yet in common, but I hope to fix that soon.
Andrew Bartlett
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-31 15:10:56 +02:00
Andrew Bartlett
723ea68d3b
s3:auth Remove AUTH_NTLMSSP_STATE typedef.
...
typedefs are no longer preferred Samba style.
Andrew Bartlett
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-31 15:10:44 +02:00
Andrew Bartlett
3b706865f6
s3:auth Make AUTH_NTLMSSP_STATE a private structure.
...
This makes it a little easier for it to writen in terms of GENSEC in future.
Andrew Bartlett
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-31 15:10:33 +02:00
Matthias Dieter Wallnöfer
11e2608ba9
s3/s4:netrEnumerateTrustedDomains - this call returns a "NTSTATUS" result
...
See MS-NRPC 3.5.5.6.3.
2010-05-31 12:08:59 +02:00
Günther Deschner
f9f8007361
s3-build: only use ndr_security.h where needed.
...
Guenther
2010-05-31 11:32:37 +02:00
Günther Deschner
87037006bd
s3-samr: Fix crash bug in _samr_QueryUserInfo{2} level 18.
...
Guenther
2010-05-28 14:30:03 +02:00
Günther Deschner
66adb84e46
s3-build: only use ndr_samr.h where needed.
...
Guenther
2010-05-28 02:49:36 +02:00
Simo Sorce
d9cffc01be
s3:auth use info3 in auth_serversupplied_info
...
Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-28 00:55:53 +02:00
Stefan Metzmacher
85a3853249
s3:rpc_server: make use of the npa_tstream code to connect to named pipes
...
This way we use the newest protocol, which is able to pass
the local and remote address of the SMB connection.
And we correctly support message mode named pipes
without the hack that analyzes the content for DCERPC pdus.
metze
2010-05-27 07:13:59 +02:00
Stefan Metzmacher
9a6636a56e
s3:rpc_server: pass down local and remote tsocket_address to np_open()
...
metze
2010-05-27 07:13:56 +02:00
Stefan Metzmacher
9a77cb247d
s3:rpc_server: add np_read_in_progress() function
...
metze
2010-05-27 07:13:53 +02:00
Stefan Metzmacher
8c0be92044
s3:rpc_server: make sure we don't send uninitialized memory for the named_pipe_auth handshake
...
metze
2010-05-27 07:13:52 +02:00
Günther Deschner
2807ab358e
s3-samr: move chgpasswd.c out of smbd and into the samr server.
...
Guenther
2010-05-26 22:17:02 +02:00
Simo Sorce
8aa96566a9
s3-rpc_server: Created a per connection spoolss pipe.
...
This way all code can reuse the same connection to spoolss
and not have to deal with the creation of a new pipe all over the
code every time we need to ask a service off spoolss.
Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-26 15:07:57 +02:00
Michael Adam
0fe1ff99a1
s3:registry: move reg_objects.h to registry/ and use it only where needed
...
Every place outside of registry/ where this is used, should probably
be changed to use pure reg_api.c code.
2010-05-25 10:35:31 +02:00
Michael Adam
dcf2cc2806
s3:srv_ntsvcs: use regval_ctr/blob accessor functions
2010-05-25 10:35:29 +02:00
Michael Adam
e829b42978
s3:registry: extract registry_pull/push_value prototypes into own header
...
reg_util_marshalling.h and use them only where needed.
2010-05-25 10:35:27 +02:00
Michael Adam
5a92d88f38
s3:registry: extract reg_perfcount prototypes into header of their own.
...
And use them only when necessary.
2010-05-25 10:35:26 +02:00
Andrew Bartlett
cba7f8b827
s3:dom_sid Global replace of DOM_SID with struct dom_sid
...
This matches the structure that new code is being written to,
and removes one more of the old-style named structures, and
the need to know that is is just an alias for struct dom_sid.
Andrew Bartlett
Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-21 10:39:59 +02:00
Günther Deschner
ba1befd365
s3-services: move services.h closer to services implementation.
...
Guenther
2010-05-20 13:39:46 +02:00
Günther Deschner
f6f3bb1813
s3-passdb: move get_logon_hours_from_pdb() into samr server.
...
Guenther
2010-05-18 21:43:05 +02:00
Günther Deschner
5a6f3a0666
s3-rpc_client: move protos to init_spoolss.h
...
Guenther
2010-05-18 21:42:48 +02:00
Simo Sorce
d6a73ad85b
s3-spoolss: Removed the Phantom DeviceMode.
...
This was a hack that required a special client from HP.
The client code has never been released and was discontinued,
so this code was just dead weight.
Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-18 15:52:28 +02:00
Andreas Schneider
4108728b7e
s3-spoolss: Use the spoolss_map_to_os2_driver to modify drivername.
...
Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-18 15:18:30 +02:00
Andreas Schneider
f3063d9254
s3-spoolss: Added EN ISO 216, A0 and A1 to builtin forms.
...
Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-18 15:05:58 +02:00
Andreas Schneider
4bc46e0f27
s3-spoolss: Sorted the builtin forms alphabetically.
...
Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-18 15:05:42 +02:00
Günther Deschner
7f6bb48bdf
s3-secdesc: remove "typedef struct security_descriptor SEC_DESC".
...
Guenther
2010-05-18 12:30:12 +02:00
Günther Deschner
8951c8301a
s3-secdesc: remove "typedef struct security_acl SEC_ACL".
...
Guenther
2010-05-18 12:30:12 +02:00
Günther Deschner
a8b01d1f3b
s3-secdesc: remove "typedef struct security_ace SEC_ACE".
...
Guenther
2010-05-18 12:30:11 +02:00