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

52452 Commits

Author SHA1 Message Date
Stefan Metzmacher
4002b7bdc1 lib/tsocket: add tsocket_sendto_queue_send/recv()
metze
2009-03-19 16:25:54 +01:00
Stefan Metzmacher
9ed7a45c88 lib/tsocket: add tsocket_sendto_send/recv()
metze
2009-03-19 16:25:54 +01:00
Stefan Metzmacher
ccfd6a6e39 lib/tsocket: add tsocket_recvfrom_send/recv()
metze
2009-03-19 16:25:53 +01:00
Stefan Metzmacher
6c88d61bdd lib/tsocket: add an implementation for bsd style sockets.
metze
2009-03-19 16:25:53 +01:00
Stefan Metzmacher
c00126e609 lib/tsocket: add a tsocket_guide.txt with a description of the design
metze
2009-03-19 16:25:52 +01:00
Stefan Metzmacher
d848d517b5 lib/tsocket: add some useful helper functions
metze
2009-03-19 16:20:22 +01:00
Stefan Metzmacher
2e0e416676 lib/tsocket: add generic socket abstraction layer
This will replace source4/lib/socket/.

metze
2009-03-19 15:01:12 +01:00
Björn Jacke
011ad7245d fix build on old Heimdal based systems
Signed-off-by: Günther Deschner <gd@samba.org>
2009-03-19 14:47:48 +01:00
Stefan Metzmacher
36e7045340 tevent: fix the nesting logic
Only tevent_loop_once and tevent_loop_until() should care
about the nesting level.

This fixes the samba3 printing code where we use tevent_loop_wait()
and don't allow nested events.

We still call the nesting hook for all levels, we need to decide
if we really want this...

metze
2009-03-19 14:39:22 +01:00
Stefan Metzmacher
88dd6af605 s3:libsmb: always create bytes array in cli_trans code
Otherwise we return NO_MEMORY without a reason for fragmented trans
requests, as talloc_append_blob() returns buf if we append a 0 length
blob. When we pass buf = NULL we'll get back NULL and then assume
NO_MEMORY...

metze
2009-03-19 13:57:21 +01:00
Stefan Metzmacher
880fbc4e8c s3:libsmb: fix smb signing for fragmented trans/trans2/nttrans requests
Before we send the secondary requests we need to remove the
old mid=>seqnum mapping and reset cli->mid and make the new
mid=>seqnum mapping "persistent".

The bug we had in cli_send_trans was this:
The first cli_send_smb() incremented cli->mid
and the secondary requests used the incremented mid,
but as cli->outbuf still had the correct mid,
we send the correct mid to the server. The real problem
was that the cli_send_smb() function stored the seqnum
under the wrong mid.

cli_send_nttrans() was totally broken and now follows the
same logic as cli_send_trans().

The good thing is that in practice the problem is unlikely to happen,
because max_xmit is large enough to avoid secondary requests.

metze
2009-03-19 13:54:22 +01:00
Stefan Metzmacher
0dfdb7b911 s3:lib/util_sock: use sys_recv() instead of sys_read() on sockets
This ways the pcap support in socket wrapper sees the received data.

metze
2009-03-19 13:54:17 +01:00
Björn Jacke
2d1fcdc807 fix some typos
Signed-off-by: Michael Adam <obnox@samba.org>
2009-03-19 12:08:55 +01:00
Jeremy Allison
c5394cd7cf Modify simple POSIX open test to use filenames containing a ':'
character. Should stop regressions of bug #6196.
Jeremy.
2009-03-18 21:49:32 -07:00
Jeremy Allison
28e03f2011 Allow DFS client paths to work when POSIX pathnames have been
selected (we need to path in pathname /that/look/like/this).
Jeremy.
2009-03-18 20:57:47 -07:00
Jeremy Allison
add8163c3b Merge branch 'master' of ssh://jra@git.samba.org/data/git/samba 2009-03-18 20:02:26 -07:00
Jeremy Allison
a00a9e4e2c Fix bug #6196 - Unable to serve files with colons to Linux CIFS/VFS client
Looks like the pathname parsing for POSIX paths got
broken when the code for doing Windows streams parsing got added.
Jeremy.
2009-03-18 20:01:33 -07:00
Andrew Tridgell
d380c49791 use the tevent nesting code to avoid the uid problem in the VFS
backend

The vfs_unixuid module changes the uid of the process when executing
operations on behalf of the user. Within the VFS backend we may rely
on semi-async calls, such as winbind calls, which will call the event
loop again. To cope with this we need to ensure that while inside
those calls we revert the uid to root, then revert back to the
connected user when we have finished with the semi-async calls.
2009-03-19 11:23:49 +11:00
Andrew Tridgell
13b6663e23 fixed a logic bug in the tevent nesting code
The event nesting code never triggered as nesting.level was never
greater than 1. The main event loop needs to increase the nesting
level by 1.

I also added a paranoia check to the nesting setup call. The API as
currently written cannot support multiple nesting hooks, so we need to
abort if multiple hooks are tried.
2009-03-19 11:21:36 +11:00
Tim Prouty
710948c788 s3 onefs: Correctly error out when the read returns EOF
Also add some more debugging.
2009-03-18 16:51:41 -07:00
Jeremy Allison
f942cb616e Fix bug #6195 - Migrating from 3.0.x to 3.3.x can fail to update passdb.tdb correctly.
This is a really nasty one to fix as in order to successfully update the
passdb.tdb we must do the equivalent of a tdbbackup to move to the new hash
values before we do the upgrade.
Jeremy.
2009-03-18 15:44:13 -07:00
Günther Deschner
531af136f9 s3: remove POLICY_HND.
Guenther
2009-03-18 23:22:29 +01:00
Günther Deschner
7d7b1a8dcc s3-rpc_parse: remove some unused parsing code.
Guenther
2009-03-18 22:02:23 +01:00
Günther Deschner
a1256594b0 s3-spoolss: fix _spoolss_GetPrinterData printerserver handle query error code.
When _spoolss_GetPrinterData receives a query on a printserver handle for a
value that we have not stored or do not provide, we need to return
WERR_INVALID_PARAM, not WERR_BADFILE. Tested with w2k and w2k3 servers.
Found by torture test.

