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

2289 Commits

Author SHA1 Message Date
Jeremy Allison
1b92ea5559 Remove pstrings from client/client.c by doing a large rewrite.
Mostly compiles....
Jeremy.
(This used to be commit c87f3eba9a)
2007-12-06 17:16:33 -08:00
Karolin Seeger
bf80f40ca4 Make output of net getdomainsid more meaningful. Unify spelling of SID. Display usage if superfluous arguments are given.
Karolin
(This used to be commit cb3a2dfeb0)
2007-12-06 16:34:36 +01:00
Volker Lendecke
78c6ee0090 Remove some globals
(This used to be commit 31d0a846db)
2007-12-05 14:39:07 +01:00
Jeremy Allison
de7fd585b1 The usual !pstring...
Jeremy.
(This used to be commit b676262a78)
2007-12-04 16:56:18 -08:00
Jeremy Allison
e262c41c61 More pstring elimination.
Jeremy.
(This used to be commit c1f70793d6)
2007-12-04 16:35:24 -08:00
Jeremy Allison
3c219ce238 Remove pstrings.
Jeremy.
(This used to be commit e3c02796f8)
2007-12-04 15:45:20 -08:00
Jeremy Allison
5ea101f048 Allow STR_TERMINATE and -1 src_len for pull_ucs2_base_talloc().
Jeremy.
(This used to be commit 063358d87a)
2007-12-04 15:21:14 -08:00
Jeremy Allison
e883c7040b Remove pstr_sprintf. Replace with snprintf.
Jeremy.
(This used to be commit bc9aa72223)
2007-12-04 14:31:57 -08:00
Jeremy Allison
bb9b754605 Back to pstring removal.
Jeremy.
(This used to be commit 95842ae4e1)
2007-12-04 14:02:25 -08:00
Jeremy Allison
3ab73eab49 Gone from usershare.
Jeremy.
(This used to be commit f1555f4f0d)
2007-12-03 19:19:19 -08:00
Jeremy Allison
adf6d848de Getting to the home stretch for elimination of pstrings...
Jeremy.
(This used to be commit 0411635511)
2007-12-03 18:48:41 -08:00
Jeremy Allison
fe1a12b22f Remove pstring from clirap2 by completely rewriting the damn
thing :-). Now with added paranoia.
Jeremy.
(This used to be commit b6b5f92bc9)
2007-12-03 14:09:48 -08:00
Günther Deschner
6f1b4eb869 Fix shutdown callers.
Guenther
(This used to be commit de2fdc6b5a)
2007-12-03 18:43:19 +01:00
Günther Deschner
9ab0038348 Fix svcctl callers.
Guenther
(This used to be commit 91bf2ac1af)
2007-12-03 18:43:19 +01:00
Günther Deschner
82089a2e84 Fix winreg callers.
Guenther
(This used to be commit 677d9e6d86)
2007-12-03 18:43:19 +01:00
Günther Deschner
e9e182feda Actually implement reboot feature for net dom join/unjoin.
Guenther
(This used to be commit bbbeeba163)
2007-12-03 11:17:57 +01:00
Volker Lendecke
107c1f854d Reformatting
(This used to be commit 28c0a77ec1)
2007-12-03 10:53:29 +01:00
Günther Deschner
a43e3f98ad Add "net dom" command suite to "net".
Guenther
(This used to be commit a41f9aef84)
2007-11-30 22:25:01 +01:00
Günther Deschner
c88263ab9e Add "net dom unjoin" code.
Guenther
(This used to be commit 58d49023b9)
2007-11-30 22:25:01 +01:00
Günther Deschner
4b60045066 Add "net dom join" code.
Guenther
(This used to be commit 177dab0ce3)
2007-11-30 22:25:01 +01:00
Günther Deschner
4b9f336a62 Move param helper routines to one place.
Guenther
(This used to be commit 6bf2c8038c)
2007-11-30 22:25:01 +01:00
Jeremy Allison
f692694b99 Remove PSTRING_LEN from smbd/ nmbd/.
Remove pstring from libsmb/clidfs.c except for a nasty
hack (that will be removed when pstrings are gone from
client/).
Jeremy.
(This used to be commit cc257b71d1)
2007-11-29 17:25:41 -08:00
Jeremy Allison
d2cf97aeba Remove the explicit TALLOC_CTX * from cli_struct.
Make us very explicit about how long a talloc ctx
should last.
Jeremy.
(This used to be commit ba9e2be2b5)
2007-11-29 13:24:54 -08:00
Michael Adam
25a6a677df Allow calling "net rpc join" and "net rpc trustdom" without specifying server IP.
This was a logic bug (typo) in a call to get_pdc_ip() in net_find_server().

Michael
(This used to be commit 988c5ff3f4)
2007-11-29 15:16:45 +01:00
Jeremy Allison
6b6655edd9 Remove pstrings from everything except srv_spoolss_nt.c.
Jeremy.
(This used to be commit 0002a9e96b)
2007-11-27 14:35:30 -08:00
Volker Lendecke
1011b32678 Remove some statics
(This used to be commit 1fab16ffb8)
2007-11-27 14:18:47 +01:00
Volker Lendecke
5c6f961447 Remove a static
(This used to be commit 85a84f72ff)
2007-11-24 18:11:11 -08:00
Volker Lendecke
d2c2635a28 Make remote_password_change return malloced error strings
This fixes a segfault in smbpasswd -r
(This used to be commit 49949f0b85)
2007-11-23 13:04:50 -08:00
Volker Lendecke
450ca80b57 add talloc_stackframe() to eventlogadm
Thanks to Günther Kukkukk for noticing
(This used to be commit 9751cc222c)
2007-11-23 14:39:21 +01:00
Jeremy Allison
7ef6c19074 Remove pstrings from pam_smbpass - make local_password_change
return malloced strings.
Jeremy.
(This used to be commit f652fe2bdb)
2007-11-21 17:42:52 -08:00
Jeremy Allison
90b8a7c8fe Add talloc stackframe for ntlm_auth.c
Jeremy.
(This used to be commit 6f9c2910bd)
2007-11-20 19:17:47 -08:00
Karolin Seeger
551f9e7a6c Add error message to net rap file and net rap file user
(This used to be commit 759d6bcbec)
2007-11-19 16:42:27 +01:00
Jeremy Allison
acb829ecc3 Add MAX_DNS_NAME_LENGTH, remove more pstrings.
Jeremy.
(This used to be commit a1725f4ff7)
2007-11-15 18:27:26 -08:00
Jeremy Allison
68be9a8200 More pstring removal. This one was tricky. I had to add
one horror (pstring_clean_name()) which will have to
remain until I've removed all pstrings from the client code.
Jeremy.
(This used to be commit 1ea3ac8014)
2007-11-15 14:19:52 -08:00
Jeremy Allison
7a3ece4145 Remove pstring from param/
This was a little tricky..... I'll watch the
build farm.
Jeremy.
(This used to be commit d6e2519c67)
2007-11-13 18:42:42 -08:00
Stefan Metzmacher
f9578af966 ndr: change NTSTAUS into enum ndr_err_code (samba3 callers)
lib/messages_local.c
rpc_client/ndr.c
smbd/notify_internal.c
utils/net_rpc_registry.c

