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

2588 Commits

Author SHA1 Message Date
Volker Lendecke
fe486d7b9f Add "queue" to writev_send
Unless higher levels queue themselves somehow, writev will *always* be queued.
So the queueing should be done at the right level.
2009-03-08 11:20:59 +01:00
Volker Lendecke
46bcb10b5a Shape up pdb_search a bit by making it a talloc ctx with a destructor 2009-03-07 17:51:21 +01:00
Günther Deschner
2561b2d2e2 s3-spoolss: use pidl for _spoolss_EnumMonitors.
Guenther
2009-03-07 00:55:38 +01:00
Günther Deschner
03f1bec6ce s3-spoolss: use pidl for _spoolss_EnumPorts.
Guenther
2009-03-07 00:55:36 +01:00
Günther Deschner
3cf22a8856 s3-spoolss: use pidl for _spoolss_EnumPrintProcDataTypes.
Guenther
2009-03-07 00:49:51 +01:00
Günther Deschner
f48ccec957 s3-spoolss: use pidl for _spoolss_EnumPrintProcessors.
Guenther
2009-03-07 00:42:58 +01:00
Günther Deschner
5ce523bbed s3-spoolss: Fix Coverity ID #891 (UNINIT).
Guenther
2009-03-06 14:58:49 +01:00
Günther Deschner
8614ce5ca7 s3-spoolss: remove old _spoolss_EnumForms.
Guenther
2009-03-06 14:32:46 +01:00
Günther Deschner
f9bf09e255 s3-spoolss: use pidl for _spoolss_EnumForms.
Guenther
2009-03-06 14:32:15 +01:00
Jeremy Allison
67d12e9c6b Get the sense of the integer wrap test the right way around. Sorry.
Jeremy.
2009-03-05 22:00:22 -08:00
Jeremy Allison
4e74d811aa Now we're allowing a lower bound for auth_len, ensure we
also check for an upper one (integer wrap).
Jeremy.
2009-03-05 21:06:48 -08:00
Volker Lendecke
2544ba6a0a Complete the fix for bug 6100
According to [MS-RPCE].pdf, section 2.2.2.11:

----
A client or a server that (during composing of a PDU) has allocated more space
for the authentication token than the security provider fills in SHOULD fill in
the rest of the allocated space with zero octets. These zero octets are still
considered to belong to the authentication token part of the PDU.<36>
----

RPC implementations are allowed to send padding bytes at the end of an auth
footer. Windows 7 makes use of this.

Thanks to Nick Meier <nmeier@microsoft.com>

Volker
2009-03-05 22:28:07 +01:00
Simo Sorce
67d41d0fc7 Make struct tevent_req opaque
Move struct tevent_req in tevent_internal, and ad getters and setters
for private data and the callback function.
This patch also renames 'private_state' into 'data'. What is held in this
pointer is in fact data and not a state like enum tevent_req_state.
Calling it 'state' is confusing.

The functions addedd are:
tevent_req_set_callback() - sets req->async.fn and req->async.private_data
tevent_req_set_print_fn() - sets req->private_print
tevent_req_callback_data() - gets req->async.private_data
tevent_req_data() - gets rea->data

This way it is much simpler to keep API/ABI compatibility in the future.
2009-03-02 11:02:09 -05:00
Tim Prouty
9b0df441e1 s3: Fix incompatible type warnings 2009-03-01 16:40:17 -08:00
Günther Deschner
670a22852c s3-spoolss: use DSPRINT flags instead of SPOOLS_DS flags.
Guenther
2009-02-27 13:33:15 +01:00
Günther Deschner
44ceff4d01 s3-spoolss: fix search_notify(). sorry...
Guenther
2009-02-26 13:19:24 +01:00
Günther Deschner
54b529a44e s3-spoolss: job status defines moved to IDL.
Guenther
2009-02-26 13:17:23 +01:00
Günther Deschner
3e25d3bb15 s3-spoolss: remove some unused defines and structs.
Guenther
2009-02-26 13:17:22 +01:00
Günther Deschner
9e54f4151c s3-spoolss: fix _spoolss_AddJob behaviour.
Guenther
2009-02-25 23:48:30 +01:00
Günther Deschner
03efdcb7cb s3-spoolss: make us pass the RPC-SPOOLSS torture test w.r.t. directory calls.
Guenther
2009-02-25 21:18:09 +01:00
Volker Lendecke
5d653f69de Replace read_pkt by read_packet in np_read 2009-02-24 20:40:47 +01:00
Volker Lendecke
70f788ba7e Use async_writev in np_write 2009-02-24 20:40:47 +01:00
Günther Deschner
00173c6ce6 s3-spoolss: merge path handling in _spoolss_PrintProcessorDirectory and
_spoolss_PrinterDriverDirectory.

