1
0
mirror of https://github.com/samba-team/samba.git synced 2025-10-17 15:33:16 +03:00
Commit Graph

1921 Commits

Author SHA1 Message Date
Andrew Tridgell
e73b4ae4e5 r2621: - now that the client code is non-blocking, we no longer need
write_data and read_data, which are inherently blocking operations

- got rid of some old NBT keepalive routines that are not needed
2007-10-10 12:59:12 -05:00
Andrew Tridgell
3f7741f178 r2618: before we had refererence counts in talloc I added a hack in the
server side request structure to prevent a structing being freed in
some circumstances. This change replaces this with the much more
robust mechanism of talloc_increase_ref_count().
2007-10-10 12:59:12 -05:00
Andrew Tridgell
01a759b627 r2617: add connect testing to the rpc test suite 2007-10-10 12:59:12 -05:00
Andrew Tridgell
28a647f681 r2616: the cascading nature of talloc_free() can lead to some surprises. In
this case the bug was that server_terminate_connection() destroys the
server context, which in turn cascades down to destroy all current
request contexts, so we musn't then try to destroy the request
structure a second time.
2007-10-10 12:59:12 -05:00
Andrew Tridgell
fee98137ad r2615: fixed a bug in the server side support for CONNECT level security 2007-10-10 12:59:12 -05:00
Andrew Tridgell
f4660857bc r2614: support CONNECT level DCE/RPC security in both client and
server. CONNECT security uses NTLMSSP, but does not do any signing or
sealing (or equivalently, its like signing, but with a zero filled
checksum).
2007-10-10 12:59:12 -05:00
Andrew Tridgell
ed87b7fcbd r2613: use a talloc destructor to ensure that file descriptors are not leaked
on abnormal termination of a connection. As long as the top level
connection structure is freed then that should cascade down to the
file structure, and call this destructor which will close the open file descriptor.

In general I'd like to use this technique in any place in Samba4 where
we hold operating system resources that we need to make sure are
released on abnormal termination.
2007-10-10 12:59:12 -05:00
Andrew Bartlett
cdb8261775 r2612: Ensure ntlm_auth always logs to stderr.
Add missing break;