metze
(This used to be commit c2645d2164)
2007-11-09 21:23:16 +01:00
Volker Lendecke
1a11cdf3f2 Sanitize smbcacls slightly
(This used to be commit 9c57628dbd)
2007-11-09 15:21:58 +01:00
Volker Lendecke
62b97b0156 Make base64_encode_data_blob return a talloced string
(This used to be commit 5f205ab48d)
2007-11-09 15:12:30 +01:00
Jeremy Allison
d40e47db4b Remove more fstring/pstring bad useage. Go talloc !
Jeremy.
(This used to be commit 2a0173743d)
2007-11-08 17:25:45 -08:00
Jeremy Allison
85b48d792f Ensure we null out the address correctly.
Jeremy.
(This used to be commit e1fcd851ab)
2007-11-05 23:17:19 -08:00
Michael Adam
002060855f Fix another segfault and make smbfilter run again.
This fix is not complete yet (loop after "client closed connection")
but at least it starts again...

Micheal
(This used to be commit e2ffc6053d)
2007-11-06 01:10:05 +01:00
Michael Adam
251d755e90 Fix a segfault.
Michael
(This used to be commit 98225a0752)
2007-11-06 01:10:04 +01:00
Michael Adam
ea7bfdde72 Try to fix the build. There was one forgotten caller
of receive_smb. Jeremy: please check!

Michael
(This used to be commit 1f0fcc3e4e)
2007-11-06 01:10:04 +01:00
Günther Deschner
fc22f295d0 Make sure we can read SACLs from the registry.
Guenther
(This used to be commit 62d4cce456)
2007-11-05 03:26:01 +01:00
Jeremy Allison
51a0354d75 Remove more static data from lib/util_sock.c and
callers.
Jeremy.
(This used to be commit 35aaa36f82)
2007-11-03 22:34:46 -07:00
Jeremy Allison
b04312b75d Forgot one more getnameinfo.
Jeremy.
(This used to be commit 619e33248d)
2007-11-02 12:05:17 -07:00
Jeremy Allison
e075b3692b Fix Solaris by ensuring we use the IPv4 or IPv6 length
in any getnameinfo calls.
Jeremy
(This used to be commit 4d7badb0c4)
2007-11-02 10:25:34 -07:00
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
Michael Adam
8b0b1408a0 r24513: Reformatting: eliminate trailing spaces, overly long lines
and adjust some formattings to standard.

Michael
(This used to be commit 00432bcd69)
2007-10-10 12:29:53 -05:00
Michael Adam
53f5c4adfb r24496: Add initial synonym handling to "net conf":
When storing parameters in the smbconf portion of the registry,
up to now, synonyms could be misused to store a parameter twice.
Now this is prevented by canonicalizing the paramter name first.

Also, the value for a boolean parameter checked for validity
before storing the bool in registry.

(The canonicalization should finally go into the registry smbconf
code to also prevent e.g. "regedit" or "net rpc registry" from
storing synonyms. - This is in the making.)

Michael
(This used to be commit 95447dde86)
2007-10-10 12:29:52 -05:00
Günther Deschner
201f0e1ce4 r24432: Expand kerberos_return_pac() so that it can be used in winbindd.
Guenther
(This used to be commit e70bf0ecc3)
2007-10-10 12:29:46 -05:00
Günther Deschner
444fd1e848 r24413: Minor edits for libgpo.
Guenther
(This used to be commit 5dc791f4cf)
2007-10-10 12:29:42 -05:00
Stefan Metzmacher
82e80e023b r24125: use TALLOC_FREE()
metze
(This used to be commit 4c21ebae95)
2007-10-10 12:29:09 -05:00
Stefan Metzmacher
39ddd0a520 r24115: try to get the file name and share patch for printing
brlocks from the share_mode db, as the same fileid
is used.

metze
(This used to be commit 8cccf470cb)
2007-10-10 12:29:08 -05:00
Volker Lendecke
a81c8b2a28 r24107: Fix bug 4849. Thanks to Matthijs Kooijman <matthijs@stdin.nl>
(This used to be commit 6e6eea64a5)
2007-10-10 12:29:07 -05:00
Volker Lendecke
6e419551ae r24057: Fix some uninitialized variables found by the IBM checker
(This used to be commit d74bbc53c2)
2007-10-10 12:29:00 -05:00
Volker Lendecke
5e066d5ee1 r24047: With -Wmissing-prototypes these two always generate warnings. They
should be properly prototyped. For now, gloss over the warning.
(This used to be commit 2137158260)
2007-10-10 12:28:59 -05:00
Volker Lendecke
602271632a r24044: Fix an uninitialized variable warning
(This used to be commit 69326a56e7)
2007-10-10 12:28:59 -05:00
Stefan Metzmacher
93c56c712c r24021: use MSG_BROADCAST_PID_STR as value for broadcast messages
to fix the cluster case

vl: please check, if this works with clustering = no

metze
(This used to be commit 9d4104b8d5)
2007-10-10 12:28:56 -05:00
Stefan Metzmacher
efddd9c753 r24019: merge from http://people.samba.org/bzr/metze/samba/3_2-ctdb-metze/:
use a timed event to make sure the timelimit is correctly
handled in smbcontrol when waiting for messages

metze
(This used to be commit 68c786dafa)
2007-10-10 12:28:56 -05:00
Volker Lendecke
16d13dcc74 r24005: Attempt to fix the build on host deckchair
(This used to be commit cdc8ca57a7)
2007-10-10 12:28:55 -05:00
Günther Deschner
2349acdd43 r23973: For debugging, add (undocumented) net ads kerberos commands (kinit, renew,
pac).

Guenther
(This used to be commit 4cada7c148)
2007-10-10 12:28:51 -05:00
Günther Deschner
7d3e5834ec r23968: Harmonize net's password prompts.
Guenther
(This used to be commit 7e2fb14d6e)
2007-10-10 12:28:50 -05:00
Stefan Metzmacher
fa07beaf80 r23954: merge from 3_0-ctdb-tridge:
don't display dead share mode entries in smbstatus

