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

2042 Commits

Author SHA1 Message Date
Jeremy Allison
d4307679b9 Change all occurrences of zero_addr(&ss,AF_INET) to
zero_addr(&ss). All current uses were always of the
AF_INET form, so simplify the call. If in the future
we need to zero an addr to AF_INET6 this can be
done separately.
Jeremy.
(This used to be commit 2e92418a13)
2007-10-27 20:29:36 -07:00
Jeremy Allison
73eefd6b72 Fix popt bool problems (need POPT_ARG_NONE, not POPT_ARG_VALUE).
Reported by kukks - thanks !
Jeremy.
(This used to be commit 9993f8d1af)
2007-10-26 16:22:18 -07:00
Jeremy Allison
7cbfaa31d8 Fix a few more sockaddr -> sockaddr_storgage.
Jeremy.
(This used to be commit 4b3635d6bc)
2007-10-26 16:02:16 -07:00
Stefan Metzmacher
cd648750e0 one more struct in_addr => struct sockaddr_storage
jra: please check this...

metze
(This used to be commit cecc807551)
2007-10-26 16:37:32 +02:00
Jeremy Allison
42f9694139 Fixed missing in_addr -> sockaddr_storage conversion (how did
I miss this...).
Jeremy.
(This used to be commit f982774c8d)
2007-10-25 18:11:29 -07:00
Jeremy Allison
f88b7a076b 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.
(This used to be commit 98e154c312)
2007-10-24 14:16:54 -07:00
Volker Lendecke
d1db41c059 Don't segfault if locking.tdb can't be opened
Thanks to Steve Langasek <vorlon@debian.org>
(This used to be commit 67328bd27b)
2007-10-21 19:26:26 +02:00
Jeremy Allison
9a85533914 Fix the popt / bool issues. Some places we used BOOL
where we meant int. Fix this. Thanks to metze for
pointing this out.
Jeremy.
(This used to be commit 793a9d24a1)
2007-10-19 11:38:36 -07:00
Jeremy Allison
30191d1a57 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.
(This used to be commit f35a266b3c)
2007-10-18 17:40:25 -07:00
Karolin Seeger
4d910553dc Add net rap file user
(This used to be commit 2972c97e5e)
2007-10-18 13:12:58 +02:00
Alexander Bokovoy
d76717fe15 Correctly free memory in regfio paths
(This used to be commit 97f9a90b82)
2007-10-15 17:41:09 -05:00
Günther Deschner
862a7e6cb1 Fix the build WITH_DNS_UPDATES.
Jeremy, please have a look.

