1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00
Commit Graph

6536 Commits

Author SHA1 Message Date
Tim Potter
2f25e5118f Converted enumprinters and enumports cmd functions to use WERROR
values returned from cli functions.  They are converted to NTSTATUS codes
using the error map functions.

Do buffer size loop checks by setting offered = 0 and using the return
value of needed in the next call.
(This used to be commit 4efbdda3fc)
2002-01-06 09:03:48 +00:00
Tim Potter
b77eec91dc Converted enumprinters and enumports cli functions to return WERRORs.
Make the offered and needed buffer size into parameters.
(This used to be commit 9d9e7fb74d)
2002-01-06 09:02:14 +00:00
Tim Potter
969d82ef25 Check for winbind separator in user name for cli_session_setup()
Patch from Alexander Bokovoy <a.bokovoy@sam-solutions.net>
(This used to be commit 6c42bf2089)
2002-01-06 04:03:26 +00:00
Tim Potter
cd0772e51e spoolss rpc client cleanup:
- converted OpenPrinterEx and ClosePrinter to WERROR instead of NT_STATUS
 - doc
(This used to be commit 248d114f85)
2002-01-06 03:54:40 +00:00
Tim Potter
009d7414d2 Define a rpc_client doc group.
(This used to be commit 87bc0a71ec)
2002-01-06 03:49:28 +00:00
Tim Potter
21881b9c35 Minor doc cleanups.
(This used to be commit 5c8f6be290)
2002-01-06 03:48:41 +00:00
Tim Potter
bf4c3d3659 Added a get_dos_error_msg() function to mirror the get_nt_error_msg()
One day I'll get around to refactoring the DOS error handling so it mirrors
the NT error handling code.
(This used to be commit f4535721d3)
2002-01-06 03:41:29 +00:00
Tim Potter
84dbcd6147 Display nicer message when server name could not be resolved.
(This used to be commit 950d8e3656)
2002-01-06 03:24:51 +00:00
Tim Potter
d1baa1fda9 DOS error 31 is ERRgeneral, General Failure. This is the WERROR equivalent
to NT_STATUS_UNSUCCESSFUL according to AB's funky new error map.
(This used to be commit 9c968fbb01)
2002-01-06 02:55:37 +00:00
Andrew Bartlett
b8b228d961 Get this code back to where it belongs...
Apparently (and I will doublecheck) its legal to do an annoymous session setup
when we negoitiated SPNEGO, but we can't do an authenticated one becouse we
didn't give a challange.

Andrew Bartlett
(This used to be commit 08a5c5bf94)
2002-01-06 01:37:14 +00:00
Andrew Bartlett
b283dba09d Some more SPNEGO fixes.
(This used to be commit 0e564cb32a)
2002-01-06 00:49:23 +00:00
Andrew Tridgell
cba3586456 fixed another DATA_BLOB constructor
(This used to be commit c6affae4bf)
2002-01-05 23:34:06 +00:00
Andrew Tridgell
b0e4827b97 simple fix for creating blank data blobs
(This used to be commit 08bb2dfec2)
2002-01-05 23:30:59 +00:00
Andrew Bartlett
341f87090b Fix up the SPNEGO segfault.
(This used to be commit 17b1c83dd0)
2002-01-05 12:04:33 +00:00
Andrew Bartlett
2e28f8ff0e I've decided to move the auth code around a bit more...
The auth_authsupplied_info typedef is now just a plain struct - auth_context,
but it has been modified to contain the function pointers to the rest
of the auth subsystem's components.

(Who needs non-static functions anyway?)

In working all this mess out, I fixed a number of memory leaks and moved the
entire auth subsystem over to talloc().

Note that the TALLOC_CTX attached to the auth_context can be rather long-lived,
it is provided for things that are intended to live as long.  (The
global_negprot_auth_context lasts the whole life of the smbd).

I've also adjusted a few things in auth_domain.c, mainly passing the domain as
a paramater to a few functions instead of looking up lp_workgroup().  I'm
hopign to make this entire thing a bit more trusted domains (as PDC) freindly
in the near future.

