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

24125 Commits

Author SHA1 Message Date
Jeremy Allison
537c4cf9cd Fix valgrind error in dbwrap_rbt where rec_priv->node was
being accessed after free. VALOKER PLEASE CHECK THIS VERY
CAREFULLY !!!! This is a correct fix in that it fixes the
valgrind error, but it looks inelegant to me. I think if
I understood this code better I could craft a more subtle
fix. Still looking at it....
Jeremy.
(This used to be commit 12cce3be2a)
2007-12-18 16:03:57 -08:00
Michael Adam
1394b91888 Fix an error when accessing unallocated sid in error path.
Michael
(This used to be commit 2a0585d309)
2007-12-18 16:33:35 +01:00
Volker Lendecke
b940e473dd Add forgotten cache.h
(This used to be commit 0dc4d6a8de)
2007-12-18 10:10:46 +01:00
Volker Lendecke
f427d4ce65 Add a in-memory cache
This is a more general API that caches data with a LRU scheme. See
include/cache.h. No comments yet, I'm still working on it. But Jeremy has given
me a hint in one of his checkins that he would like to make use of this now.

The idea is that we get rid of all our silly little caches and merge them all
into one cache that we can then very easily trim, for example even with a
smbcontrol message if someone decides memory is tight. The main user is the
stat cache, this patch also converts the getwd cache. More caches to come.
(This used to be commit 7a911b3571)
2007-12-18 09:56:04 +01:00
Michael Adam
68e65b2981 Fix a debug message: add missing space.
Michael
(This used to be commit 6a7f2a59fc)
2007-12-18 07:58:37 +01:00
Rishi Srivatsavai
bf2c5e2bde Add smbclient support for basic mDNS browsing.
Patch from Rishi Srivatsavai (bugzilla #4150), with tallocification
and minor syle changes by me.
(This used to be commit db74b99d0e)
2007-12-17 22:09:09 -08:00
Jeremy Allison
2d1b03d67a More static pstring elimination.
Jeremy.
(This used to be commit 92acc0115d)
2007-12-17 18:32:27 -08:00
Jeremy Allison
e3efe7cd7e More static fstring elimination.
Jeremy.
(This used to be commit b4dfec09e8)
2007-12-17 18:00:43 -08:00
Jeremy Allison
192aae0564 Remove more static fstrings (yes this little cache should be
in the rbtree....).
Jeremy.
(This used to be commit 97cfdae405)
2007-12-17 17:27:29 -08:00
Jeremy Allison
5bfe3c49a1 Correctly define prototypes for accessor functions.
Jeremy.
(This used to be commit 299ea5d122)
2007-12-17 17:13:31 -08:00
Jeremy Allison
289d793629 Merge branch 'v3-2-test' of ssh://jra@git.samba.org/data/git/samba into v3-2-test
(This used to be commit 8223624fea)
2007-12-17 17:03:07 -08:00
Jeremy Allison
2b0a570c77 More static fstring removal.
Jeremy.
(This used to be commit dcf624aa02)
2007-12-17 17:02:48 -08:00
Michael Adam
a62cc94443 Fix logic error in cm_connect_sam().
Don't fall back to schannel when trust creds could be obtained.
This is still not complete, but I am getting closer.

Michael
(This used to be commit 7c9fa597d6)
2007-12-18 01:55:48 +01:00
Michael Adam
a3081ba5b5 Prevent another segfault.
Michael
(This used to be commit 0a9874c1c7)
2007-12-18 01:30:52 +01:00
Jeremy Allison
c8071c3522 Use the %*s feature of snprintf to remove anothe static fstring.
Jeremy.
(This used to be commit 4ae4b23586)
2007-12-17 16:20:44 -08:00
Gerald (Jerry) Carter
d9553e8fd1 Fix a segv in winbindd caused by trying to free an fstring.
Make a copy of the machine_password and machine_account strings
in all conditional paths so that SAFE_FREE() will always be valid.
(This used to be commit 194c4640b1)
2007-12-17 17:33:48 -06:00
Michael Adam
d9682dfb59 Do not close netlogon pipe in get_schannel_session_key_common().
This removes one forgotten call of cli_rpc_pipe_close(netlogon_pipe).
Correction of e77c4022cf.

Michael
(This used to be commit 7f6593cdde)
2007-12-17 23:27:53 +01:00
Simo Sorce
2e44c4020b Merge branch 'v3-2-test' of ssh://git.samba.org/data/git/samba into v3-2-simo
(This used to be commit e940537d5b)
2007-12-17 15:26:16 -05:00
Simo Sorce
4869ccfed6 While 'data' is usually 0 terminated, nothing in the spec requires that. The correct way is to copy only 'length' bytes.
Simo.
(This used to be commit 814c1b0e00)
2007-12-17 15:26:08 -05:00
Jeremy Allison
8f28bda7f8 Fix bug #5121 (unix passwd sync not working on a streams based
system).
Jeremy.
(This used to be commit 545cd2139c)
2007-12-17 10:44:09 -08:00
Simo Sorce
d20608c8f3 Merge in J.Layton patch and resolve conflict.
(This used to be commit 6b1a118eaa)
2007-12-17 09:43:18 -05:00
Michael Adam
9f5a16a22d Remove direct caller of secrets_fetch_trusted_domain_password().
This is a regession introduced by f7efc0eca9.
This calls pdb_get_trusteddom_pw() instead, again.