Guenther
(This used to be commit 4dfda879a3)
2007-10-12 11:37:03 +02:00
Jeremy Allison
8e54530b52 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.
(This used to be commit 3f6bd0e1ec)
2007-10-10 18:25:16 -07:00
Gerald (Jerry) Carter
e5a951325a [GLUE] Rsync SAMBA_3_2_0 SVN r25598 in order to create the v3-2-test branch.
(This used to be commit 5c6c8e1fe9)
2007-10-10 15:34:30 -05:00
Günther Deschner
5de28a07cc r25592: Allow to set sec_info for registry security descriptor queries.
Guenther
(This used to be commit 09e10d1d29)
2007-10-10 12:31:16 -05:00
Günther Deschner
ffd91e763e r25526: Fix usage output.
Guenther
(This used to be commit 31a0bf7b8c)
2007-10-10 12:31:12 -05:00
Günther Deschner
70001d3106 r25525: Add "net rpc registry getsd <keyname>" to display security descriptors.
Guenther
(This used to be commit 550ae11ad1)
2007-10-10 12:31:11 -05:00
Volker Lendecke
e3d07ff9fe r25499: Fix rpc_file_list_internals
(This used to be commit da5736f210)
2007-10-10 12:31:10 -05:00
Volker Lendecke
4a952fb0c0 r25481: Fix some typos, don't panic as non-root on net getdomainsid
Thanks to Karolin Seeger <ks@sernet.de>
(This used to be commit 5ae4b27398)
2007-10-10 12:31:07 -05:00
Jeremy Allison
3fbd1ae54c r25472: Fix the interfaces code to detect IPv6 interfaces, using the
new standard getifaddrs() and freeifaddrs() interfaces. Currently
we only return IPv4 af_families. Needs fixing for binds to IPv6
but this has to be careful work.
Jeremy.
(This used to be commit 327875182c)
2007-10-10 12:31:06 -05:00
Gerald Carter
5221ebb299 r25407: Revert Longhorn join patch as it is not correct for the 3.2 tree.
The translate_name() used by cli_session_setup_spnego() cann rely
Winbindd since it is needed by the join process (and hence before
Winbind can be run).
(This used to be commit 00a93ed336)
2007-10-10 12:31:03 -05:00
Gerald Carter
754cfb427b r25402: BUG 4997 (3.2 only): Fix enumration level for smbtree
(This used to be commit f387e0f256)
2007-10-10 12:31:02 -05:00
Gerald Carter
3529156971 r25400: Windows 2008 (Longhorn) Interop fixes for AD specific auth2 flags,
and client fixes.  Patch from Todd Stetcher <todd.stetcher@isilon.com>.
(This used to be commit 8304ccba73)
2007-10-10 12:31:02 -05:00
Günther Deschner
c32358d001 r25314: Add HKEY_CURRENT_USER to reg_hive_key().
Guenther
(This used to be commit 693b3c26c0)
2007-10-10 12:30:58 -05:00
Michael Adam
c97fe37ea3 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
(This used to be commit 9a28be220d)
2007-10-10 12:30:58 -05:00
Stefan Metzmacher
7649b460d2 r25239: fix cut-n-paste bug in code with LIBUNWIND support
metze
(This used to be commit ff94d05576)
2007-10-10 12:30:53 -05:00
Michael Adam
34af42e87e r25201: Fight those red bars...
(This used to be commit cc4599fdc1)
2007-10-10 12:30:51 -05:00
Michael Adam
75f82d454f r25200: Fix a debug message.
(This used to be commit f1f4758e2c)
2007-10-10 12:30:51 -05:00
Michael Adam
4dc265d6a0 r25198: Change net_rpc_join_ok() to return NTSTATUS for better
error propagation.

Michael
(This used to be commit 5a16da2185)
2007-10-10 12:30:50 -05:00
Michael Adam
1130482add r25197: Change net_make_ipc_connection() and net_make_ipc_connection_ex() to
return NTSTATUS to allow for better error propagation.

Michael
(This used to be commit 46093004a7)
2007-10-10 12:30:50 -05:00
Stefan Metzmacher
28d076d20f r25143: rename public functions from winbind_client.h
init_request	=> winbindd_init_request
free_response	=> winbindd_free_response
read_reply	=> winbindd_read_reply

write_sock	=> winbind_write_sock
read_sock	=> winbind_read_sock
close_sock	=> winbind_close_sock(void)

metze
(This used to be commit 8a95d7a7ed)
2007-10-10 12:30:45 -05:00
Volker Lendecke
4ee8b2937d r25055: Add file_id_string_tos
This removes file_id_string_static and file_id_string_static2
(This used to be commit 638c848c9a)
2007-10-10 12:30:36 -05:00
Volker Lendecke
54d3c7f61d r25040: Add "net sam rights"
Not strictly in the SAM, but close enough. This command acts directly on
the local tdb, no running smbd required

This also changes the root-only check to a warning
(This used to be commit 0c5657b5ef)
2007-10-10 12:30:36 -05:00
Jeremy Allison
fc213876d5 r25019: Fix coverity bug #105, run #332. Use of uninitialized variable.
Jeremy.
(This used to be commit a58de8cee5)
2007-10-10 12:30:34 -05:00
Volker Lendecke
6de1b0b65b r24951: Warn if "os level" > 255
Thanks to Karolin Seeger <ks@sernet.de>
(This used to be commit 3abf06efc1)
2007-10-10 12:30:29 -05:00
Volker Lendecke
faefb22c61 r24943: Some stackframes
(This used to be commit cddb9f11d5)
2007-10-10 12:30:29 -05:00
Rafal Szczesniak
00737da4f4 r24853: Rename function as Jerry asked.
s/net_use_upn_machine_account/net_use_krb_machine_account/