metze
(This used to be commit b52bb1e155)
2007-10-10 12:28:49 -05:00
Stefan Metzmacher
809c9d4d31 r23888: move elements belonging to the current ldap connection to a
substructure.

metze
(This used to be commit 00909194a6)
2007-10-10 12:28:38 -05:00
Günther Deschner
2e6b56061d r23874: Some more minor edits for net ads gpo.
Guenther
(This used to be commit cc41b3b60f)
2007-10-10 12:28:37 -05:00
Günther Deschner
c252b04abf r23834: Allow to pass an ADS_STRUCT pointer down to the dump function callback in
libads.

Guenther
(This used to be commit 311bbbafa6)
2007-10-10 12:28:32 -05:00
Andrew Tridgell
714209baaa r23804: here too
(This used to be commit e5d18768a0)
2007-10-10 12:28:28 -05:00
Andrew Tridgell
153cfb9c83 r23801: The FSF has moved around a lot. This fixes their Mass Ave address.
(This used to be commit 87c91e4362)
2007-10-10 12:28:27 -05:00
Andrew Tridgell
28b9d61076 r23800: LGPL is now called GNU Lesser General Public License
not GNU Library General Public License
(This used to be commit 727a6cf2cb)
2007-10-10 12:28:26 -05:00
Andrew Tridgell
fbfaaa9993 r23795: more v2->v3 conversion
(This used to be commit c14aba93c0)
2007-10-10 12:28:26 -05:00
Andrew Tridgell
5e54558c6d r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text
(This used to be commit b0132e94fc)
2007-10-10 12:28:22 -05:00
Simo Sorce
f622dc8d2f r23782: I tested this against NT4 PDC, W2K Server, W2K3 Dc, and a Win XP std alone
client and they all work with this code.
(This used to be commit 44e22581d7)
2007-10-10 12:28:21 -05:00
Jeremy Allison
d824b98f80 r23779: Change from v2 or later to v3 or later.
Jeremy.
(This used to be commit 407e6e695b)
2007-10-10 12:28:20 -05:00
Günther Deschner
221d06d6f3 r23772: Add ads_find_samaccount() helper function.
Guenther
(This used to be commit 6fafa64bea)
2007-10-10 12:23:55 -05:00
Günther Deschner
5512dacbca r23770: Some minor cleanups in libgpo
(including some valgrind errors, uninitialized vars, etc.)

Guenther
(This used to be commit 1a2878db2d)
2007-10-10 12:23:55 -05:00
Michael Adam
d4f1b08c93 r23760: Untangle use of strrchr_m and strequal and add some checks
for the validity of the given registry key name.

Michael
(This used to be commit 4b4ba7724e)
2007-10-10 12:23:53 -05:00
Volker Lendecke
161ebbc17a r23757: Fix Coverity id 386
(This used to be commit 91be38f7ab)
2007-10-10 12:23:53 -05:00
Michael Adam
a5946cb46a r23750: Change the behaviour of net conf import when there is a global section
in the current registry and there is no global section in the input
file (or only global options with default values):
In that case the existing global section is now not touched. Before, it
would have been deleted and recreated empty. The new behaviour is how
other shares are treated too.

Note that since the input file is parsed by lp_load, there is currently
no way to distinguish between a section with only default parameters
and a non-existing section in net conf import.

Michael

PS: A couple of trailing white-spaces have been eliminated
and a line was broken to be not longer than 80 chars, too.
(This used to be commit ec21a0cf9f)
2007-10-10 12:23:52 -05:00
Michael Adam
1bea19c127 r23749: Simplify prototype of reg_setvalue_internal:
eliminate "type" parameter since we store only REG_SZ.

Michael
(This used to be commit 65ce463317)
2007-10-10 12:23:52 -05:00
Michael Adam
cba898808e r23748: Clean use of talloc in import_process_service:
create a temporary talloc ctx for the function.

Michael
(This used to be commit 39df7faaa9)
2007-10-10 12:23:51 -05:00
Michael Adam
c2c96bccda r23747: Move formatting of a parameter's value into a value string
to a function of its own. (for storing it in registry),
Eliminate the valtype variable : store everything as "sz".
Eliminate some trailing white spaces on the way.

Michael
(This used to be commit 76f4f224aa)
2007-10-10 12:23:51 -05:00
Michael Adam
feff1fcfd8 r23746: Fix missing assignments to target string of asprintf in import function.
Michael
(This used to be commit 6b1bf7c1f4)
2007-10-10 12:23:51 -05:00
Michael Adam
f7b8a3782a r23745: Fix: Check whether top subkeyname instead of whole registry key name
is equal to GLOBAL_NAME.

Michael
(This used to be commit fdcdcacf0a)
2007-10-10 12:23:51 -05:00
Michael Adam
ea78cb941a r23744: Remove TODO-comment. lp_load returns False if opening
of the config file fails. That's enough of checking for
existence and readbility to my taste.

Michael
(This used to be commit 204f4f1a94)
2007-10-10 12:23:51 -05:00
Michael Adam
f26abd78b1 r23666: Rename lp_parameter_valid -> lp_parameter_is_valid.
Michael
(This used to be commit 7f85cff49d)
2007-10-10 12:23:44 -05:00
Michael Adam
e388130aa6 r23657: Prevent setting of a global option in a share definition
in "net conf setparm".

Michael
(This used to be commit bf92d56798)
2007-10-10 12:23:42 -05:00
Michael Adam
2073303664 r23656: Add initial checking of the validity of a paramter
given to "net conf setparm". Add a utility function
lp_parameter_valid() for this to loadparm.c.

Michael
(This used to be commit 639051e58d)
2007-10-10 12:23:42 -05:00
Michael Adam
96c4bf4a1c r23655: Fix a comment and adjust some code formatting.
Michael
(This used to be commit b294bc707c)
2007-10-10 12:23:42 -05:00
Michael Adam
3163aff376 r23652: Use the recursive delete function instead of the original one
when deleting a share. Just to be sure...

Michael
(This used to be commit 91770e153d)
2007-10-10 12:23:41 -05:00
Günther Deschner
a2618aa8d5 r23648: Allow to list a custom krb5 keytab file with:
net ads keytab list /path/to/krb5.keytab

