1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-20 14:03:59 +03:00

1963 Commits

Author SHA1 Message Date
Volker Lendecke
f5468d2c9a pstring removal 2007-11-05 03:16:48 +01:00
Jeremy Allison
963fc76852 Remove most of the remaining globals out of lib/util_sock.c.
I have a plan for dealing with the remaining..... Watch
this space.
Jeremy.
2007-11-03 23:20:10 -07:00
Jeremy Allison
95d01279a5 I can't get away without a 'length' arg. :-).
Jeremy.
2007-11-03 18:41:26 -07:00
Jeremy Allison
e848506c85 Stop get_peer_addr() and client_addr() from using global
statics. Part of my library cleanups.
Jeremy.
2007-11-03 18:15:45 -07:00
Gerald (Jerry) Carter
d6cdbfd875 Patch 2 of 3 from Debian Samba packagers:
The point is doing the following associations:

- non discardable state data (all TDB files that may need to be backed
  up) go to statedir
- shared data (codepage stuff) go to codepagedir

The patch *does not change* the default location for these
directories. So, there is no behaviour change when applying it.

The main change is for samba developers who have to think when dealing
with files that previously pertained to libdir whether they:
- go in statedir
- go in codepagedir
- stay in libdir
2007-11-01 15:53:44 -04:00
Jeremy Allison
98e154c312 This is a large patch (sorry). Migrate from struct in_addr
to struct sockaddr_storage in most places that matter (ie.
not the nmbd and NetBIOS lookups). This passes make test
on an IPv4 box, but I'll have to do more work/testing on
IPv6 enabled boxes. This should now give us a framework
for testing and finishing the IPv6 migration. It's at
the state where someone with a working IPv6 setup should
(theorecically) be able to type :
smbclient //ipv6-address/share
and have it work.
Jeremy.
2007-10-24 14:16:54 -07:00
Michael Adam
aae3d04e30 Streamline logic, reducing the amount of indentation.
Michael
2007-10-19 15:54:23 -05:00
Jeremy Allison
f35a266b3c RIP BOOL. Convert BOOL -> bool. I found a few interesting
bugs in various places whilst doing this (places that assumed
BOOL == int). I also need to fix the Samba4 pidl generation
(next checkin).
Jeremy.
2007-10-18 17:40:25 -07:00
Volker Lendecke
b474600973 r16050: Set the session key "SystemLibraryDTC" on ntlmssp binds. We only do INTEGRITY
and PRIVACY, so no other cases to take care of so far...

Andrew B., if you have time, could you take a look? This makes us survive the
RPC-SAMBA3SESSIONKEY test.

Volker
(cherry picked from commit 25cc1e7ff15675b70001d1cb8d8584880650dd2e)
2007-10-18 09:25:09 +02:00
Volker Lendecke
15935bad1d r17064: lsa_GetUserName needs to return the name for S-1-5-7 on an anonymous login.
Found that because I want to play around with setsharesecurity, for this I
need the "whoami" call figuring out the SID of the currently connected user.

Not activating this test yet until the build farm has picked up the new samba4
revision.