Andrew Bartlett
2007-10-10 12:59:11 -05:00
Andrew Bartlett
8f4dab5d44 r2611: Try to make Samba4's ntlm_auth more consistant with Samba 3.0.
Andrew Bartlett
2007-10-10 12:59:11 -05:00
Simo Sorce
e502b276ae r2601: avoid free()ing unallocated memory by mistake 2007-10-10 12:59:11 -05:00
Tim Potter
d7d8a7ffc6 r2597: A small program that takes SID strings on stdin and produces a marshalled
lsa_SidArray on stdout.
2007-10-10 12:59:11 -05:00
Jelmer Vernooij
fa29cecb12 r2594: Remove call to Gtk+ 2.4 specific code 2007-10-10 12:59:11 -05:00
Andrew Tridgell
640ced4530 r2593: don't crash if the server doesn't know that 0 count searches mean 1 2007-10-10 12:59:11 -05:00
Andrew Tridgell
efb2b88edd r2592: this fixes one of the security memory leaks in the server 2007-10-10 12:59:10 -05:00
Andrew Tridgell
1730882b9d r2591: fixed two errors in simple backend found with valgrind 2007-10-10 12:59:10 -05:00
Andrew Tridgell
9e1eb58e4b r2590: fixed one of the server security memory leaks. There are more :( 2007-10-10 12:59:10 -05:00
Andrew Tridgell
7b23624a0f r2589: a simple test to help find security related memory leaks. Run valgrind on smbd with
--show-leak=yes and --show-reachable=yes to track them down.
2007-10-10 12:59:09 -05:00
Andrew Tridgell
ee51eefe17 r2588: connect/disconnect is common enough that I don't think a level 0 DEBUG
is warranted to warn that it has happened :)
2007-10-10 12:59:08 -05:00
Andrew Tridgell
5b967c1cbb r2587: fixed a couple of authentication memory leaks. There are more to be
fixed - I'll commit a little test suite soon.
2007-10-10 12:59:08 -05:00
Andrew Tridgell
be20b3164c r2586: updated the nbench example in the README to reflect the new chaining syntax 2007-10-10 12:59:07 -05:00
Andrew Tridgell
01288e82bc r2583: mkproto.pl now treats "int main" as a special case and avoids it. 2007-10-10 12:59:07 -05:00
Tim Potter
daad76207d r2582: Merge checks for xattr and acl libraries from Samba3 so the {get,set}ntacl
programs can build on non-xattr machines.
2007-10-10 12:59:07 -05:00
Andrew Tridgell
058b2fd99e 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.
2007-10-10 12:59:07 -05:00
Andrew Tridgell
0806378b0e r2580: fixed an uninitialised byte found by valgrind 2007-10-10 12:59:07 -05:00
Andrew Tridgell
663b7b75dd 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.
2007-10-10 12:59:07 -05:00
Tim Potter
5b88226f90 r2576: Some userspace tools for getting and setting ntacls via the 'security.ntacl'
extended attribute.
2007-10-10 12:59:07 -05:00
Andrew Tridgell
d92ad9f307 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.
2007-10-10 12:59:06 -05:00
Andrew Tridgell
4103392a59 r2572: fixed two places where status is not initialised in the nbench backend 2007-10-10 12:59:06 -05:00
Andrew Tridgell
8d455a6f09 r2562: got rid of the "reference" backend that never happened - the code is
too stale to be of any use as a reference.
2007-10-10 12:59:06 -05:00
Andrew Tridgell
f84c0af35c 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.
2007-10-10 12:59:06 -05:00
Tim Potter
3170f6ed84 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.
2007-10-10 12:59:06 -05:00
Tim Potter
e9eb231d64 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.
2007-10-10 12:59:06 -05:00
Andrew Tridgell
03c38477ad r2556: fixed the -s one bug that jelmer pointed out 2007-10-10 12:59:06 -05:00
Tim Potter
c9d6827312 r2555: Start of a rpcclient type program. 2007-10-10 12:59:05 -05:00
Andrew Tridgell
74d7bc1948 r2554: added a test for a bug that jelmer pointed out (handling of -s one) 2007-10-10 12:59:05 -05:00
Andrew Tridgell
9f230425a0 r2553: fixed ldbtest so it passes the ldap schema restrictions and thus can be used on the ldap backend 2007-10-10 12:59:05 -05:00
Andrew Bartlett
dfecb01506 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).
2007-10-10 12:59:05 -05:00
Andrew Bartlett
066789a479 r2551: Add const.
Andrew Bartlett
2007-10-10 12:59:05 -05:00
Andrew Bartlett
a132082249 r2550: survive our own BASE-NEGNOWAIT torture test.
Andrew Bartlett
2007-10-10 12:59:05 -05:00
Andrew Bartlett
4904d814c0 r2547: Another place to use convert_string_talloc().
Andrew Bartlett
2007-10-10 12:59:05 -05:00
Andrew Bartlett
5c5b45c1a8 r2546: Remove another strupper_m() that we don't need.
Andrew Bartlett
2007-10-10 12:59:04 -05:00
Andrew Bartlett
5eaa4c9748 r2545: str_charnum -> strlen_m.
These two functions do exactly the same thing, I'll be removing
str_charnum shortly.

Andrew Bartlett
2007-10-10 12:59:04 -05:00
Andrew Bartlett
2e197f05ff r2544: (missed from the last commit)
smb_conn->socket has gone away, and the packet count is now in the
main structure.

Andrew Bartlett
2007-10-10 12:59:04 -05:00
Andrew Bartlett
d483d88674 r2543: Catch one more use of sub_get_remote_machine().
Andrew Bartlett
2007-10-10 12:59:04 -05:00
Andrew Bartlett
d8fd19a202 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
2007-10-10 12:59:04 -05:00
Andrew Bartlett
cd2f97530b r2541: Add a TODO: This is one place we can grab the remote netbios name.
Andrew Bartlett
2007-10-10 12:59:04 -05:00
Jelmer Vernooij
0fb0530389 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.
2007-10-10 12:59:04 -05:00
Andrew Bartlett
f3bf57ca6b r2537: Add static and use strlen_m instead of str_charnum().
Andrew Bartlett
2007-10-10 12:59:04 -05:00
Andrew Bartlett
79776006b3 r2536: This is a classic case for the use of our new talloc code, and
convert_string_talloc().

Andrew Bartlett
2007-10-10 12:59:03 -05:00
Andrew Bartlett
0e081ecb9d 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
2007-10-10 12:59:03 -05:00