Guenther
(This used to be commit a2befee3f2)
2007-10-10 12:23:41 -05:00
Günther Deschner
7eb828135b r23627: Allow to pass down the lookup-level to rpccli_lsa_lookup_names().
Guenther
(This used to be commit e9a7512a9f)
2007-10-10 12:23:38 -05:00
Volker Lendecke
5363779102 r23612: Revert 'net idmap dump' to the 3.0.24 behaviour.
(This used to be commit 56a32f217a)
2007-10-10 12:23:36 -05:00
Michael Adam
a12d9fb6b3 r23593: Mention "net conf" in top level net usage.
Michael
(This used to be commit ae7e3c9708)
2007-10-10 12:23:34 -05:00
Michael Adam
cc4f37f928 r23585: Add a "drop" function to "net conf" that clears the
whole configuration stored in registry.

Michael
(This used to be commit 6d8973762e)
2007-10-10 12:23:32 -05:00
Günther Deschner
36fc39d845 r23563: Add dump-event-list command to smbcontrol.
Guenther
(This used to be commit 0d956a8e45)
2007-10-10 12:23:29 -05:00
Jeremy Allison
ce02d0dfcb r23554: Fix bug #4711 by makeing cli_connect return an NTSTATUS.
Long overdue fix....
Jeremy.
(This used to be commit 073fdc5a58)
2007-10-10 12:23:28 -05:00
Michael Adam
3b9e5d0b4f r23549: Make "net conf setparm" always use registry data type "sz".
This simplifies the usage of this command from
"net conf setparm <section> <param> <type> <value>"
to
"net conf setparm <section> <param> <value>".

Micheal
(This used to be commit 41a8f8ec5f)
2007-10-10 12:23:27 -05:00
Michael Adam
ac1a7e2f96 r23543: Adjust comments.
(This used to be commit ec22c30581)
2007-10-10 12:23:27 -05:00
Michael Adam
6090601c8b r23485: This checkin consists mostly of refactorings in preparation of the
activation of global registry options in loadparm.c, mainly to
extract functionality from net_conf.c to be made availabel elsewhere
and to minimize linker dependencies.

In detail:

* move functions registry_push/pull_value from lib/util_reg.c to new file
  lib/util_reg_api.c

* create a fake user token consisting of builtin administrators sid and
  se_disk_operators privilege by hand instead of using get_root_nt_token()
  to minimize linker deps for bin/net.

  + new function registry_create_admin_token() in new lib/util_reg_smbconf.c
  + move dup_nt_token from auth/token_util.c to new file lib/util_nttoken.c
  + adapt net_conf.c and Makefile.in accordingly.

* split lib/profiles.c into two parts: new file lib/profiles_basic.c
  takes all the low level mask manipulation and format conversion functions
  (se_priv, privset, luid). the privs array is completely hidden from
  profiles.c by adding some access-functions. some mask-functions are not
  static anymore.

  Generally, SID- and LUID-related stuff that has more dependencies
  is kept in lib/profiles.c

* Move initialization of regdb from net_conf.c into a function
  registry_init_regdb() in lib/util_reg_smbconf.c.

Michael
(This used to be commit efd3e2bfb7)
2007-10-10 12:23:21 -05:00
Gerald Carter
4caefdf348 r23474: Here's a small patch that disables the libkrb5.so replay cache
when verifying a ticket from winbindd_pam.c.

I've found during multiple, fast, automated SSH logins (such
as from a cron script) that the replay cache in MIT's krb5
lib will occasionally fail the krb5_rd_req() as a replay attack.

There seems to be a small window during which the MIT krb5
libs could reproduce identical time stamps for ctime and cusec
in the authenticator since Unix systems only give back
milli-seconds rather than the micro-seconds needed by the
authenticator.  Checked against MIT 1.5.1.  Have not
researched how Heimdal does it.

My thinking is that if someone can spoof the KDC and TDS
services we are pretty hopeless anyways.
(This used to be commit cbd33da9f7)
2007-10-10 12:23:19 -05:00
Volker Lendecke
de565785f5 r23410: Merge the core of the cluster code.
I'm 100% certain I've forgotten to merge something, but the main code
should be in. It's mainly in dbwrap_ctdb.c, ctdbd_conn.c and
messages_ctdbd.c.

There should be no changes to the non-cluster case, it does survive make
test on my laptop.

It survives some very basic tests with ctdbd enables, I did not do the
full test suite for clusters yet.

Phew...

Volker
(This used to be commit 15553d6327)
2007-10-10 12:23:14 -05:00
Simo Sorce
6250b82014 r23407: While verifying a bug I found out that for some reason
the code to add a machine was different then the one used
to add a user, the old code led to the machine SID not being
built out correctly allocationg a new RID out of the passdb
but instead by using the old algorithmic method.
This may easily end up in creating duplicated SID when the
RID counter get close to the values built by the algorithmic method.

Simo.
(This used to be commit e077142aa3)
2007-10-10 12:23:14 -05:00
Michael Adam
774ceeea50 r23379: Whitespace cosmetics, to reduce irritating diffs...
Michael
(This used to be commit df30f8d5c2)
2007-10-10 12:23:11 -05:00
Andrew Tridgell
248a82c0f2 r23323: merged ldb changes from 3.0.26
(This used to be commit 7c9a5c2a3f)
2007-10-10 12:23:06 -05:00
Gerald Carter
d99f4f004c r23271: merge service control pidl change for CloseServiceHandle() from SAMBA_3_0_26
(This used to be commit 0b1bc3521f)
2007-10-10 12:23:01 -05:00
Volker Lendecke
79534c7c22 r23223: Convert a leftover direct tdb access to sessionid.tdb
(This used to be commit 201c8952a8)
2007-10-10 12:22:56 -05:00
Gerald Carter
6a824bb120 r23207: merge net help test fix from SAMBA_3_0_26
(This used to be commit dbee1088bb)
2007-10-10 12:22:54 -05:00
Volker Lendecke
3f5742e20b r23204: Add MSG_SMB_BRL_VALIDATE. Tridge, this is a bit different from your bzr
branch, please check if it fulfils your needs.

Two changes: The validation is not done inside the brlock.c traverse_fn,
it's done as a separate routine.

Secondly, this patch does not call the checker routines in smbcontrol
directly but depends on a running smbd.
(This used to be commit 7e39d77c1f)
2007-10-10 12:22:53 -05:00
Volker Lendecke
d3ed91d9e1 r23195: Add void *private_data to brl_forall
(This used to be commit c91b2bdc16)
2007-10-10 12:22:53 -05:00
Volker Lendecke
e8156439f2 r23183: Check in a change made by Tridge:
This replaces the internal explicit dev/ino file id representation by a
"struct file_id". This is necessary as cluster file systems and NFS
don't necessarily assign the same device number to the shared file
system. With this structure in place we can now easily add different
schemes to map a file to a unique 64-bit device node.