Volker
(cherry picked from commit 5cfe482841b77208b68376f9e2b8a4a62271f7c9)
2007-10-17 13:38:44 +02:00
Jeremy Allison
3f6bd0e1ec Add start of IPv6 implementation. Currently most of this is avoiding
IPv6 in winbindd, but moves most of the socket functions that were
wrongly in lib/util.c into lib/util_sock.c and provides generic
IPv4/6 independent versions of most things. Still lots of work
to do, but now I can see how I'll fix the access check code.
Nasty part that remains is the name resolution code which is
used to returning arrays of in_addr structs.
Jeremy.
2007-10-10 18:25:16 -07:00
Gerald (Jerry) Carter
5c6c8e1fe9 [GLUE] Rsync SAMBA_3_2_0 SVN r25598 in order to create the v3-2-test branch. 2007-10-10 15:34:30 -05:00
Volker Lendecke
d100bfffe2 r25564: Pass sharename to delete_share_security() 2007-10-10 12:31:13 -05:00
Volker Lendecke
0141e64ad4 r25534: Apply some const
Why? It moves these structs from the data into the text segment, so they
will never been copy-on-write copied. Not much, but as in German you say
"Kleinvieh macht auch Mist...."
2007-10-10 12:31:12 -05:00
Volker Lendecke
9e1f513916 r25484: Fix srvsrc_NetFileEnum listing only for one user 2007-10-10 12:31:08 -05:00
Volker Lendecke
3acc00132c r25482: Slightly simplify logic
Instead of one big if-branch for if (process_exists(..)) return if
(!process_exists(..))
2007-10-10 12:31:07 -05:00
Volker Lendecke
7e72a3046d r25480: Fix a segfault 2007-10-10 12:31:07 -05:00
Jeremy Allison
993bd0995e r25389: Fix crash bug using DFS info struct uninitialized.
Jeremy.
2007-10-10 12:31:01 -05:00
Michael Adam
9a28be220d r25294: Tidy up callers of unistr2_to_ascii() to pass sizeof(target_area) to
the maxeln parameter instead of sizeof(target_area) - 1 (or even
sizeof(fstring) - 1 in some places.

I hope these were really all there were.

Michael
2007-10-10 12:30:58 -05:00
Jeremy Allison
39c211a702 r25138: More pstring elimination. Add a TALLOC_CTX parameter
to unix_convert().
Jeremy.
2007-10-10 12:30:44 -05:00
Jeremy Allison
0e655ac946 r25119: Fix a couple of warnings.
Jeremy.
2007-10-10 12:30:42 -05:00
Jeremy Allison
7632f8fb40 r25118: More pstring elimination.
Jeremy.
2007-10-10 12:30:41 -05:00
Jeremy Allison
cf6b6f9c3a r25102: Rewrite msdfs code to use talloced filenames. Passes make test
and make valgrindtest. Final step will be to change srvstr_get_path()
to return talloced memory in the major codepaths.
Jeremy.
2007-10-10 12:30:40 -05:00
Jeremy Allison
5ba12eefbe r25023: Coverity #455. Not actually a bug, but this clarifies
the code a lot.
Jeremy.
2007-10-10 12:30:35 -05:00
Jeremy Allison
dee8beba7a r25009: Large patch discussed with Volker. Move unix_convert to a talloc-based
interface. More development will come on top of this. Remove the
"mangled map" parameter.
Jeremy.
2007-10-10 12:30:32 -05:00
Volker Lendecke
6585ea2cb7 r24809: Consolidate the use of temporary talloc contexts.
This adds the two functions talloc_stackframe() and talloc_tos().

 * When a new talloc stackframe is allocated with talloc_stackframe(), then
 * the TALLOC_CTX returned with talloc_tos() is reset to that new
 * frame. Whenever that stack frame is TALLOC_FREE()'ed, then the reverse
 * happens: The previous talloc_tos() is restored.
 *
 * This API is designed to be robust in the sense that if someone forgets to
 * TALLOC_FREE() a stackframe, then the next outer one correctly cleans up and
 * resets the talloc_tos().

The original motivation for this patch was to get rid of the
sid_string_static & friends buffers. Explicitly passing talloc context
everywhere clutters code too much for my taste, so an implicit
talloc_tos() is introduced here. Many of these static buffers are
replaced by a single static pointer.

The intended use would thus be that low-level functions can rather
freely push stuff to talloc_tos, the upper layers clean up by freeing
the stackframe. The more of these stackframes are used and correctly
freed the more exact the memory cleanup happens.

This patch removes the main_loop_talloc_ctx, tmp_talloc_ctx and
lp_talloc_ctx (did I forget any?)

So, never do a

tmp_ctx = talloc_init("foo");

anymore, instead, use

tmp_ctx = talloc_stackframe()

:-)

Volker
2007-10-10 12:30:24 -05:00
Stefan Metzmacher
8f07b8ab65 r24561: merge from SAMBA_4_0:
rename some DCERPC_ prefixes into NDR_

metze
2007-10-10 12:30:03 -05:00
Volker Lendecke
db1b89072c r24316: Fix an uninitialized read
Jerry, please check this!

Thanks,