Other than that, I moved a bit of the code around, hence the rather messy diff.

Andrew Bartlett
(This used to be commit 12f5515f55)
2002-01-05 04:55:41 +00:00
Andrew Bartlett
5a9c2f74ab Add a talloc varient of the data_blob functions.
Also change the structure so it has its own (optional) 'free' pointer - so we
don't free() a talloc'ed version.

also split out the data_blob_clear() functionaility.

Andrew Bartlett
(This used to be commit 207ee8aac4)
2002-01-05 04:23:12 +00:00
Andrew Bartlett
aa045c08b2 Add a comment on how this error map was derrived.
This applies only to the NT->Dos map, I'm still trying to come up with a way to
do the reverse.
(This used to be commit 323dd422bd)
2002-01-05 04:04:03 +00:00
Andrew Bartlett
69d6c9fe1a One line fix to get smbmount working again.
This just turns of SPNGO becouse Win2k breaks if you attempt this and DOS
errors at the same time.

Andrew Bartlett
(This used to be commit 2c09907b53)
2002-01-05 03:45:50 +00:00
Jeremy Allison
86b3aeb42a Added DEBUG in set_share_mode to track down logic insanity.
Jeremy.
(This used to be commit 32f4f3a45d)
2002-01-05 02:37:23 +00:00
Andrew Bartlett
f358c51618 Add a touch of const
(This used to be commit b2af4372b1)
2002-01-05 01:33:45 +00:00
Andrew Tridgell
9c7b042f31 print the timezone in the same format as 'date +%z' - much better for scripting
(This used to be commit faa1b222f1)
2002-01-04 23:02:14 +00:00
Jeremy Allison
e86102e868 Missed error return is can_rename fails.
Jeremy.
(This used to be commit 2db99fa49b)
2002-01-04 22:30:00 +00:00
Jeremy Allison
eb61d92ca7 Re-wrote the guts of the rename_internals code to cope with a reported
bug (renaming name -> name was failing, on W2K it succeeds). Simplified
the common case, did a lot of work to ensure NT error codes are correctly
reported back to client.
Jeremy.
(This used to be commit e6b27f3d80)
2002-01-04 21:11:35 +00:00
Jeremy Allison
02b23d9d2c Added WERROR for non local domain.
Jeremy.
(This used to be commit 6c51d90f13)
2002-01-03 23:26:00 +00:00
Jeremy Allison
eca99f5c22 Fixed nasty cast of tdb_delete in traversals.
Jeremy.
(This used to be commit a0cdec3acc)
2002-01-03 22:48:48 +00:00
Jeremy Allison
35fff73f10 Don't use static memory, malloc it...
Jeremy.
(This used to be commit 8aee8211cd)
2002-01-03 21:48:17 +00:00
Jeremy Allison
894e87cb32 Fix the fix.... (sigh).
Jeremy.
(This used to be commit 73cf9d04f6)
2002-01-03 21:37:45 +00:00
Jeremy Allison
41dd759a50 Ensure modtime is set correctly on destination files in copy command.
Jeremy.
(This used to be commit fb1ab02553)
2002-01-03 20:49:06 +00:00
Jeremy Allison
791433434e Fixed embarressing 16k strack trashing bug :-(.
Jeremy.
(This used to be commit b52c3219d6)
2002-01-03 19:57:12 +00:00
Andrew Tridgell
9e0297b3ed added nTSecurityDescriptor field to host acct dump
(This used to be commit f383e19e09)
2002-01-03 11:59:33 +00:00
Andrew Bartlett
80437a4cc0 Update the NT_STATUS -> DOS error table.
This new table is rather different to the old one (see diff posted to the
list for a sorted list of differences) and needs a *lot* of testing.

It does however seem to line up much better with what NT is using, as
exampled by the change to the OBJECT_NAME_COLLISION DOS error, it now matches
win2k where it didn't before.

I can't see any critical errors we now get wrong, and I know that the auth
errors are correct as per my on-the-wire observations.

This table was produced (and I hope to comment this better later) by
using the ERRMAPEXTRACT smbtorture tool, a Win2k domain member and the
'name_to_ntstatus' auth module on the HEAD PDC.  This module returned
the username as the error, and the NT box was forced to give me a dos
error becouse thats all I negotiated on that connection.  Hence the map.

Andrew Bartlett
(This used to be commit a855dfb2e0)
2002-01-03 08:36:47 +00:00
Martin Pool
092f962b9c Clarify doc for SAFE_FREE.
(This used to be commit 269a7d3c9b)
2002-01-03 07:49:07 +00:00
Andrew Bartlett
8f88157dce Make a couple more of the warnings also be C comments
(This used to be commit 8f343beae7)
2002-01-03 07:42:15 +00:00
Andrew Bartlett
a8f356a71f A few changes to always output the erorr mapping even when the error was
'squashed' or the session setup succeeded.  (How the latter occurs I don't know).
(This used to be commit d879d2ffff)
2002-01-03 07:36:26 +00:00
Andrew Bartlett
2998af3746 Workaround some 'smarts' in Win2k.
Win2k kills off connections that have issued a negprot but havn't yet issued
a session setup when a second connection appears from the same host.
(This used to be commit d47e61eb46)
2002-01-03 07:00:18 +00:00
Andrew Bartlett
f9866e88a6 Re-add bail on failure.
(This used to be commit da9444d98f)
2002-01-03 06:10:25 +00:00
Martin Pool
f55c47b1ff Fix talloc msg registration
(This used to be commit 9a473ecf96)
2002-01-03 05:57:41 +00:00
Martin Pool
0b66e623f2 Put a name on lp_talloc pool
(This used to be commit 4721217494)
2002-01-03 05:57:21 +00:00
Martin Pool
5c1cb14d3e Make talloctort call talloc_describe_all before exiting
(This used to be commit 4877501da9)
2002-01-03 05:57:02 +00:00
Martin Pool
cfec6d4498 Cope nicely with pools with no name.
(This used to be commit 86abefc172)
2002-01-03 05:52:27 +00:00
Andrew Tridgell
34b9c7cee2 fixed ERRMAPEXTRACT torture to work with win2k
(This used to be commit 27143900e7)
2002-01-03 05:48:49 +00:00
Martin Pool
af643d5f1f smbd children should also register for POOL_USAGE
(This used to be commit b46d874f47)
2002-01-03 05:41:13 +00:00
Martin Pool
86eb3e0edd Cleanup format.
(This used to be commit a9b9ae47e1)
2002-01-03 05:36:21 +00:00
Martin Pool
e28cdc0931 talloc accounting now includes number of chunks and bytes allocated.
(This used to be commit cd25d01e42)
2002-01-03 05:34:33 +00:00
Martin Pool
588a59b505 Send back talloc allocation information when POOL_USAGE is received.
(This used to be commit 7cb8e95f93)
2002-01-03 05:26:57 +00:00
Martin Pool
3c2b7777ed Add talloc_asprintf_append, which grows an existing string buffer to
contain new print-formatted information.  (Also
talloc_vasprintf_append.)  Idea borrowed from glib.
(This used to be commit 53723e8748)
2002-01-03 05:25:30 +00:00
Martin Pool
9c409a9e39 smbd now sends a reply to MSG_REQ_POOL_USAGE, though it's pretty
boring so far.
(This used to be commit 9b217dce7f)
2002-01-03 04:22:55 +00:00
Martin Pool
91ec6cf19f smbd should register to receive MSG_REQ_POOL_USAGE. Response should
be information about memory usage, but this is not done yet.
(This used to be commit 830a126a44)
2002-01-03 03:53:41 +00:00
Tim Potter
9c1ddeca6f Fixed crash bug in display_print_info_2()
(This used to be commit b70f870cd9)
2002-01-03 03:51:13 +00:00
Martin Pool
cb039d5cf1 Ignore dmalloc.log.
(This used to be commit cfa89169e0)
2002-01-03 03:47:09 +00:00