Jeremy, you might note that I did not change the external interface of
smb_share_modes.c.

Volker
(This used to be commit 9b10dbbd5d)
2007-10-10 12:22:52 -05:00
Volker Lendecke
054bf2fc8b r23171: Convert connections.tdb to dbwrap
(This used to be commit 80a1f43825)
2007-10-10 12:22:52 -05:00
Volker Lendecke
ac3f08ddbe r23055: Rewrite messages.c to use auto-generated marshalling in the tdb. I'm
doing this because for the clustering the marshalling is needed in more
than one place, so I wanted a decent routine to marshall a message_rec
struct which was not there before.

Tridge, this seems about the same speed as it used to be before, the
librpc/ndr overhead in my tests was under the noise.

Volker
(This used to be commit eaefd00563)
2007-10-10 12:22:17 -05:00
James Peach
fa4df182e5 r23010: Make the output of "smbcontrol --help" match that of "smbcontrol help".
Bug #3181.
(This used to be commit 94b0997ef1)
2007-10-10 12:22:15 -05:00
James Peach
e61f235796 r23009: Both contains a strchr_m(server,'/') few lines after replacing all / with \.
This patch removes this dead code.

Patch from Pascal Terjan <pterjan@mandriva.com> for bug #2313.
(This used to be commit 04b84baef3)
2007-10-10 12:22:14 -05:00
Jeremy Allison
c15c0f2a47 r23005: If we're running on a system where time_t is 8 bytes
we have to take care to preserve the "special" values
for Windows of 0x80000000 and 0x7FFFFFFF when casting
between time_t and uint32. Add conversion functions
(and use them).
Jeremy.
(This used to be commit 4e1a0b2549)
2007-10-10 12:22:13 -05:00
Alexander Bokovoy
5d26d56e0f r22973: Apparently, 3.0.25 broke smb4k badly ;-)
smb4k uses 'net rap server domain' to list servers in domain.
Previously we just ignored all arguments in net_rap_server() but now we don't
as 'net rap server name' has added an explicit check on arguments.

Allow 'net rap server domain' to aid smb4k. Any other arguments will cause help message.
(This used to be commit 8f78b6ce3a)
2007-10-10 12:22:12 -05:00
Volker Lendecke
e95942ed84 r22954: More messaging_register
(This used to be commit 9b8df24107)
2007-10-10 12:22:11 -05:00
Volker Lendecke
56e6e5b8ca r22934: Change smbcontrol to use messaging_register instead of message_register
(This used to be commit e3d985c581)
2007-10-10 12:22:10 -05:00
Michael Adam
8b79106829 r22932: Use the same symbol in sizeof and cast for talloc.
(This used to be commit 550498e68d)
2007-10-10 12:22:10 -05:00
Volker Lendecke
8c3f8e5697 r22911: Pass a messaging_context to message_send_all
(This used to be commit cc92ce665d)
2007-10-10 12:22:07 -05:00
Volker Lendecke
84758bd1f8 r22908: All callers of message_init now also call messaging_init. Unify those.
(This used to be commit 330946ad23)
2007-10-10 12:22:07 -05:00
Volker Lendecke
331041139f r22906: Some more message_send_pid
(This used to be commit 8abf9f3963)
2007-10-10 12:22:06 -05:00
Volker Lendecke
8f9369f2e6 r22900: Convert profile/ to messaging_send_pid/messaging_register
(This used to be commit edbeea5207)
2007-10-10 12:22:05 -05:00
Volker Lendecke
fad7dd8a60 r22868: Replace some message_send_pid calls with messaging_send_pid calls. More
tomorrow.
(This used to be commit 74fa57ca5d)
2007-10-10 12:22:04 -05:00
Alexander Bokovoy
1f073a0319 r22867: With Samba4's IDL, we now have two new flags for share types: STYPE_TEMPORARY and STYPE_HIDDEN
Strip them out when referencing share_type[] entries.

Apparently, some Windows XP installs create shares set to STYPE_HIDDEN by default, found by
Damir Shayhutdinov <damir@altlinux.org>. This also fixes smb4k crashes as it does call 'net share -l'.
(This used to be commit c3f4fdd37e)
2007-10-10 12:22:04 -05:00
Volker Lendecke
b4a7b7a888 r22844: Introduce const DATA_BLOB data_blob_null = { NULL, 0, NULL }; and
replace all data_blob(NULL, 0) calls.
(This used to be commit 3d3d61687e)
2007-10-10 12:22:01 -05:00
James Peach
8cabd9ab92 r22828: Fix typo. Bugzilla #4589.
(This used to be commit b8959b1720)
2007-10-10 12:22:00 -05:00
Volker Lendecke
1cb8a948b3 r22787: More from Karolin: Make map_unix_group() static to net_sam.c, add "net
sam unmapunixgroup"
(This used to be commit 55e2f35fad)
2007-10-10 12:21:57 -05:00
Volker Lendecke
9e30a76c04 r22786: Some cleanup by Karolin Seeger: Remove unused pdb_find_alias, and change
return values of some alias-releated pdb functions from BOOL to NTSTATUS

Thanks :-)
(This used to be commit 590d2164b3)
2007-10-10 12:21:57 -05:00
Volker Lendecke
a0f9db7a16 r22767: Argl. Typed in 'svn ci' in the wrong branch. Revert.
(This used to be commit 2c5b951eba)
2007-10-10 12:21:55 -05:00
Volker Lendecke
16ae8eff93 r22766: Merge from 3_0:
r22412 | obnox | 2007-04-20 14:23:36 +0200 (Fr, 20 Apr 2007) | 5 lines

Add a "deletelocalgroup" subcommand to net sam.

Thanks to Karolin Seeger <ks@sernet.de>.
(This used to be commit fb6ac8a5b2)
2007-10-10 12:21:55 -05:00
Volker Lendecke
4aa44f7475 r22761: This introduces lib/conn_tdb.c with two main functions: connections_traverse
and connections_forall. This centralizes all the routines that did individual
tdb_open("connections.tdb") and direct tdb_traverse.

