idra [Tue, 11 Sep 2007 23:04:14 +0000 (23:04 +0000)]
Fix const warning caused by the way I reformatted this
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@25107
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
jra [Tue, 11 Sep 2007 21:52:44 +0000 (21:52 +0000)]
Fix extra lines added by mistake.
Jeremy.
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@25104
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
jra [Tue, 11 Sep 2007 19:27:34 +0000 (19:27 +0000)]
Ensure we don't return unwritten memory (valgrind caught).
Jeremy.
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@25103
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
jra [Tue, 11 Sep 2007 18:31:29 +0000 (18:31 +0000)]
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.
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@25102
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
jerry [Tue, 11 Sep 2007 18:08:07 +0000 (18:08 +0000)]
Commit fix for CVE-2007-4138 from 3.0.26 release.
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@25099
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
obnox [Tue, 11 Sep 2007 16:50:32 +0000 (16:50 +0000)]
Add support for storing trusted domain passwords in LDAP for
passdb backend = ldapsam.
Along with reproducing the functionality of the secrets.tdb
code, I have prepared the handling of the previous trust password
(in case we are contacting a dc which does not yet know of a recent
password change). This information has still to be propagated
to the outside, but this requires a change of the api and also
a change of the secrets.tdb code.
Michael
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@25092
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
obnox [Tue, 11 Sep 2007 16:38:31 +0000 (16:38 +0000)]
Start adding support for storing trusted domain passwords in LDAP
(for passdb backen = ldapsam). At a first step, add the hooks,
calling the secrets_ functions.
Michael
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@25091
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
obnox [Tue, 11 Sep 2007 16:30:38 +0000 (16:30 +0000)]
Fix a syntax error just introduced into the LDAP schema.
Michael
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@25090
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
obnox [Tue, 11 Sep 2007 16:25:47 +0000 (16:25 +0000)]
Change the objectclass sambaTrustedDomainPassword to
have the current and possibly the previous trust password
stored as clear text passwords. (Previous use of NTPassword
was a mistake - this is a hash value.)
Michael
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@25088
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
obnox [Tue, 11 Sep 2007 16:18:14 +0000 (16:18 +0000)]
Reformatting: Get rid of an abundance of leading tabs...
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@25087
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
obnox [Tue, 11 Sep 2007 16:15:36 +0000 (16:15 +0000)]
Fix interdomain trusts (this povides the fix expected in r22709):
Fix winbindd on a Samba DC talking to a trusted domain DC by
making it use the trusted domain password...
Michael
I hope this does not brake any other setup.
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@25086
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
gd [Tue, 11 Sep 2007 14:56:43 +0000 (14:56 +0000)]
Once we decrypted the packet but have timing problems (closkew, tkt not yet or
no longer valid) there is no point to bother the keytab routines.
Guenther
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@25080
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
metze [Tue, 11 Sep 2007 10:21:34 +0000 (10:21 +0000)]
as all requests in the winbindd child are sync, we can use talloc_tos()
metze
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@25074
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
gd [Mon, 10 Sep 2007 23:12:27 +0000 (23:12 +0000)]
Older samba3 DCs will return DCERPC_FAULT_OP_RNG_ERROR for every opcode on the
LSARPC_DS pipe, continue with no_lsarpc_ds mode here as well to get
domain->initialized set to True. This avoids permanent scanning of Samba3 DCs
in winbindd. Thanks Michael, for pointing this out.
Guenther
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@25068
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
idra [Mon, 10 Sep 2007 19:19:59 +0000 (19:19 +0000)]
We use BOOL/True/False not bool/true/false
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@25064
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
idra [Mon, 10 Sep 2007 19:14:22 +0000 (19:14 +0000)]
Fix segfault in smbldp_set_creds when we want to use anonymous, the
code was not passing in the "anon" flag correctly and was passing
NULL pointers.
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@25063
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
idra [Mon, 10 Sep 2007 19:04:57 +0000 (19:04 +0000)]
Reformat, remove trailing spaces and fit lines into 80 columns
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@25062
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
vlendec [Mon, 10 Sep 2007 17:49:51 +0000 (17:49 +0000)]
Pro-actively shut up Coverity :-)
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@25061
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
idra [Mon, 10 Sep 2007 16:56:51 +0000 (16:56 +0000)]
Fix formatting, remove trailing spaces and cut lines longer than 80 chars
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@25060
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
idra [Mon, 10 Sep 2007 16:21:55 +0000 (16:21 +0000)]
Apply to 3.2 as well
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@25059
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
idra [Mon, 10 Sep 2007 15:14:39 +0000 (15:14 +0000)]
Add a schema file ready to be used in Fedora/RedHat Directory Server
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@25057
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
vlendec [Mon, 10 Sep 2007 10:56:07 +0000 (10:56 +0000)]
Add file_id_string_tos
This removes file_id_string_static and file_id_string_static2
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@25055
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
abartlet [Mon, 10 Sep 2007 02:14:18 +0000 (02:14 +0000)]
Set new, more secure defaults for Samba 3.2.
Andrew Bartlett
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@25049
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
vlendec [Sat, 8 Sep 2007 20:30:51 +0000 (20:30 +0000)]
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
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@25040
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
vlendec [Sat, 8 Sep 2007 17:08:59 +0000 (17:08 +0000)]
Fix a become/unbecome_root() pair
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@25036
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
lmuelle [Sat, 8 Sep 2007 14:56:11 +0000 (14:56 +0000)]
Contact an off site DC if non is available on site.
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@25032
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
lmuelle [Sat, 8 Sep 2007 13:53:08 +0000 (13:53 +0000)]
ip_srv_nonsite and count_nonsite are initialized in get_kdc_list() in any
case.
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@25030
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
vlendec [Sat, 8 Sep 2007 10:30:11 +0000 (10:30 +0000)]
Remove an unused function
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@25025
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
vlendec [Sat, 8 Sep 2007 09:15:08 +0000 (09:15 +0000)]
Fix a whole bunch of Coverity bugs
The callers of get_domain_group_from_sid() with some justification
expected map->gid to be initialized when get_domain_group_from_sid
returned True.
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@25024
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
jra [Sat, 8 Sep 2007 05:35:10 +0000 (05:35 +0000)]
Coverity #455. Not actually a bug, but this clarifies
the code a lot.
Jeremy.
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@25023
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
jra [Sat, 8 Sep 2007 05:18:08 +0000 (05:18 +0000)]
Fix coverity #395. Resource leak on error.
Jeremy.
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@25022
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
jra [Sat, 8 Sep 2007 05:12:17 +0000 (05:12 +0000)]
Fix coverity #435. Use of -1.
Jeremy.
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@25021
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
jra [Sat, 8 Sep 2007 04:57:17 +0000 (04:57 +0000)]
Fix coverity #374, possible null deref.
Jeremy.
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@25020
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
jra [Sat, 8 Sep 2007 04:45:59 +0000 (04:45 +0000)]
Fix coverity bug #105, run #332. Use of uninitialized variable.
Jeremy.
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@25019
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
jra [Fri, 7 Sep 2007 22:54:43 +0000 (22:54 +0000)]
We don't use mangle_map any more.
Jeremy.
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@25011
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
jra [Fri, 7 Sep 2007 20:57:01 +0000 (20:57 +0000)]
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.
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@25009
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
obnox [Fri, 7 Sep 2007 15:45:39 +0000 (15:45 +0000)]
Refactor out code duplication created by the previous
unification of r24998.
Michael
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@25002
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
obnox [Fri, 7 Sep 2007 14:54:30 +0000 (14:54 +0000)]
Use the new regval_compose() function in regval_ctr_addvalue().
Michael
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@24999
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
obnox [Fri, 7 Sep 2007 14:41:49 +0000 (14:41 +0000)]
Add a function regval_compose() to compose a REGISTRY_VALUE from
input data. Use this function in a first step to refactor
the canonicalization code of smbconf_store_values().
Michael
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@24998
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
obnox [Fri, 7 Sep 2007 13:54:56 +0000 (13:54 +0000)]
Eliminate more trailing spaces...
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@24996
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
vlendec [Fri, 7 Sep 2007 12:13:16 +0000 (12:13 +0000)]
Apply some const
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@24993
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
obnox [Fri, 7 Sep 2007 09:14:44 +0000 (09:14 +0000)]
Kill all those lots of trailing whitespaces from secrets.c.
These red bars in vi really hurt my eyes... :-o
Michael
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@24991
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
obnox [Fri, 7 Sep 2007 08:54:48 +0000 (08:54 +0000)]
Kill an incredible amount of trailing whitespaces...
Further reformat get_trust_pw to conform to coding rules.
Michael
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@24990
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
derrell [Thu, 6 Sep 2007 13:21:31 +0000 (13:21 +0000)]
- Use the formal syntax for calling functions through pointers. I've wanted
to make this change for ages, but now with the issue of "open" requiring it,
this is the time to just do all of them.
Derrell
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@24981
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
metze [Thu, 6 Sep 2007 11:08:44 +0000 (11:08 +0000)]
move domain_init_recv() near the functions that uses it
metze
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@24978
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
mimir [Thu, 6 Sep 2007 11:07:58 +0000 (11:07 +0000)]
Ensure negative caching for name2sid, sid2name and rids2names
mappings.
rafal
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@24977
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
metze [Thu, 6 Sep 2007 10:51:17 +0000 (10:51 +0000)]
catch SIGINT and SIGQUIT like SIGTERM
metze
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@24974
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
obnox [Wed, 5 Sep 2007 16:01:27 +0000 (16:01 +0000)]
Polish some comments and add my (C).
Michael
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@24970
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
idra [Wed, 5 Sep 2007 12:53:56 +0000 (12:53 +0000)]
Fwd port "open" patch
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@24969
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
obnox [Tue, 4 Sep 2007 14:54:00 +0000 (14:54 +0000)]
Reformat some object lists in Makefile.in to minimize the diff.
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@24955
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
gd [Tue, 4 Sep 2007 14:32:28 +0000 (14:32 +0000)]
Fix the build without krb5.
Guenther
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@24954
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
gd [Tue, 4 Sep 2007 14:06:33 +0000 (14:06 +0000)]
Set the kdc locator env vars. This makes the krb5 locator plugin fully
operational (from within winbindd and outside).
Guenther
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@24952
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
vlendec [Tue, 4 Sep 2007 13:21:24 +0000 (13:21 +0000)]
Warn if "os level" > 255
Thanks to Karolin Seeger <ks@sernet.de>
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@24951
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
vlendec [Tue, 4 Sep 2007 10:15:04 +0000 (10:15 +0000)]
Remove some static buffers
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@24949
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
vlendec [Tue, 4 Sep 2007 05:39:06 +0000 (05:39 +0000)]
Some stackframes
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@24943
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
gd [Mon, 3 Sep 2007 12:23:45 +0000 (12:23 +0000)]
Reformatting.
Guenther
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@24920
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
vlendec [Sun, 2 Sep 2007 17:50:05 +0000 (17:50 +0000)]
One more tick in #if 0 code
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@24903
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
vlendec [Sun, 2 Sep 2007 17:48:01 +0000 (17:48 +0000)]
DEBUG might use talloc_tos() itself...
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@24902
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
obnox [Sun, 2 Sep 2007 00:32:57 +0000 (00:32 +0000)]
Activate the winbindd cache-validation message handler.
Now the winbindd cache can be checked at runtime by
calling "smbcontrol winbindd validate-cache".
For the execution of the validation code, I fork a child
and in the child restore the default SIGCHLD handler in
order for the fork/waitpid mechanism of tdb_validate to work.
Michael
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@24879
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
obnox [Sun, 2 Sep 2007 00:23:02 +0000 (00:23 +0000)]
Don't panic in tdb validation code when the fork or waitpid fails.
Return error instead.
Michael
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@24877
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
derrell [Sat, 1 Sep 2007 18:34:50 +0000 (18:34 +0000)]
- Correct failure of libsmbclient against a version of Windows found on a NAS
device. The device resets a NBT connection on port 139 when it receives a
NetBIOS keepalive request. That request should be supported when NetBIOS is
in use; Windows is behaving badly.
libsmbclient needs a way to determine if a connection is still alive, and
was using a NetBIOS keepalive request if port 139 was in use (on the
assumption that it was probably NBT), and getpeername() when port 139 was
not being used (assuming naked transport).
This patch simplifies the code by exclusively using getpeername() to check
whether a connection is still alive. The NetBIOS keepalive request is
optional anyway (with preference being given to using TCP mechanisms for the
same purpose), so this should be both simpler and more reliable.
Derrell
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@24864
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
mimir [Fri, 31 Aug 2007 21:25:53 +0000 (21:25 +0000)]
Rename function as Jerry asked.
s/net_use_upn_machine_account/net_use_krb_machine_account/
rafal
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@24853
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
obnox [Fri, 31 Aug 2007 16:30:40 +0000 (16:30 +0000)]
Make tdb_validate() take an open tdb handle instead of a file name.
A new wrapper tdb_validate_open() takes a filename an opens and closes
the tdb before and after calling tdb_validate() respectively.
winbindd_validata_cache_nobackup() now dynamically calls one of
the above functions depending on whether the cache tdb has already
been opened or not.
Michael
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@24848
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
obnox [Fri, 31 Aug 2007 15:51:05 +0000 (15:51 +0000)]
Change standard failure return code of tdb_validate from "-1" to "1".
(This is more safely used with casts from int to uint8, e.g.)
Michael
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@24847
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
obnox [Fri, 31 Aug 2007 15:34:26 +0000 (15:34 +0000)]
Fix a segfault in smbcontrol when called with parameters but no extra args.
Michael
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@24845
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
obnox [Fri, 31 Aug 2007 15:24:43 +0000 (15:24 +0000)]
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
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@24843
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
gd [Fri, 31 Aug 2007 15:01:50 +0000 (15:01 +0000)]
Fix build warning.
Guenther
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@24842
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
gd [Fri, 31 Aug 2007 14:58:26 +0000 (14:58 +0000)]
The locator has no dependencies to ldap libs anymore. Also fix the build.
Guenther
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@24841
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
gd [Fri, 31 Aug 2007 13:51:02 +0000 (13:51 +0000)]
Now for real: build the locator, if we can.
Guenther
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@24838
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
obnox [Fri, 31 Aug 2007 13:39:51 +0000 (13:39 +0000)]
Initialize some uninitialized variables.
This prevents a segfault when get_kdc_ip_string() is called
with sitename == NULL.
Michael
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@24836
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
gd [Fri, 31 Aug 2007 12:21:18 +0000 (12:21 +0000)]
Move locator to nsswitch (does not belong to libads anymore).
Guenther
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@24833
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
gd [Fri, 31 Aug 2007 12:18:21 +0000 (12:18 +0000)]
In the winbind-locator recursion case, try to pick up the kdc from the
environment.
Guenther
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@24832
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
obnox [Fri, 31 Aug 2007 10:47:42 +0000 (10:47 +0000)]
Add a winbindd cache validation function that does not do
backup and corrupt file handling. (To be used in subsequent
changes.)
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@24830
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
obnox [Fri, 31 Aug 2007 10:30:14 +0000 (10:30 +0000)]
Make use of a variable, that is available... :-)
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@24829
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
obnox [Fri, 31 Aug 2007 10:06:37 +0000 (10:06 +0000)]
Give smbcontrol an initial talloc stackframe.
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@24828
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
obnox [Fri, 31 Aug 2007 09:54:30 +0000 (09:54 +0000)]
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
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@24827
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
vlendec [Fri, 31 Aug 2007 09:39:11 +0000 (09:39 +0000)]
Fix two memleaks in idmap_cache.c, bug 4917
Thanks again to Patrick Rynhart for persisting :-)
Simo, please check!
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@24826
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
obnox [Fri, 31 Aug 2007 09:15:57 +0000 (09:15 +0000)]
Give testparm an initial talloc stackframe, so it does not complain
it is leaking.
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@24825
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
obnox [Fri, 31 Aug 2007 09:10:54 +0000 (09:10 +0000)]
Create an initial talloc stackframe for the net binary.
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@24824
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
jra [Thu, 30 Aug 2007 23:07:10 +0000 (23:07 +0000)]
Reformat to 80 columns.
Jeremy.
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@24813
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
jra [Thu, 30 Aug 2007 21:46:42 +0000 (21:46 +0000)]
Simple reformatting to fit the 80 columns rule.
Jeremy.
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@24811
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
vlendec [Thu, 30 Aug 2007 19:48:31 +0000 (19:48 +0000)]
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
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@24809
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
jra [Thu, 30 Aug 2007 17:34:47 +0000 (17:34 +0000)]
Fix the same problem Volker noticed.
For some funny reason us4/gcc seems to fall over the '
Jeremy.
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@24808
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
gd [Thu, 30 Aug 2007 16:24:51 +0000 (16:24 +0000)]
Add WINBINDD_LOCATOR_KDC_ADDRESS env which will be used for the case when the
locator gets called from within winbindd.
Guenther
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@24807
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
gd [Thu, 30 Aug 2007 16:02:22 +0000 (16:02 +0000)]
Fix the build, sorry...
Guenther
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@24806
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
gd [Thu, 30 Aug 2007 15:55:59 +0000 (15:55 +0000)]
When we can build the locator, build it.
Guenther
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@24805
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
gd [Thu, 30 Aug 2007 15:39:51 +0000 (15:39 +0000)]
As a temporary workaround, also try to guess the server's principal in the
"not_defined_in_RFC4178@please_ignore" case to make at least LDAP SASL binds
succeed with windows server 2008.
Guenther
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@24804
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
vlendec [Thu, 30 Aug 2007 14:55:32 +0000 (14:55 +0000)]
For some funny reason us4/gcc seems to fall over the '
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@24803
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
vlendec [Thu, 30 Aug 2007 14:16:20 +0000 (14:16 +0000)]
Activate new tests
RAW-SAMBA3CASEINSENSITIVE and RAW-SAMBA3POSIXTIMEDLOCK
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@24802
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
gd [Thu, 30 Aug 2007 11:26:17 +0000 (11:26 +0000)]
When told to ignore the winbind cache also do so while trying to store entries.
Thanks Michael for pointing this out.
Guenther
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@24801
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
gd [Thu, 30 Aug 2007 09:52:21 +0000 (09:52 +0000)]
Prefer IP address to dns name when replying in winbindd dsgetdcname.
Guenther
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@24799
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
gd [Thu, 30 Aug 2007 09:15:07 +0000 (09:15 +0000)]
Fix logic in dsgetdcname().
Guenther
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@24797
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
jra [Wed, 29 Aug 2007 20:49:09 +0000 (20:49 +0000)]
Fix logic error in timeout of blocking lock processing found by
Ronnie. If a lock timeout expires, we must check we can get the
lock before responding with failure. Volker is writing a torture test.
Jeremy.
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@24791
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
mimir [Wed, 29 Aug 2007 19:55:13 +0000 (19:55 +0000)]
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
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@24789
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
jerry [Wed, 29 Aug 2007 19:03:20 +0000 (19:03 +0000)]
Cleanup some linking msgs and remove references to libmsrpc
in SAMBA_3_2_0
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@24788
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
gd [Wed, 29 Aug 2007 14:50:04 +0000 (14:50 +0000)]
Fix another build warning.
Guenther
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@24786
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
gd [Wed, 29 Aug 2007 14:35:32 +0000 (14:35 +0000)]
Put checks in parentheses.
Guenther
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@24785
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
obnox [Wed, 29 Aug 2007 14:34:15 +0000 (14:34 +0000)]
Initialize uninitalized data to prevent segfaults.
Thanks to Volker for the hint!
Michael
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@24784
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
gd [Wed, 29 Aug 2007 14:08:29 +0000 (14:08 +0000)]
Remove unused off_t type.
Guenther
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@24783
0c0555d6-39d7-0310-84fc-
f1cc0bd64818
vlendec [Wed, 29 Aug 2007 13:56:52 +0000 (13:56 +0000)]
Fix C++ warnings
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@24782
0c0555d6-39d7-0310-84fc-
f1cc0bd64818