rafal
(This used to be commit 86af9fedad)
2007-10-10 12:30:28 -05:00
Michael Adam
d4603ed339 r24845: Fix a segfault in smbcontrol when called with parameters but no extra args.
Michael
(This used to be commit f1bbf9bc18)
2007-10-10 12:30:27 -05:00
Michael Adam
ac3f2e784f r24843: Add a "validate-cache" control message to winbindd.
So there is a new subcommand "smbcontrol winbindd validate-cache" now.

This change provides the infrastructure:
The function currently returns "true" unconditionally.
The call of a real cache validation function will be incorporated
in subsequent changes.

Michael
(This used to be commit ef92d505c0)
2007-10-10 12:30:27 -05:00
Michael Adam
464227599e r24828: Give smbcontrol an initial talloc stackframe.
(This used to be commit 55020b07b5)
2007-10-10 12:30:25 -05:00
Michael Adam
018f72aa9c r24827: Give smbstatus an initial talloc stackframe.
Rewrite main() so as to exit only at a single point
where the stack frame is freed, too.

Michael
(This used to be commit dbe38995ec)
2007-10-10 12:30:25 -05:00
Michael Adam
fe6c338463 r24825: Give testparm an initial talloc stackframe, so it does not complain
it is leaking.
(This used to be commit 705336ee10)
2007-10-10 12:30:25 -05:00
Michael Adam
d051dce7b2 r24824: Create an initial talloc stackframe for the net binary.
(This used to be commit c97600b96f)
2007-10-10 12:30:25 -05:00
Volker Lendecke
929e1d9920 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
(This used to be commit 6585ea2cb7)
2007-10-10 12:30:24 -05:00
Rafal Szczesniak
48853f0bad r24789: Add implementation of machine-authenticated connection to netlogon
pipe used when connecting to win2k and newer domain controllers. The
server may be configured to deny anonymous netlogon connections which
would stop domain join verification step. Still, winnt domains require
such smb sessions not to be authenticated using machine credentials.
Creds employed in smb session cannot have a username in upn form, so
provide the separate function to use machine account.

rafal
(This used to be commit 30d99d8ac3)
2007-10-10 12:30:21 -05:00
Günther Deschner
6824731cb0 r24783: Remove unused off_t type.
Guenther
(This used to be commit 85c816c27f)
2007-10-10 12:30:21 -05:00
Rafal Szczesniak
a0a32cf5d5 r24771: Use infolevel 25 to set the machine account's password (just like winxp).
This correctly updates pwdLastSet field on win2k3 server.

rafal
(This used to be commit dd6d44c166)
2007-10-10 12:30:19 -05:00
Günther Deschner
84bce05e71 r24742: Add experimental DsGetDcName() call (will be used by krb5 locator for fine
grained KDC DNS queries).

Guenther
(This used to be commit 3263cd680f)
2007-10-10 12:30:16 -05:00
Michael Adam
46f199961f r24637: In order for "net rpc registry" to be able to write to
Samba's own registry, the access mask for opening the
registry for the write operations needs to be
SEC_RIGHTS_MAXIMUM_ALLOWED instead of REG_WRITE: we can
not open e.g. HKLM read write explicitly, since we can
not write to this virtual part of the registry, only
to the subkeys like 'HKLM\Software\Samba\smbconf' that
are stored on disk.

Note that MAXIMUM_ALLOWED is also what windows' regedit
passed to the open calls.

Michael
(This used to be commit 57c30f7319)
2007-10-10 12:30:12 -05:00
Michael Adam
c56874d112 r24527: Add a function lp_canonicalize_parameter_with_value that turns
a parameter and value into the canonical paramter with the value
inverted if it was in invers boolean synonym.

Make net conf use this function when storing parameters.

Michael
(This used to be commit 3b762ab183)
2007-10-10 12:29:54 -05:00