Volker
(This used to be commit e43e94cda1)
2007-10-10 12:21:55 -05:00
Volker Lendecke
76ce309234 r22751: Next step for the cluster merge: sessionid.tdb should contain a 'struct
server_id' instead of a 'uint32 pid'
(This used to be commit be7bac55c3)
2007-10-10 12:21:54 -05:00
Volker Lendecke
7192160599 r22747: Fix some C++ warnings
(This used to be commit a66a04e9f1)
2007-10-10 12:21:54 -05:00
Volker Lendecke
e6383f4762 r22736: Start to merge the low-hanging fruit from the now 7000-line cluster patch.
This changes "struct process_id" to "struct server_id", keeping both is
just too much hassle. No functional change (I hope ;-))

Volker
(This used to be commit 0ad4b1226c)
2007-10-10 12:21:52 -05:00
Gerald Carter
cfc4946ebf r22729: add help text for osver and osname options to 'net ads join' (patch from Dnailo A.)
(This used to be commit 3f588e0b65)
2007-10-10 12:21:51 -05:00
Gerald Carter
3eca3af1bc r22728: Patch from Danilo Almeida <dalmeida@centeris.com>:
When asked to create a machine account in an OU as part
of "net ads join" and the account already exists in another
OU, simply move the machine object to the requested OU.
(This used to be commit 3004cc6e59)
2007-10-10 12:21:51 -05:00
Jeremy Allison
56a5d05b8b r22590: Make TALLOC_ARRAY consistent across all uses.
That should be it....
Jeremy.
(This used to be commit 603233a98b)
2007-10-10 12:19:49 -05:00
Jeremy Allison
79de0ad946 r22588: Make all uses of TALLOC_MEMDUP consistent.
Jeremy.
(This used to be commit 8ad13718af)
2007-10-10 12:19:48 -05:00
Günther Deschner
1ee9650a1d r22479: Add "net ads keytab list".
Guenther
(This used to be commit 9ec76c5427)
2007-10-10 12:19:37 -05:00
Michael Adam
956a5ce7d5 r22412: Add a "deletelocalgroup" subcommand to net sam.
Thanks to Karolin Seeger <ks@sernet.de>.
(This used to be commit 1499c50513)
2007-10-10 12:19:32 -05:00
Jeremy Allison
b1842fd294 r22282: Fix last few name -> servicename changes.
Jeremy.
(This used to be commit f5c22f26f7)
2007-10-10 12:19:24 -05:00
Volker Lendecke
a40df6f92d r22135: Check in most of Michael Adam's net conf utility. A good share of this patch
is moving functions around to fix some linker dependencies for the registry.

Michael, I've renamed your auth_utils2.c to token_utils.c.

Thanks!

Volker
(This used to be commit 9de16f25c1)
2007-10-10 12:19:16 -05:00
Andrew Bartlett
23d3a1956b r22071: Make the error message for incorrect use of '-c' show the parameter as used.
This means that smbpasswd -c user (which in htpasswd creates a new file)
and smbpasswd -c /not/my/smb.conf should give errors an admin will
think to chase down.

Andrew Bartlett
(This used to be commit 721375e14c)
2007-10-10 12:19:09 -05:00
Stefan Metzmacher
bc2b6436d0 r22009: change TDB_DATA from char * to unsigned char *
and fix all compiler warnings in the users

metze
(This used to be commit 3a28443079)
2007-10-10 12:19:00 -05:00
Jeremy Allison
71b8fdff85 r22003: Fix from Jiri.Sasek@Sun.COM to wrap our krb5_locate_kdc
call as smb_krb5_locate_kdc to prevent incorrect linking
and crashes on Solaris.
Jeremy.
(This used to be commit 7d30737c8d)
2007-10-10 12:18:59 -05:00
Stefan Metzmacher
56ba447668 r22001: change prototype of dump_data(), so that it takes unsigned char * now,
which matches what samba4 has.

also fix all the callers to prevent compiler warnings

metze
(This used to be commit fa322f0cc9)
2007-10-10 12:18:59 -05:00
Stefan Metzmacher
9bb40d7c61 r22000: remove useless casts
metze
(This used to be commit 8f55fe4e46)
2007-10-10 12:18:59 -05:00
Volker Lendecke
fe962d2e48 r21962: Make pdbedit use the configfile specified by -s
(This used to be commit f540c18b2b)
2007-10-10 12:18:53 -05:00
Gerald Carter
2af42eaaa3 r21888: Add the osname and osver options to 'net ads join' as discussed
on the samba-technical ml.

I'll add a 'net ads set attribute=value' utility later
rather than the original 'net ads setmachineupn' patch that
was also posted to the tech ml.
(This used to be commit 5035778ae4)
2007-10-10 12:18:45 -05:00
Volker Lendecke
f56da0890f r21831: Back out r21823 for a while, this is going into a bzr tree first.
Volker
(This used to be commit fd0ee6722d)
2007-10-10 12:18:37 -05:00
Volker Lendecke
aa6055debd r21823: Let secrets_store_machine_password() also store the account name. Not used
yet, the next step will be a secrets_fetch_machine_account() function that
also pulls the account name to be used in the appropriate places.

Volker
(This used to be commit f94e5af72e)
2007-10-10 12:18:36 -05:00
Volker Lendecke
0d91334fe7 r21784: Replace smb_register_idle_event() with event_add_timed(). This fixes winbind
who did not run the idle events to drop ldap connections.

