Tim Potter [Fri, 24 Sep 2004 04:49:45 +0000 (04:49 +0000)]
r2582: Merge checks for xattr and acl libraries from Samba3 so the {get,set}ntacl
programs can build on non-xattr machines.
Andrew Tridgell [Fri, 24 Sep 2004 03:34:55 +0000 (03:34 +0000)]
r2581: added "hosts allow" and "hosts deny" checking in smbd. I needed this
as my box keeps getting hit by viruses spreading on my companies
internal network, which screws up my debug log badly (sigh).
metze, I'm not sure if you think access.c should go in the socket
library or not. It is closely tied to the socket functions, but you
may prefer it separate.
The access.c code is a port from Samba3, but with some cleanups to
make it (slighly) less ugly.
Andrew Tridgell [Fri, 24 Sep 2004 03:31:43 +0000 (03:31 +0000)]
r2580: fixed an uninitialised byte found by valgrind
Andrew Tridgell [Fri, 24 Sep 2004 01:21:21 +0000 (01:21 +0000)]
r2577: - I recently found out that charaters below 0x3F are guaranteed not to
occur as secondary bytes in any multi-byte character set. This
allows for a very simple optimisation in strchr_m() and
strrchr_m(). It might be a good idea to pick this up for Samba3.
- the horrible toktocliplist() is only used in clitar.c, so move it
there, to prevent anyone else from being tempted to use it.
Tim Potter [Fri, 24 Sep 2004 01:20:30 +0000 (01:20 +0000)]
r2576: Some userspace tools for getting and setting ntacls via the 'security.ntacl'
extended attribute.
Andrew Tridgell [Fri, 24 Sep 2004 00:44:42 +0000 (00:44 +0000)]
r2573: - added a configure test for nanosecond time resolution in struct stat
(recently Linux systems support this, allowing us to support the
full resolution in NTTIME)
- use nanosecond resolution in the posix backend if available
- moved the configure tests and list of object files for the posix
backend into ntvfs/posix/ to keep them more neatlly separated.
Andrew Tridgell [Fri, 24 Sep 2004 00:42:20 +0000 (00:42 +0000)]
r2572: fixed two places where status is not initialised in the nbench backend
Andrew Tridgell [Thu, 23 Sep 2004 07:55:43 +0000 (07:55 +0000)]
r2562: got rid of the "reference" backend that never happened - the code is
too stale to be of any use as a reference.
Andrew Tridgell [Thu, 23 Sep 2004 07:44:42 +0000 (07:44 +0000)]
r2561: completely redid the ntvfs module chaining code, You can now do something like:
ntvfs handler = nbench posix
and the nbench pass-thru module will be called before the posix
module. The chaining logic is now much saner, and less racy, with each
level in the chain getting its own private pointer rather than relying
on save/restore logic in the pass-thru module.
The only pass-thru module we have at the moment is the nbench one
(which records all traffic in a nbench compatibe format), but I plan
on soon writing a "unixuid" pass-thru module that will implement the
setegid()/setgroups()/seteuid() logic for standard posix uid
handling. This separation of the posix backend from the uid handling
should simplify the code, and make development easier.
I also modified the nbench module so it can do multiple chaining, so
if you want to you can do:
ntvfs module = nbench nbench posix
and it will save 2 copies of the log file in /tmp. This is really only
useful for testing at the moment until we have more than one pass-thru
module.
Tim Potter [Thu, 23 Sep 2004 03:32:46 +0000 (03:32 +0000)]
r2560: Don't require structure fields that have the pidl value() property
to be set. They can be if you want, but will be overwritten by the
pidl push code.
Tim Potter [Thu, 23 Sep 2004 03:26:14 +0000 (03:26 +0000)]
r2559: Python ints can't hold the full range of uint32 values so store them
as Python longs.
Also allow shorter width integer types to be initialised from long values.
Their values are truncated if they are too long.
Andrew Tridgell [Thu, 23 Sep 2004 02:21:51 +0000 (02:21 +0000)]
r2556: fixed the -s one bug that jelmer pointed out
Tim Potter [Thu, 23 Sep 2004 02:21:11 +0000 (02:21 +0000)]
r2555: Start of a rpcclient type program.
Andrew Tridgell [Thu, 23 Sep 2004 02:15:10 +0000 (02:15 +0000)]
r2554: added a test for a bug that jelmer pointed out (handling of -s one)
Andrew Tridgell [Thu, 23 Sep 2004 02:14:43 +0000 (02:14 +0000)]
r2553: fixed ldbtest so it passes the ldap schema restrictions and thus can be used on the ldap backend
Andrew Bartlett [Thu, 23 Sep 2004 00:51:45 +0000 (00:51 +0000)]
r2552: Character set conversion and string handling updates.
The intial motivation for this commit was to merge in some of the
bugfixes present in Samba3's chrcnv and string handling code into
Samba4. However, along the way I found a lot of unused functions, and
decided to do a bit more...
The strlen_m code now does not use a fixed buffer, but more work is
needed to finish off other functions in str_util.c. These fixed
length buffers hav caused very nasty, hard to chase down bugs at some
sites.
The strupper_m() function has a strupper_talloc() to replace it (we
need to go around and fix more uses, but it's a start). Use of these
new functions will avoid bugs where the upper or lowercase version of
a string is a different length.
I have removed the push_*_allocate functions, which are replaced by
calls to push_*_talloc. Likewise, pstring and other 'fixed length'
wrappers are removed, where possible.
I have removed the first ('base pointer') argument, used by push_ucs2,
as the Samba4 way of doing things ensures that this is always on an
even boundary anyway. (It was used in only one place, in any case).
Andrew Bartlett [Thu, 23 Sep 2004 00:47:38 +0000 (00:47 +0000)]
r2551: Add const.
Andrew Bartlett
Andrew Bartlett [Thu, 23 Sep 2004 00:27:21 +0000 (00:27 +0000)]
r2550: survive our own BASE-NEGNOWAIT torture test.
Andrew Bartlett
Andrew Bartlett [Thu, 23 Sep 2004 00:10:40 +0000 (00:10 +0000)]
r2547: Another place to use convert_string_talloc().
Andrew Bartlett
Andrew Bartlett [Thu, 23 Sep 2004 00:01:16 +0000 (00:01 +0000)]
r2546: Remove another strupper_m() that we don't need.
Andrew Bartlett
Andrew Bartlett [Wed, 22 Sep 2004 23:56:22 +0000 (23:56 +0000)]
r2545: str_charnum -> strlen_m.
These two functions do exactly the same thing, I'll be removing
str_charnum shortly.
Andrew Bartlett
Andrew Bartlett [Wed, 22 Sep 2004 23:53:41 +0000 (23:53 +0000)]
r2544: (missed from the last commit)
smb_conn->socket has gone away, and the packet count is now in the
main structure.
Andrew Bartlett
Andrew Bartlett [Wed, 22 Sep 2004 23:51:17 +0000 (23:51 +0000)]
r2543: Catch one more use of sub_get_remote_machine().
Andrew Bartlett
Andrew Bartlett [Wed, 22 Sep 2004 23:50:28 +0000 (23:50 +0000)]
r2542: I really don't like the 'substitute' code, and I particularly don't
like it in the mainline code (outside the smb.conf magic).
We will need to have a more useful 'helper' routine for this, but for
now we at least get a reliable IP address.
Also remove the unused 'socket' structure in the smb server - it seems
to have been replaced by the socket library.
Andrew Bartlett
Andrew Bartlett [Wed, 22 Sep 2004 23:42:20 +0000 (23:42 +0000)]
r2541: Add a TODO: This is one place we can grab the remote netbios name.
Andrew Bartlett
Jelmer Vernooij [Wed, 22 Sep 2004 22:20:40 +0000 (22:20 +0000)]
r2538: Support IPv6 as transport for MSRPC. Tested against Win2k3
Implemented using the POSIX getaddrinfo() call (specified by POSIX 1003.1-2003 and 2553)
I'm not sure how portable this function is, so we might have to add a sys_getaddrinfo() later on.
Andrew Bartlett [Wed, 22 Sep 2004 22:10:43 +0000 (22:10 +0000)]
r2537: Add static and use strlen_m instead of str_charnum().
Andrew Bartlett
Andrew Bartlett [Wed, 22 Sep 2004 22:06:21 +0000 (22:06 +0000)]
r2536: This is a classic case for the use of our new talloc code, and
convert_string_talloc().
Andrew Bartlett
Andrew Bartlett [Wed, 22 Sep 2004 21:50:49 +0000 (21:50 +0000)]
r2535: Make certain, that even if we have invalid ASN.1 here, and the caller does not check the return value, that we don't return uninitialised memory here.
Andrew Bartlett
Andrew Bartlett [Wed, 22 Sep 2004 21:45:52 +0000 (21:45 +0000)]
r2534: Change NTLMSSP parsing to avoid a seperate str_chrnum() call - storing
away the string as a data blob to be put in the buffers later.
This also avoids a length-limited push_str, moving to push_ucs2_talloc().
Andrew Bartlett
Jelmer Vernooij [Wed, 22 Sep 2004 18:59:13 +0000 (18:59 +0000)]
r2532: Don't run EnumValue torture test for now (idl needs fixing, doesn't compile)
Jelmer Vernooij [Wed, 22 Sep 2004 18:35:14 +0000 (18:35 +0000)]
r2531: Fix crashbug
Jelmer Vernooij [Wed, 22 Sep 2004 18:34:34 +0000 (18:34 +0000)]
r2530: Don't put main in proto.h
Stefan Metzmacher [Wed, 22 Sep 2004 14:16:42 +0000 (14:16 +0000)]
r2527: - add a dummy for a simple ldb backend
- handle the complete rootDSE search (maybe this will be also a partition module)
metze
Stefan Metzmacher [Wed, 22 Sep 2004 13:14:56 +0000 (13:14 +0000)]
r2526: use LDAP error 53 (unwillingToPerform)
when the backend didn't implement the call
metze
Stefan Metzmacher [Wed, 22 Sep 2004 13:08:30 +0000 (13:08 +0000)]
r2525: fix a search response when the backend didn't support Search
we return LDAP error 32 (noSuchObject) now instead of a protocol error
metze
Andrew Tridgell [Wed, 22 Sep 2004 13:01:55 +0000 (13:01 +0000)]
r2524: a simple pvfs rename implementation to make testing easier
Stefan Metzmacher [Wed, 22 Sep 2004 13:01:00 +0000 (13:01 +0000)]
r2523: - readd rootDSE reply
- add infrastructure start for having multiple directory partitions (backends)
metze
Andrew Tridgell [Wed, 22 Sep 2004 12:45:33 +0000 (12:45 +0000)]
r2521: fixed two uninitialised data errors found with valgrind when
negotiating a old style session setup (eg. LANMAN1)
Andrew Tridgell [Wed, 22 Sep 2004 12:38:19 +0000 (12:38 +0000)]
r2520: - finished implementing the server side of the old style search requests
Jelmer Vernooij [Wed, 22 Sep 2004 12:33:39 +0000 (12:33 +0000)]
r2519: Registry RPC pipe fixes (use struct registry_key instead of REG_KEY, etc)
Jelmer Vernooij [Wed, 22 Sep 2004 12:32:31 +0000 (12:32 +0000)]
r2518: Some long overdue changes:
- Samba4-style code in lib/registry (struct registry_key instead of REG_KEY, etc)
- Use hives (like Windows has drives) instead of one root key (like a Unix FS)
- usability fixes in the GTK utilities (autodetect the username,
enable/disable options, etc)
- fix gwsam compile
- several bugfixes in the registry rpc code
- do charset conversion in nt4 registry backend
Tim Potter [Wed, 22 Sep 2004 12:25:53 +0000 (12:25 +0000)]
r2516: Remove duplicate line.
Andrew Bartlett [Wed, 22 Sep 2004 12:17:51 +0000 (12:17 +0000)]
r2515: Fixes from smbtorture - these session keys are not individually encrypted.
Andrew Bartlett
Andrew Bartlett [Wed, 22 Sep 2004 12:15:27 +0000 (12:15 +0000)]
r2514: Remove unused funcions, and add static.
Andrew Bartlett
Andrew Bartlett [Wed, 22 Sep 2004 12:14:44 +0000 (12:14 +0000)]
r2513: Avoid strupper/strlower when you can. This developers module
certainly doesn't need it.
Andrew Bartlett
Andrew Bartlett [Wed, 22 Sep 2004 12:02:16 +0000 (12:02 +0000)]
r2512: Remove unused stub functions.
Andrew Bartlett
Tim Potter [Wed, 22 Sep 2004 11:48:10 +0000 (11:48 +0000)]
r2511: Add NT status codes.
Jelmer Vernooij [Wed, 22 Sep 2004 11:24:07 +0000 (11:24 +0000)]
r2510: Make C++ compilers happy, use ifdef instead of if
Stefan Metzmacher [Wed, 22 Sep 2004 10:48:32 +0000 (10:48 +0000)]
r2509: add a struct ldapsrv_call which is simular to the dcesrv_call_state struct
and related stuff...
metze
Stefan Metzmacher [Wed, 22 Sep 2004 10:42:58 +0000 (10:42 +0000)]
r2508: - implemented ldap_decode() for UnbindRequest and ExtendedRequest
- fail when we got a wrong tag in ldap_decode()
metze
Andrew Bartlett [Wed, 22 Sep 2004 10:42:09 +0000 (10:42 +0000)]
r2507: Allow a case-insensitive lookup when converting strings into NTSTATUS
values.
Andrew Bartlett
Andrew Bartlett [Wed, 22 Sep 2004 10:36:55 +0000 (10:36 +0000)]
r2506: Add more printf attributes for format checking.
Andrew Bartlett
Andrew Bartlett [Wed, 22 Sep 2004 10:34:49 +0000 (10:34 +0000)]
r2505: Remove unused function. If/when we implement plaintext authenticaton
in Samba4, I want to redo this.
Andrew Bartlett
Andrew Bartlett [Wed, 22 Sep 2004 10:32:56 +0000 (10:32 +0000)]
r2504: Add printf attribute, for format argument checking.
Andrew Bartlett
Andrew Tridgell [Wed, 22 Sep 2004 08:17:26 +0000 (08:17 +0000)]
r2503: the RAW-SEARCH test now mostly passes against the posix backend
Tim Potter [Wed, 22 Sep 2004 07:04:44 +0000 (07:04 +0000)]
r2502: Finish off samr torture test: samr_CreateUser2, samr_SetUserInfo,
samr_QueryAliasInfo, samr_SetAliasInfo, samr_AddMemberToAlias,
samr_AddMultipleMembersToAlias, samr_QueryDisplayInfo,
samr_QueryDisplayInfo2, samr_QueryDisplayInfo3,
samr_GetDisplayEnumerationIndex, samr_GetDisplayEnumerationIndex2,
samr_TestPrivateFunctionsDomain, samr_RidToSid,
samr_GetBootKeyInformation, samr_DeleteUser, samr_DeleteAlias,
samr_Close.
Tim Potter [Wed, 22 Sep 2004 06:46:30 +0000 (06:46 +0000)]
r2501: The AddMemberToAlias test doesn't need a domain_handle.
Andrew Tridgell [Wed, 22 Sep 2004 05:17:55 +0000 (05:17 +0000)]
r2500: disable the sleep test in echo until we have a win32 echo server that
does Microsoft style async rpc serving
Andrew Tridgell [Wed, 22 Sep 2004 05:15:56 +0000 (05:15 +0000)]
r2499: - use more efficient wildcard delete in smbclient
- use "*.*" instead of "*" when connected to ancient servers
Andrew Tridgell [Wed, 22 Sep 2004 05:14:59 +0000 (05:14 +0000)]
r2498: added STATUS_NO_MORE_FILES to nt status codes that we can map to a string
Andrew Tridgell [Wed, 22 Sep 2004 05:14:20 +0000 (05:14 +0000)]
r2497: fixed an uninitialised 4 bytes in old style session setup (found with valgrind)
Tim Potter [Wed, 22 Sep 2004 05:14:15 +0000 (05:14 +0000)]
r2496: Check that reference parameters are not None.
Andrew Tridgell [Wed, 22 Sep 2004 05:13:32 +0000 (05:13 +0000)]
r2495: cope properly with STATUS_NO_MORE_FILES in old search client code
Andrew Tridgell [Wed, 22 Sep 2004 05:13:00 +0000 (05:13 +0000)]
r2494: fixed connecting to a share mode server (tested and really works now)
Andrew Tridgell [Wed, 22 Sep 2004 05:12:21 +0000 (05:12 +0000)]
r2493: allow tdb to build standalone
Tim Potter [Wed, 22 Sep 2004 04:17:25 +0000 (04:17 +0000)]
r2492: Some cleanups.
Add tests for samr_CreateDomainGroup, samr_DeleteDomainGroup,
samr_QueryDomainInfo, samr_SetDomainInfo, samr_EnumDomainUsers,
samr_EnumDomainAliases, samr_EnumDomainGroups.
Tim Potter [Wed, 22 Sep 2004 04:12:36 +0000 (04:12 +0000)]
r2491: Handle pointers to scalars when converting to a Python dictionary (i.e
resume handles).
Remove some now unused debugging code.
Tim Potter [Wed, 22 Sep 2004 03:42:58 +0000 (03:42 +0000)]
r2490: Some changes to take into account non-error NTSTATUS codes being returned:
- Only throw an exception if NT_STATUS_IS_ERR() instead of
!NT_STATUS_IS_OK().
- Add the NTSTATUS value to the returned dictionary under a key of
'result' so calling functions can access it.
Tim Potter [Wed, 22 Sep 2004 03:36:17 +0000 (03:36 +0000)]
r2489: Rename account_flags in EnumDomainAliases() to acct_flags.
Tim Potter [Wed, 22 Sep 2004 02:39:38 +0000 (02:39 +0000)]
r2486: Use correct type checks when checking 64-bit quantities (int64, uint64,
NTTIME and HYPER_T).
Also use the correct conversion routines when creating 64 bit objects.
Andrew Tridgell [Wed, 22 Sep 2004 02:05:02 +0000 (02:05 +0000)]
r2485: - add a test case in ldbtest for a bug pointed out by Jon Haswell.
- fixed the bug shown with the above test, by initialising the
sequence number to something different from the value used in
ltdb_cache_free()
Andrew Tridgell [Wed, 22 Sep 2004 02:03:34 +0000 (02:03 +0000)]
r2484: allow ldb to build standalone again
Andrew Tridgell [Tue, 21 Sep 2004 08:46:47 +0000 (08:46 +0000)]
r2469: complete overhaul of the old-style RAW_SEARCH_ calls (the OS/2 and
original core level calls). The old code was completely wrong in many respects.
also fixed the EA_SIZE level in the server
extended the RAW-SEARCH test suite to test the new code properly
Stefan Metzmacher [Tue, 21 Sep 2004 08:11:53 +0000 (08:11 +0000)]
r2468: print out the names of the fault codes#
metze
Andrew Tridgell [Tue, 21 Sep 2004 07:32:01 +0000 (07:32 +0000)]
r2465: modify the autoidl hack to work for DRSUAPI
Stefan Metzmacher [Tue, 21 Sep 2004 07:03:16 +0000 (07:03 +0000)]
r2464: fix the build
metze
Andrew Tridgell [Tue, 21 Sep 2004 04:41:17 +0000 (04:41 +0000)]
r2463: make sure we don't send the password in a tconx unless we really have to
Andrew Tridgell [Tue, 21 Sep 2004 04:11:48 +0000 (04:11 +0000)]
r2462: added a test for the error code for no matching filename
Tim Potter [Tue, 21 Sep 2004 04:11:41 +0000 (04:11 +0000)]
r2461: Update samr.py torture test after policy handle parameter renames.
I thought of another exception to the policy name rule - samr_Close
can operate on any kind of samr handle.
Andrew Tridgell [Tue, 21 Sep 2004 04:11:16 +0000 (04:11 +0000)]
r2460: fixed the spnego code that I recently broke
Andrew Tridgell [Tue, 21 Sep 2004 04:10:43 +0000 (04:10 +0000)]
r2459: added STATUS_NO_MORE_FILES nt status code
Tim Potter [Tue, 21 Sep 2004 03:51:38 +0000 (03:51 +0000)]
r2458: Rename policy handle parameters for the SAMR pipe. Parameters now
have the handle type implied by the parameter name. There are four
types of handle: connect, domain, user and group handles. The
various samr_Connect functions return a connect handle, and the
samr_OpenFoo functions return a foo handle.
There is one exception - the samr_{Get,Set}Security function can
take any type of handle.
Fix up all C callers.
Andrew Tridgell [Tue, 21 Sep 2004 02:41:32 +0000 (02:41 +0000)]
r2457: expanded the RAW-SEARCH test to test for what happens when a directory
is modified while being searched, and whether the server always
returns sorted directory listings.
Andrew Tridgell [Tue, 21 Sep 2004 01:43:53 +0000 (01:43 +0000)]
r2456: got rid of some outdated global macros
Andrew Tridgell [Tue, 21 Sep 2004 01:43:08 +0000 (01:43 +0000)]
r2455: don't use the uninitialised sess structure when auth fails
Andrew Tridgell [Tue, 21 Sep 2004 01:42:04 +0000 (01:42 +0000)]
r2454: fixed the accelerated StrCaseCmp() so it compares in the right order
Stefan Metzmacher [Mon, 20 Sep 2004 13:17:51 +0000 (13:17 +0000)]
r2449: use a blocking fd for smbsrv code
metze
Stefan Metzmacher [Mon, 20 Sep 2004 12:40:11 +0000 (12:40 +0000)]
r2448: use SO_REUSEADDR=1 for the server
metze
Stefan Metzmacher [Mon, 20 Sep 2004 12:31:07 +0000 (12:31 +0000)]
r2447: let the server code use the new lib/socket/ stuff
metze
Stefan Metzmacher [Mon, 20 Sep 2004 12:03:49 +0000 (12:03 +0000)]
r2446: implement socket_get_<peer|my>_<addr|port>() for ipv4
metze
Stefan Metzmacher [Mon, 20 Sep 2004 10:40:11 +0000 (10:40 +0000)]
r2443: check return code of event_loop_once() to catch thet cases where the server
closes the connetion and we got EBADF from select() and event_loop_once() fails
metze
Stefan Metzmacher [Mon, 20 Sep 2004 10:29:13 +0000 (10:29 +0000)]
r2442: remove unused event_loop_once() call
metze
Stefan Metzmacher [Mon, 20 Sep 2004 10:20:26 +0000 (10:20 +0000)]
r2441: set exit code correct when we got EBADF from select()
metze
Stefan Metzmacher [Mon, 20 Sep 2004 09:13:17 +0000 (09:13 +0000)]
r2439: - function that return just an int don't need a TALLOC_CTX
- fix some return and state bugs
metze
Andrew Tridgell [Mon, 20 Sep 2004 08:53:45 +0000 (08:53 +0000)]
r2438: compile on systems without O_DIRECTORY (probably won't work, but I'll get to that later)
Andrew Tridgell [Mon, 20 Sep 2004 07:31:54 +0000 (07:31 +0000)]
r2437: implemented a suggestion from abartlet that if we cannot convert
strings to UTF16 in StrCaseCmp() that we fall back to a simpler
comparison.
Andrew Tridgell [Mon, 20 Sep 2004 07:28:43 +0000 (07:28 +0000)]
r2436: the second big lump of posix vfs code.
this is still just a skeleton, and many of the functions are just
based on the simple vfs backend, they are there to allow me to run
smbtorture tests against the real parts of the posix backend.
Andrew Tridgell [Mon, 20 Sep 2004 07:26:35 +0000 (07:26 +0000)]
r2435: got rid of another pointless strnequal()
Andrew Tridgell [Mon, 20 Sep 2004 07:26:01 +0000 (07:26 +0000)]
r2434: separate "attrib" and "ex_attrib" elements for DOS attributes is pointless