Michael
(This used to be commit 91be824d2b)
2007-12-17 14:51:37 +01:00
Michael Adam
3fa2183941 Reformat: Remove trailing spaces.
Michael
(This used to be commit 5249b3d204)
2007-12-17 13:25:49 +01:00
Michael Adam
602bb7d766 Make usage message for net sam rights list a little more precise.
Michael
(This used to be commit d466a5136d)
2007-12-17 13:23:05 +01:00
Michael Adam
81327b1613 Fix for bug #4801: Correctly implement lsa lookup levels for lookupnames.
This patch is still incomplete in that winbindd does not walk
the the trusted domains to lookup unqualified names here.
Apart from that this fix should be pretty much complete.

Michael
(This used to be commit f7efc0eca9)
2007-12-17 13:06:13 +01:00
Michael Adam
720c65faed Fix flags in caller of lookup_name() in create_builtin_administrators().
Michael
(This used to be commit 46bfbf5c8a)
2007-12-17 13:06:09 +01:00
Michael Adam
7d5415a2cc Fix flags in all callers of lookup_name() in net_sam.c.
Michael
(This used to be commit 6d0db17a9e)
2007-12-17 13:06:01 +01:00
Michael Adam
4c8a708288 Fix flags in call of lookup_name() in srv_samr_nt.c: can_create().
Use LOOKUP_NAME_LOCAL instead of LOOKUP_NAME_ISOLATED.

Michael
(This used to be commit 1d4e0ad114)
2007-12-17 13:05:54 +01:00
Michael Adam
286b050e15 Fix flags in call of lookup_name() in pdb_default_create_alias().
Use new flag LOOKUP_NAME_LOCAL.

Michael
(This used to be commit 280d6cb6c8)
2007-12-17 13:05:45 +01:00
Michael Adam
470e970e41 Add combined flag LOOKUP_NAME_LOCAL.
Presence of LOOKUP_NAME_ISOLATED as the only flag is not the sign
for doing local lookups only but the sign for allowing lookups
of unqualified names. The correct sign is absence of the flag
LOOKUP_NAME_REMOTE.