Volker
2007-10-10 12:29:27 -05:00
Volker Lendecke
59b4914df3 r24165: Fix Coverity ID 369.
This was not really a bug I think, but this change cleans up the code a
bit.
2007-10-10 12:29:17 -05:00
Volker Lendecke
eb353412c6 r24106: Pass fnum instead of buf/offset into get_rpc_pipe_p 2007-10-10 12:29:07 -05:00
Volker Lendecke
804be77e46 r23991: Some const 2007-10-10 12:28:53 -05:00
Andrew Tridgell
87c91e4362 r23801: The FSF has moved around a lot. This fixes their Mass Ave address. 2007-10-10 12:28:27 -05:00
Andrew Tridgell
b0132e94fc r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text 2007-10-10 12:28:22 -05:00
Jeremy Allison
407e6e695b r23779: Change from v2 or later to v3 or later.
Jeremy.
2007-10-10 12:28:20 -05:00
Volker Lendecke
4d9f627cc8 r23758: Fix Coverity id 385 2007-10-10 12:23:53 -05:00
Volker Lendecke
ca988f4e79 r23724: Reduce access to the global inbuf a tiny bit. Add a struct smb_request
that contains some of the fields from the SMB header, removing the need
to access inbuf directly. This right now is used only in the open file
code & friends, and creating that header is only done when needed. This
needs more work, but it is a start.

Jeremy, I'm only checking this into 3_0, please review before I merge it
to _26.

Volker
2007-10-10 12:23:48 -05:00
Volker Lendecke
2d5e3322d6 r23709: C++ warnings 2007-10-10 12:23:47 -05:00
Volker Lendecke
d4256ae558 r23661: Another static pstring 2007-10-10 12:23:43 -05:00
Gerald Carter
21dc46a2ba r23633: Fix a couple of crash bugs pointed out by Volker caused by an old
change from a pstring to a char* and still trying use pstrcpy().
2007-10-10 12:23:39 -05:00
Günther Deschner
bffe33dd26 r23623: Fix rpcclient and rpc_server with new DFS idl.
Guenther
2007-10-10 12:23:37 -05:00
Jeremy Allison
fc6899a550 r23620: Convert set_nt_acl to return NTSTATUS. Also fix the chown
return to correctly return NT_STATUS_INVALID_OWNER if it
should be disallowed. Matches better what W2K3R3 does.

NFSv4 ACL module owners, please examine these changes.

Jeremy.
2007-10-10 12:23:37 -05:00
Jim McDonough
afabd68b6a r23616: Fix bugzilla #4719: must change password is not set from usrmgr.exe.
This was only affecting the newer versions of usrmgr.exe, because they
use a user_info_25 struct.  The password is getting set separately
inside that code, so the password last set time was getting set from the
password change logic.

We also were not parsing a number of fields (like logon hours) from the
user_info_25.  That should also be fixed.
2007-10-10 12:23:36 -05:00
Jeremy Allison
ae239fec6f r23591: Fix bug #4725. Don't crash when no eventlogs specified. Needs
merging for 3.0.25b.
Jeremy.
2007-10-10 12:23:33 -05:00
James Peach
171dc060e2 r23510: Tidy calls to smb_panic by removing trailing newlines. Print the
failed expression in SMB_ASSERT.
2007-10-10 12:23:23 -05:00
Michael Adam
c9f38fa30e r23434: Coorect a comment. 2007-10-10 12:23:16 -05:00
Michael Adam
b8269f4543 r23433: remove superfluous semicolon. 2007-10-10 12:23:16 -05:00
Michael Adam
4025cbc202 r23432: Remove superfluous comment.
(A relict from regkey_open_internal days.)

Michael
2007-10-10 12:23:16 -05:00
Jeremy Allison
02fd434902 r23402: Got bitten by a talloc hierarchy. Make sure we alloc
off the pipe ctx now ->names is part of the containing
struct.
Jeremy.
2007-10-10 12:23:13 -05:00
Jeremy Allison
9300b92f7a r23400: Fix lsa crash bug #4683. The "names" enum struct
in a lookup_sidX reply isn't optional - like the
lookup_sidX query it needs to be defined in the
struct.
All this will go away with PIDL (thank goodness....).
Jerry - I think this is a showstopper to be merged
for 3.0.25b.
I'll be watching the build farm to see if anything broke.
Jeremy.
2007-10-10 12:23:13 -05:00
Gerald Carter
ebcae48ec1 r23274: merge CloseEventlog() pidl conversion from 3.0.26 && fix a few init call renames for svcctl in the previous commit 2007-10-10 12:23:02 -05:00