Guenther
2009-03-18 21:57:07 +01:00
Günther Deschner
43182fdff8 s3-spoolss: fix _spoolss_EnumPrinterDataEx error path.
When a windows clients queries the "" key, we need to make sure to return with
the appropriate error (WERR_INVALID_PARAM in that case), and not fall through
to the buffer size handling macros. Found by torture test.

Guenther
2009-03-18 21:56:38 +01:00
Günther Deschner
7a85a87edf s3-rpc_parse: remove unused BUFFER5 and UNISTR3.
Guenther
2009-03-18 20:17:01 +01:00
Günther Deschner
e966719049 s3-rpc_client: remove unused CLI_DO_RPC_WERR macro.
Guenther
2009-03-18 20:01:51 +01:00
Zach Loafman
8595f260eb s4 libcli: Add back Longhorn beta dialect as a constant
Also tweak how the dialect array and count is initialized.
2009-03-18 11:03:33 -07:00
Günther Deschner
21391f7fbe s3-smbcontrol: use correct PRINTER_NOTIFY flags.
Guenther
2009-03-18 17:46:00 +01:00
Günther Deschner
9d1ab9a001 spoolss: add my copyright.
Guenther
2009-03-18 17:18:46 +01:00
Günther Deschner
7fbdf8aae9 s3-spoolss: remove include/rpc_spoolss.h.
Guenther
2009-03-18 17:09:39 +01:00
Günther Deschner
36d0785806 s3-spoolss: remove rpc_server/srv_spoolss.c alltogether.
Guenther
2009-03-18 17:09:33 +01:00
Günther Deschner
a502392541 s3-spoolss: remove rpc_parse/parse_spoolss.c alltogether.
Good-Bye, last hand-marshalled rpc functions, rest in peace.

Guenther
2009-03-18 17:09:26 +01:00
Günther Deschner
a4e999c7e3 s3-spoolss: remove old spoolss_EnumPrinterDataEx.
Guenther
2009-03-18 17:09:18 +01:00
Günther Deschner
0cfb1aea29 s3-spoolss: use pidl for _spoolss_EnumPrinterDataEx.
Please note that this has been the last call in samba3 that was
using hand-marshalled rpc. With this commit all named pipe rpc services
in samba3 have now fully moved to pidl generated code :-)

Guenther
2009-03-18 17:07:39 +01:00
Günther Deschner
31106cdace s3-spoolss: use printer and job notify enums provided by idl.
Guenther
2009-03-18 16:47:01 +01:00
Günther Deschner
e61c9ca36d s3-spoolss: fix spoolss server after spoolss_Field changes.
Guenther
2009-03-18 16:46:49 +01:00
Günther Deschner
8b730ca1d8 s3-rpcclient: fix spoolss notify test after spoolss_Field changes.
Guenther
2009-03-18 16:46:42 +01:00
Günther Deschner
9744a7058c s4-smbtorture: fix spoolss notify test after spoolss_Field changes.
Guenther
2009-03-18 16:46:33 +01:00
Günther Deschner
65151077b3 spoolss: add custom ndr_print_spoolss_Field.
Guenther
2009-03-18 16:46:14 +01:00
Günther Deschner
0e21ea39d5 s3: re-run make samba3-idl.
Guenther
2009-03-18 16:46:07 +01:00
Günther Deschner
f9ddc6ae4a spoolss: make spoolss_Field a nodiscriminant union of 2 sets of notify flag enums.
Guenther
2009-03-18 16:45:59 +01:00
Günther Deschner
9ab8953d74 s3-rpc_parse: move prs_uint64 to rpc_parse/parse_prs.c.
Guenther
2009-03-18 16:43:28 +01:00
Günther Deschner
9fdeb7f7b3 s3-spoolss: remove custom syntax_spoolss and use the syntax defined in IDL.
Guenther
2009-03-18 14:18:42 +01:00
Günther Deschner
b0747651b9 s3-printing: use marshall/unmarshall_sec_desc_buf in sec_desc_upg_fn().
Guenther
2009-03-18 13:06:24 +01:00
Günther Deschner
ef02342562 s3-spoolss: add registry_value_to_printer_enum_value.
Guenther
2009-03-18 11:55:54 +01:00
Günther Deschner
f683341294 s3-spoolss: add SPOOLSS_BUFFER_ARRAY macro.
Guenther
2009-03-18 11:55:47 +01:00
Günther Deschner
2687d29f7c spoolss: add ndr_size_spoolss_EnumPrinterDataEx_info in spoolss helper.
Guenther
2009-03-18 11:55:41 +01:00
Günther Deschner
ec47aac299 spoolss: rename NDR_SPOOLSS_SIZE_ENUM macro to NDR_SPOOLSS_SIZE_ENUM_LEVEL in
spoolss helper.

Guenther
2009-03-18 11:55:32 +01:00
Günther Deschner
342b436691 s4-smbtorture: fix spoolss_EnumPrinterKey callers in RPC-SPOOLSS-WIN test.
Kai, please check.

Guenther
2009-03-18 10:35:22 +01:00