Volker
(This used to be commit af3308ce5a)
2007-10-10 12:18:33 -05:00
Herb Lewis
ec5167efa9 r21780: let smbcontrol use POPT_COMMON_SAMBA options to allow setting debug
level. Fix calculation of argc after options are stripped. I couldn't
find a popt function that returned this.
(This used to be commit 6bcbf23e2a)
2007-10-10 12:18:32 -05:00
Simo Sorce
10820162f1 r21776: fix bugs #4438 #4440
(This used to be commit 319fcb4ea8)
2007-10-10 12:18:31 -05:00
Jeremy Allison
540911001d r21768: Fix the client dfs code such that smbclient can
process deep dfs links (ie. links that go to non root
parts of a share). Make the directory handling conanonical
in POSIX and Windows pathname processing.
dfs should not be fully working in client tools. Please
bug me if not.
Jeremy.
(This used to be commit 1c9e10569c)
2007-10-10 12:18:30 -05:00
Jeremy Allison
aab1dd4ddb r21755: Memory leak fixes from Zack Kirsch <zack.kirsch@isilon.com>.
Jeremy.
(This used to be commit 02d08ca0be)
2007-10-10 12:18:28 -05:00
Jeremy Allison
4952fe368a r21714: Change the VFS interface to use struct timespec
for utimes - change the call to ntimes. This preserves
nsec timestamps we get from stat (if the system supports
it) and only maps back down to usec or sec resolution
on time set. Looks bigger than it is as I had to move
lots of internal code from using time_t and struct utimebuf
to struct timespec.
Jeremy.
(This used to be commit 8f3d530c5a)
2007-10-10 12:18:24 -05:00
Jeremy Allison
9f8e8e1aac r21663: Fix from the Wine guys: Robert Shearman <rob@codeweavers.com>
The background behind this patch is that we're using ntlm_auth with
Wine. Windows allows us to pass in a NULL domain and a username of the
form of "user@domain" and this is converted into an NTLMSSP_AUTH packet
with a NULL domain name and a username of the same form.
Jeremy.
(This used to be commit 32b040fe05)
2007-10-10 12:18:22 -05:00
Jeremy Allison
8e00e9d7a6 r21609: Fix memory leaks in error code paths (and one in winbindd_group.c).
Patch from Zack Kirsch <zack.kirsch@isilon.com>.
Jeremy.
(This used to be commit df07a662e3)
2007-10-10 12:18:16 -05:00
Jeremy Allison
fae01b4899 r21608: Fix a couple of memleaks in error code paths before
Coverity finds them :-)
Jeremy.
(This used to be commit cbe725f1b0)
2007-10-10 12:18:16 -05:00
Simo Sorce
f153274889 r21607: While committing I saw I had not newline terminated this string ...
(This used to be commit 51d296f251)
2007-10-10 12:18:16 -05:00
Simo Sorce
e9e6af5951 r21606: Implement escaping function for ldap RDN values
Fix escaping of DN components and filters around the code
Add some notes to commandline help messages about how to pass DNs

revert jra's "concistency" commit to nsswitch/winbindd_ads.c, as it was
incorrect.
The 2 functions use DNs in different ways.

- lookup_usergroups_member() uses the DN in a search filter,
and must use the filter escaping function to escape it
Escaping filters that include escaped DNs ("\," becomes "\5c,") is the
correct way to do it (tested against W2k3).

- lookup_usergroups_memberof() instead uses the DN ultimately as a base dn.
Both functions do NOT need any DN escaping function as DNs can't be reliably
escaped when in a string form, intead each single RDN value must be escaped
separately.

DNs coming from other ldap calls (like ads_get_dn()), do not need escaping as
they come already escaped on the wire and passed as is by the ldap libraries

DN filtering has been tested.
For example now it is possible to do something like:
'net ads add user joe#5' as now the '#' character is correctly escaped when
building the DN, previously such a call failed with Invalid DN Syntax.

Simo.
(This used to be commit 5b4838f62a)
2007-10-10 12:18:16 -05:00
Günther Deschner
dd110c9e7b r21540: Fix Bug #3713 and readd reporting what the profiles tool does (when
called with the -v option).

Patch from William Jojo <jojowil@hvcc.edu>.

Guenther
(This used to be commit 5889f588ee)
2007-10-10 12:18:11 -05:00
Jelmer Vernooij
1052cadbae r21462: Fix EnumValue (?)
(This used to be commit e73a418b5b)
2007-10-10 12:18:06 -05:00
Jeremy Allison
c909c6722b r21417: Janitor for Herb. Make sure sharesec.c is functionally
identical in 3.0.25 and 3.0.
Jeremy.
(This used to be commit eabe148258)
2007-10-10 12:18:03 -05:00
Günther Deschner
69cee2a3ec r21240: Fix longstanding Bug #4009.
For the winbind cached ADS LDAP connection handling
(ads_cached_connection()) we were (incorrectly) assuming that the
service ticket lifetime equaled the tgt lifetime. For setups where the
service ticket just lives 10 minutes, we were leaving hundreds of LDAP
connections in CLOSE_WAIT state, until we fail to service entirely with
"Too many open files".

Also sequence_number() in winbindd_ads.c needs to delete the cached LDAP
connection after the ads_do_search_retry() has failed to submit the
search request (although the bind succeeded (returning an expired
service ticket that we cannot delete from the memory cred cache - this
will get fixed later)).

Guenther
(This used to be commit 7e1a84b722)
2007-10-10 12:17:50 -05:00
Volker Lendecke
69d8c5ae5f r21115: notify_internal.c needs to remove the table entry if a process has crashed. So
it needs the specific error message.

Make messages.c return NTSTATUS and specificially NT_STATUS_INVALID_HANDLE if
sending to a non-existent process.

Volker
(This used to be commit 3f620d181d)
2007-10-10 12:17:39 -05:00
Volker Lendecke
aebd517075 r21114: Fix 'net usershare': Adding "guest_ok=y" required a correct acl. Set the
default if "" is set. And fix the calculation for too man shares.

Thanks to Karolin Seeger <ks@sernet.de>