Michael
(This used to be commit cd8c005744)
2007-12-17 13:05:29 +01:00
Volker Lendecke
7ec9ee0e05 Remove t_doschar.c
(This used to be commit b89f87242b)
2007-12-17 07:18:30 +01:00
Jeremy Allison
26daf2b479 Remove another static string and static passwd.
Jeremy.
(This used to be commit 2a700c5a57)
2007-12-16 18:32:03 -08:00
Jeremy Allison
bd1172d106 Remove a static fstring.
Jeremy.
(This used to be commit 898c56c0ea)
2007-12-16 18:02:32 -08:00
Volker Lendecke
3c490d91f1 get rid of doschar_table[]
If I'm not completely blind, then check_dos_char is *only* used in the case
when we can't mmap() valid.dat. To me this looks as if we initialize the 65536
bits in doschar_table[] with check_dos_char_slowly, use it once to initialize
valid_table[] and *never* use them again. I think there's no point in keeping
these 8k of modified memory around for an unlikely case (no "valid.dat") and
even that only to use it exactly once.
(This used to be commit 0bfea7259e)
2007-12-16 10:57:01 -08:00
Volker Lendecke
e28c6813e0 Tiny fixes to init_valid_table()
(This used to be commit a8948e0727)
2007-12-16 10:57:00 -08:00
Volker Lendecke
2ae400b213 Make init_doschar_table() static
It's only called directly before init_valid_table() anyway, so move it there.
(This used to be commit b6d1d24288)
2007-12-16 10:56:58 -08:00
Volker Lendecke
c335e3322d Make check_dos_char static
It's only called in t_doschar, a pretty bogus test program that is not compiled
by default
(This used to be commit 99c59e809e)
2007-12-16 10:56:55 -08:00
Volker Lendecke
d365a43785 make use of unmarshall_sec_desc
(This used to be commit ced0c42f05)
2007-12-16 14:15:16 +01:00
Volker Lendecke
8c6e781c3c make use of [un]marshall_sec_desc, allow for fd==-1 in get/set_secdesc
(This used to be commit 585f5f8831)
2007-12-16 14:05:30 +01:00
Volker Lendecke
c663c0055a Cut down memory usage of registry initialization
(This used to be commit 264d5dfe9f)
2007-12-16 14:02:46 +01:00
Volker Lendecke
dd4e99c9d7 Remove a static fstring
(This used to be commit a9c62c57db)
2007-12-16 14:02:26 +01:00
Volker Lendecke
02dd1f7f4c Make smb_np_struct talloc'ed
Convert "name" from string to a talloc'ed char *
(This used to be commit e82069f921)
2007-12-16 12:59:21 +01:00
Volker Lendecke
a9b6deaa05 Remove unused code
(This used to be commit fcd45ad6fb)
2007-12-16 12:59:14 +01:00
Jeremy Allison
8e86b7bb65 Doh, fix typo in error exit.
Jeremy.
(This used to be commit 44918f39c0)
2007-12-15 23:32:28 -08:00
Jeremy Allison
5dbc4a23bc Added patch originally by Andreas Schneider <anschneider@suse.de>
to cause us to behave like Vista when looking for remote
machine principal. Modified by me.
Jeremy.
(This used to be commit d0e33840fb)
2007-12-15 23:22:25 -08:00
Jeremy Allison
0b33d60aff Cope with valgrind > 3.2.x.
Jeremy.
(This used to be commit e799eb8da6)
2007-12-15 23:05:30 -08:00
Jeremy Allison
d76b086cc9 More work on bug #5082, use LC_ALL as this takes
precedence.
Jeremy.
(This used to be commit 446ebae76d)
2007-12-15 22:28:38 -08:00
Volker Lendecke
2e07c2ade8 s/sid_to_string/sid_to_fstring/
least surprise for callers
(This used to be commit eb523ba776)
2007-12-15 22:47:30 +01:00
Volker Lendecke
79cd97cc3f Use dom_sid_string for sid_string_talloc
Remove some code duplication, but introduce one more dependency on librpc/ndr.
Easily turned around so that librpc/ndr depends on lib/util_sid if necessary
(This used to be commit 3a0b1b2060)
2007-12-15 22:33:52 +01:00
Volker Lendecke
4312ad8b98 sid_string_static is no more :-)
We now have four ways to do sid_to_string:

sid_to_string: Convert it into an existing fstring, when you have one

sid_string_talloc: The obvious thing

sid_string_tos: For the lazy, use only with care

sid_string_dbg: The one to use in DEBUG statements
(This used to be commit 7b8276aaa4)
2007-12-15 22:09:37 +01:00