Guenther
2009-02-24 11:03:28 +01:00
Jeremy Allison
2033b44c3f More warning fixes for Solaris.
Jeremy.
2009-02-23 15:44:34 -08:00
Günther Deschner
c1e76d0dd9 s3-spoolss: use pidl for _spoolss_RemoteFindFirstPrinterChangeNotifyEx.
Guenther
2009-02-23 16:17:38 +01:00
Günther Deschner
b3f6d69108 s3-spoolss: use spoolss_NotifyOption and spoolss_NotifyType instead of SPOOL_NOTIFY_OPTION and SPOOL_NOTIFY_OPTION_TYPE.
Guenther
2009-02-23 16:17:37 +01:00
Günther Deschner
2efa7cf6d9 s3-spoolss: add dup_spoolss_NotifyOption.
Guenther
2009-02-23 16:17:37 +01:00
Günther Deschner
418691c2e7 s3-spoolss: use more idl types in spoolss server.
Guenther
2009-02-23 16:17:36 +01:00
Günther Deschner
9b453f9248 s3-spoolss: fix memleak of spoolss_Notify array in _spoolss_RouterRefreshPrinterChangeNotify.
Guenther
2009-02-23 16:17:35 +01:00
Günther Deschner
9af13015b2 s3-spoolss: use rpccli_spoolss_RouterReplyPrinterEx.
Guenther
2009-02-23 16:17:35 +01:00
Günther Deschner
5116f50eb8 s3-spoolss: use pidl for _spoolss_RouterRefreshPrinterChangeNotify.
Guenther
2009-02-23 16:17:35 +01:00
Günther Deschner
6259fac904 s3-spoolss: use struct spoolss_NotifyInfo instead of SPOOL_NOTIFY_INFO.
Guenther
2009-02-23 16:17:35 +01:00
Günther Deschner
03a15f2381 s3-spoolss: use struct spoolss_Notify instead of SPOOL_NOTIFY_INFO_DATA.
Guenther
2009-02-23 16:17:34 +01:00
Günther Deschner
d3372c6a9e s3-spoolss: fix _spoolss_GetPrinterDriverDirectory and spoolss_GetPrintProcessorDirectory.
Both calls need to return NULL in the error case to avoid ndr encoding problems.
(found by smbtorture spoolss test).

Guenther
2009-02-21 21:14:20 +01:00
Günther Deschner
762b92e285 s3-eventlog: fix rpcclient and server stub for eventlog_GetLogInformation.
Guenther
2009-02-21 21:14:11 +01:00
Volker Lendecke
4aed9abbf8 Remove the static "chal" from ntlmssp.c:get_challenge() 2009-02-21 14:04:14 +01:00
Günther Deschner
669617036e s3-spoolss: fix vista fallback in _spoolss_AddPrinterDriverEx.
Martin Zielinski, if you're reading this, please have a look. Vista nicely takes
just a WERR_UNKNOWN_LEVEL here and retries with a level 6 add.

Guenther
2009-02-19 19:27:07 +01:00
Günther Deschner
0470feeb7f s3-spoolss: use pidl for _spoolss_AddPrinterDriver{Ex}.
Guenther
2009-02-19 19:26:44 +01:00
Günther Deschner
286ec6847b s3-spoolss: use pidl for _spoolss_GetPrintProcessorDirectory.
Guenther.
2009-02-19 19:21:57 +01:00
Günther Deschner
e9c42e3c21 s3-spoolss: fix _spoolss_GetPrinterDriverDirectory.
treat architecture correctly as it is a [unique] pointer, and newer
Windows versions sometimes send in an empty string.

Guenther
2009-02-19 19:20:19 +01:00
Günther Deschner
0038acb20d s3-spoolss: _spoolss_OpenPrinterEx needs to wipe out policy handle upon failure.
Guenther
2009-02-19 19:19:59 +01:00
Günther Deschner
bcb5331fa7 s3-spoolss: _spoolss_AddPrinterEx needs to wipe out policy handle upon failure.
Guenther
2009-02-19 19:19:50 +01:00
Günther Deschner
3b3ab50c05 s3-spoolss: use pidl for _spoolss_GetPrinterDriverDirectory.
Guenther
2009-02-19 02:06:57 +01:00
Günther Deschner
8dbb1d63e5 s3-spoolss: add support for "AddPort" via _spoolss_XcvData for Vista.
Guenther
2009-02-19 00:56:07 +01:00
Günther Deschner
7312342062 s3-spoolss: use pidl for _spoolss_XcvData.
Guenther
2009-02-18 16:11:01 +01:00
Günther Deschner
ce71a7c9a7 s3-spoolss: use pidl for _spoolss_ResetPrinter.
Guenther
2009-02-17 10:52:31 +01:00
Volker Lendecke
ea192f08e6 Fix an invalid typecasting
entry->num_of_strings is a uint16_t. Casting it with

(int *)&entry->num_of_strings

is wrong, because it gives add_string_to_array the illusion that the object
"num" points to is an int, which it is not.

In case we are running on a machine where "int" is 32 or 64 bits long, what
happens with that cast? "add_string_to_array" interprets the byte field that
starts where "num_of_strings" starts as an int. Under very particular
circumstances this might work in a limited number of cases: When the byte order
of an int is such that the lower order bits of the int are stored first, the
subsequent bytes which do not belong to the uint16_t anymore happen to be 0 and
the result of the increment still fits into the first 2 bytes of that int, i.e.
the result is < 65536.

The correct solution to this problem is to use the implicit type conversion
that happens when an assignment is done.

BTW, this bug is found if you compile with -O3 -Wall, it shows up as a warning:

rpc_server/srv_eventlog_lib.c:574: warning: dereferencing type-punned pointer
	will break strict-aliasing rules

Thanks,

Volker
2009-02-17 10:20:55 +01:00
Yasuma Takeda
e32f946114 Fix bug 5920
The length of the memcpy was calculated wrong, r->out.return_authenticator is
a pointer
2009-02-16 14:08:39 +01:00
Stefan Metzmacher
fe417b29bd s3:netlogon: implement _netr_LogonGetCapabilities() with NT_STATUS_NOT_IMPLEMENTED
This hopefully fixes bug #6100.

metze
2009-02-16 11:34:35 +01:00
Jeremy Allison
9a5d5cc1db Attempt to fix bug #6099. According to Microsoft
Windows 7 looks at the negotiate_flags
returned in this structure *even if the
call fails with access denied ! So in order
to allow Win7 to connect to a Samba NT style
PDC we set the flags before we know if it's
an error or not.
Jeremy.
2009-02-15 18:12:20 -08:00