Volker
(This used to be commit 5b12eb873f)
2007-10-10 12:17:39 -05:00
Volker Lendecke
caf8c6a76b r21064: The core of this patch is
void message_register(int msg_type,
                      void (*fn)(int msg_type, struct process_id pid,
-                                void *buf, size_t len))
+                                void *buf, size_t len,
+                                void *private_data),
+                     void *private_data)
 {
        struct dispatch_fns *dfn;

So this adds a (so far unused) private pointer that is passed from
message_register to the message handler. A prerequisite to implement a tiny
samba4-API compatible wrapper around our messaging system. That itself is
necessary for the Samba4 notify system.

Yes, I know, I could import the whole Samba4 messaging system, but I want to
do it step by step and I think getting notify in is more important in this
step.

Volker
(This used to be commit c8ae60ed65)
2007-10-10 12:17:32 -05:00
Gerald Carter
6ff9007252 r21010: fix the pstring change in ntlm_auth for require-membership-of in ntlm_auth
(This used to be commit 2d877e41d1)
2007-10-10 12:17:26 -05:00
Jeremy Allison
57881f7494 r20917: Fix missing error returns pointed out by "Li, Ying (ESG)" <ying.li2@hp.com>
Jeremy.
(This used to be commit 78387b3cd2)
2007-10-10 12:17:20 -05:00
Gerald Carter
fe830f22c9 r20903: Replace the hardcoded "smb.conf" string with the dyn_CONFIGFILE
(This used to be commit ff8f27108d)
2007-10-10 12:17:18 -05:00
Günther Deschner
e9c294b926 r20874: We need to distinguish client sitenames per realm. We were overwriting
the stored client sitename with the sitename from each sucessfull CLDAP
connection.

Guenther
(This used to be commit 6a13e878b5)
2007-10-10 12:17:16 -05:00
Jeremy Allison
bfd099e148 r20857: Silence gives assent :-). Checking in the fix for
site support in a network where many DC's are down.
I heard via Volker there is still a bug w.r.t the
wrong site being chosen with trusted domains but
we'll have to layer that fix on top of this.
Gd - complain if this doesn't work for you.
Jeremy.
(This used to be commit 97e248f89a)
2007-10-10 12:17:14 -05:00
Jelmer Vernooij
62e11c4f17 r20832: Remove extra pointers previously added to unique [out] pointers. Instead,
add [ref] pointers where necessary (top-level [ref] pointers,
by spec, don't appear on the wire).

This brings us closer to the DCE/RPC standard again.
(This used to be commit 580f2a7197)
2007-10-10 12:17:11 -05:00
Volker Lendecke
b906886e9e r20824: Send access to the trusted domain passwords through the pdb backend, so that
in the next step we can store them in LDAP to be replicated across DCs.

Thanks to Michael Adam <ma@sernet.de>

Volker
(This used to be commit 3c879745cf)
2007-10-10 12:17:10 -05:00
Jeremy Allison
618798276b r20744: Fix the build (I missed some chkpth -> checkpath renames).
Jeremy.
(This used to be commit 89b7a0630d)
2007-10-10 12:17:08 -05:00
Volker Lendecke
b5e262dbd0 r20654: Fix from Karolin Seeger <ks@sernet.de>: Accept "forever", "off" and "never" as
key words for -1 as policy values for net sam policy.

Volker
(This used to be commit b6347751d8)
2007-10-10 12:17:01 -05:00
Volker Lendecke
8cc702bf5a r20498: Two 64-bit warnings
(This used to be commit 382827ebac)
2007-10-10 12:16:53 -05:00
James Peach
62382d19e9 r20428: Rename dns_open. This conflicts with the dns_open symbol in
libSystem on Mac OS X.
(This used to be commit 2117904f18)
2007-10-10 12:16:48 -05:00
Herb Lewis
55ed1d5945 r20261: merge 20260 from samba_3_0_24
clean up a bunch of no previous prototype warnings
(This used to be commit c60687db11)
2007-10-10 12:16:37 -05:00
Gerald Carter
db7bf9a6b6 r20173: DNS update fixes:
* Fix DNS updates for multi-homed hosts
* Child domains often don't have an NS record in
  DNS so we have to fall back to looking up the the NS
  records for the forest root.
* Fix compile warning caused by mismatched 'struct in_addr'
  and 'in_addr_t' parameters called to DoDNSUpdate()
(This used to be commit 3486acd3c3)
2007-10-10 12:16:29 -05:00
Gerald Carter
d879aa8f36 r20170: Fix secure DNS updates to work against
Wnidows 2000 DNS which expects the TKEY payload to
be in the answer section and not in the additional
set of records (like Windows 2003 and the RFC).
(This used to be commit a3b6734fda)
2007-10-10 12:16:29 -05:00
Herb Lewis
6914b29daa r20131: get rid of a few no previous prototype warnings
(This used to be commit e710a7d39a)
2007-10-10 12:16:26 -05:00
Jim McDonough
243b462b09 r20119: Update help info indicating how to use separators (forward slash only)
and properly use backslashes in "net ads join computername="
(This used to be commit cc26e2f9a1)
2007-10-10 12:16:26 -05:00
Simo Sorce
4225f9a4bd r20116: Start merging in the work done to create the new idmap subsystem.
Simo.
(This used to be commit 50cd8bffee)
2007-10-10 12:16:25 -05:00
Volker Lendecke
38cc572b1e r20003: Fix error message
(This used to be commit de05358351)
2007-10-10 12:16:19 -05:00
Volker Lendecke
d5e4b3bea8 r20001: Fix bug 4273, thanks to Pascal Terjan
(This used to be commit a2f5c92918)
2007-10-10 12:16:18 -05:00
Volker Lendecke
ecf90c495e r19991: Sorry for this 2000-liner...
The main thing here is a rewrite of srv_winreg_nt.c. The core functionality
has moved to registry/reg_api.c which is then usable by the rest of Samba as
well.

On that way it fixes creating keys with more than one element in the
path. This did not work before.

Two things that sneaked in (sorry :-) is the change of some routines from
NTSTATUS to WERROR the removed "parent" argument to regkey_open_internal.

Volker
(This used to be commit fea52801de)
2007-10-10 12:16:18 -05:00
Volker Lendecke
e2bebe4865 r19978: More "net sam policy" improvements. Thanks to Karolin Seeger <ks@sernet.de>
Volker
(This used to be commit fde042f29e)
2007-10-10 12:16:17 -05:00
Volker Lendecke
dd813b6b29 r19944: Fix from Don Watson -- thanks
(This used to be commit c27e48594a)
2007-10-10 12:16:12 -05:00
Volker Lendecke
f57cd1f63c r19914: The "default" value with the name "" need different 0-length treatment as the
other StringBufs, otherwise clicking on a key with this value being set leads
to regedit.exe on w2k3 chew all memory.
(This used to be commit b148cde7f3)
2007-10-10 12:16:09 -05:00
Volker Lendecke
2a0e64e691 r19883: Fix bug 4248 -- thanks to Pascal Terjan :-)
(This used to be commit 66c20f2592)
2007-10-10 12:16:04 -05:00
Volker Lendecke
ca70f53930 r19840: Fix an uninitialized variable
(This used to be commit c4b5e8c7a0)
2007-10-10 12:16:01 -05:00
Volker Lendecke
b724a28019 r19835: Some net sam policy improvements.
Thanks to Karolin Seeger <ks@sernet.de>

Volker
(This used to be commit 2091018a53)
2007-10-10 12:16:01 -05:00
Volker Lendecke
334c868b83 r19827: Move registry_push/pull_value to lib/util_reg.c
(This used to be commit 3047a4b92c)
2007-10-10 12:16:00 -05:00
Volker Lendecke
6fad55ff89 r19825: To create a key, smbd also needs read privs assigned
(This used to be commit b2866b1318)
2007-10-10 12:16:00 -05:00
Volker Lendecke
ef4112922a r19822: Implement net rpc registry createkey, deletekey and deletevalue
(This used to be commit 419ebc92f0)
2007-10-10 12:15:59 -05:00
Volker Lendecke
e56be1dead r19821: Make net_rpc_registry use net_run_function2.
Fix an erroneous NT_STATUS_NO_MEMORY found by Chetan S <cshring@gmail.com>.

Thanks :-)

Volker
(This used to be commit 30f02e73fd)
2007-10-10 12:15:59 -05:00