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

3286 Commits

Author SHA1 Message Date
Günther Deschner
41410c86cc Some libnet and netapi build fixes.
Guenther
(This used to be commit 1d47247283)
2007-12-21 15:29:10 +01:00
Günther Deschner
5b5f75d229 Fill in local branch of NetGetJoinInformation().
Guenther
(This used to be commit 46db875451)
2007-12-21 15:29:10 +01:00
Günther Deschner
7482a18c83 More minor libnetapi fixes.
Guenther
(This used to be commit 9f129c069f)
2007-12-21 15:29:10 +01:00
Günther Deschner
749f699f87 Build fixes for libnetapi.
Guenther
(This used to be commit 07d33557b9)
2007-12-21 15:29:10 +01:00
Günther Deschner
4f6e8dfa51 Fill in NetJoinDomainLocal().
Guenther
(This used to be commit 4896f22bb5)
2007-12-21 15:29:10 +01:00
Günther Deschner
67aa44e7a2 Split NetJoinDomain() into NetJoinDomainRemote() and the unsupported
NetJoinDomainLocal().

Guenther
(This used to be commit d2f21ce672)
2007-12-21 15:29:09 +01:00
Günther Deschner
72ffac3990 Add NetGetJoinInformation().
Guenther
(This used to be commit d341d251d6)
2007-12-21 15:29:09 +01:00
Volker Lendecke
4418b989e7 Fix the build on Solaris
(This used to be commit 5f5e52ba7b)
2007-12-21 12:53:12 +01:00
Volker Lendecke
99b86e4a26 Some C++ fixes
(This used to be commit 5c392c4c6e)
2007-12-21 09:58:21 +01:00
Volker Lendecke
addf598cde Some C++ warnings
(This used to be commit 5ab82d4f57)
2007-12-21 09:58:20 +01:00
Volker Lendecke
0cdf5cfdfb Fix a missing prototype warning
(This used to be commit 93e5de23e7)
2007-12-21 09:58:20 +01:00
Volker Lendecke
184c927bf5 Remove some statics from md4.c
(This used to be commit 7e193c68b2)
2007-12-21 09:58:20 +01:00
Volker Lendecke
89f7883fe9 Add a singleton cache
First user is yp_default_domain
(This used to be commit c19363eb77)
2007-12-21 09:58:20 +01:00
Volker Lendecke
0565bc7335 Make data_blob_string_const return null terminated strings
... nobody was using it, so we're free to change it now :-)
(This used to be commit 4b06c68482)
2007-12-21 09:58:20 +01:00
Volker Lendecke
bea1659911 Remove next_token_nr_talloc and its associated global
Only client.c and clitar.c used this, I think they should carry the static
themselves. Also move the a bit funny routine toktocliplist to clitar.c, the
only place where it is used.
(This used to be commit 86d9412611)
2007-12-21 09:58:20 +01:00
Volker Lendecke
44d086a15f Convert the pwnam cache to memcache
(This used to be commit 032c5589fe)
2007-12-21 09:58:20 +01:00
Volker Lendecke
d3d870cc07 Add memcache_add_talloc
The first memcache API only had blobs, but we have quite a few objects that are
more complex talloc'ed structues. The current one I'm looking at is the
getpwnam cache, but there are others around.
(This used to be commit ea0e5ad9a1)
2007-12-21 09:58:20 +01:00
Volker Lendecke
cc48010f41 Add a global cache
It hurts, but I think this global variable is necessary for transition, and it
has the potential to remove quite a few other global variables without messing
with APIs too much.
(This used to be commit c131d0dc52)
2007-12-21 09:58:20 +01:00
Herb Lewis
df133758c2 fix dump printout when byte >= 0x80
(This used to be commit e18fab269c)
2007-12-20 14:57:29 -08:00
Volker Lendecke
e518e19bc0 Remove Get_Pwnam and its associated static variable
All callers are replaced by Get_Pwnam_alloc
(This used to be commit 735f593154)
2007-12-19 21:09:10 +01:00
Volker Lendecke
873b6f0f21 Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-716-g12cce3b
On Tue, Dec 18, 2007 at 06:04:32PM -0600, Jeremy Allison wrote:
>     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....

Thanks a lot. Fully correct. What about the attached little
simplification?

Volker
(This used to be commit 5b72828600)
2007-12-19 10:16:43 -08:00
Volker Lendecke
712a28aaae Rename cache.[ch] to memcache.[ch]
cache.h conflicts with an XFS DMAPI include on "opi" :-(
(This used to be commit b8db804e07)
2007-12-19 16:07:19 +01:00
Jeremy Allison
c99dc69a45 We've finished with the old node once we've copied the
keyval.
Jeremy.
(This used to be commit 39f3efbcc5)
2007-12-18 17:30:02 -08:00
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
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
Jeremy Allison
2d1b03d67a More static pstring elimination.
Jeremy.
(This used to be commit 92acc0115d)
2007-12-17 18:32:27 -08: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
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
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
dd4e99c9d7 Remove a static fstring
(This used to be commit a9c62c57db)
2007-12-16 14:02:26 +01: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
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
Volker Lendecke
14ef4cdec1 Replace sid_string_static with sid_to_string
This adds 28 fstrings on the stack, but I think an fstring on the stack is
still far better than a static one.
(This used to be commit c7c885078b)
2007-12-15 22:09:37 +01:00
Volker Lendecke
900288a2b8 Replace sid_string_static by sid_string_dbg in DEBUGs
(This used to be commit bb35e794ec)
2007-12-15 22:09:36 +01:00
Volker Lendecke
f498f661bc Add sid_string_dbg
This makes use of the just added debug_ctx and will kill many
sid_string_static() calls
(This used to be commit 3e4148c280)
2007-12-15 22:09:35 +01:00
Volker Lendecke
db98b92144 Add debug_ctx according to an idea by Tridge
Sorry, Jeremy, I think for debug messages this is just the right way to do it.
(This used to be commit 6312016e27)
2007-12-15 22:09:35 +01:00
Volker Lendecke
2cb7f5f632 add sid_string_talloc
(This used to be commit 9e3ef0923d)
2007-12-15 22:09:35 +01:00
Stefan Metzmacher
16352dd60b add POPT_COMMON_CONFIGFILE which only provides --configfile (not -s)
metze
(This used to be commit af3392cc20)
2007-12-14 19:36:14 +01:00
Stefan Metzmacher
1410c9e37d debug: fix crash bug when DEBUG() is used before setup_logging()
this was introduced by the pstring removal
(1ea3ac8014)

metze
(This used to be commit a412e6c7c6)
2007-12-14 08:22:14 +01:00
Günther Deschner
68a9bd0bf6 Add split_domain_user() (not to mix with winbind variants).
Guenther
(This used to be commit bd5308e5f6)
2007-12-12 00:58:58 +01:00
Jeremy Allison
95c2f313ce Add patches for bug #4866 from jiri sasek - Sun Microsystems - Prague Czech Republic <Jiri.Sasek@Sun.COM>
- slightly modified - Jiri please check !  to allow Solaris to get passwords > 8 chars.
Jeremy.
(This used to be commit 657bf8c347)
2007-12-11 13:16:35 -08:00
Jeremy Allison
7faee02d0d Remove the char[1024] strings from dynconfig. Replace
them with malloc'ing accessor functions. Should save a
lot of static space :-).
Jeremy.
(This used to be commit 52dc5eaef2)
2007-12-10 11:30:37 -08:00
Volker Lendecke
d5ab80054d dbwrap_rbt
This is meant as a replacement for the internal tdb. To me it seems a bit silly
that for in-memory structures we do our own memory management. With this rbt
based approach we can make use of the system-supplied malloc.
(This used to be commit 54e5d44046)
2007-12-10 16:06:32 +01:00
Volker Lendecke
8a8b146ead Make the Linux rbtrees compile within Samba
(This used to be commit c871fd802f)
2007-12-10 16:06:32 +01:00
Volker Lendecke
26a2e818fa Add rbtree.[ch] from the Linux kernel
These are copies taken from 94545baded0bfbabdc30a3a4cb48b3db479dd6ef from Linus' kernel tree
(This used to be commit 8a3289f913)
2007-12-10 16:06:32 +01:00
Volker Lendecke
18c90ed7d8 Add db_tdb_fetch
(This used to be commit efa8764c21)
2007-12-10 16:06:32 +01:00
Volker Lendecke
94a354493a Add dbwrap bystring service routines
(This used to be commit 1e214b536b)
2007-12-10 16:06:32 +01:00
Jeremy Allison
632ab7dc2e Many systems don't have sa_len as part of struct sockaddr.
Revert 5c347cb46d
"Choose a better default for sockaddr length.".
Jeremy.
(This used to be commit 677ac6adc3)
2007-12-09 14:59:07 -08:00
James Peach
8892c7a235 Choose a better default for sockaddr length.
(This used to be commit 5c347cb46d)
2007-12-09 14:02:23 -08:00
James Peach
daba3f8b54 Fix connect(2) callers to use correct sockaddr size.
Some systems (eg Mac OSX 10.5) require the length passed to match
the socket address family. This introduces sys_connect() that does
the right thing, and replaces all uses oc connect(2) with sys_connect().

Note that there are some LGPL callers that still call connect(2)
directly.
(This used to be commit e1bfdc17c4)
2007-12-09 13:28:00 -08:00
Jeremy Allison
42cfffae80 Remove next_token - all uses must now be next_token_talloc.
No more temptations to use static length strings.
Jeremy.
(This used to be commit ec003f3936)
2007-12-07 17:32:32 -08:00
Jeremy Allison
ade51769d5 We don't need P_GSTRING or P_UGSTRING anymore.
Jeremy.
(This used to be commit 78dc756000)
2007-12-07 12:43:10 -08:00
Jeremy Allison
acf15ae730 Don't build rpctorture anymore - not maintained. Just remove.
Remove all vestiges of pstring (except for smbctool as noted
in previous commit).
Jeremy
(This used to be commit 4c32a22ac5)
2007-12-07 12:26:32 -08:00
Jeremy Allison
9e8180b983 Remove pstrings completely except for smbctool (what does this do ?).
Don't build this for now.
Jeremy.
(This used to be commit 46b67fd82c)
2007-12-07 12:02:44 -08:00
Jeremy Allison
9e03d6117a *Really* fix the no password -N opt :-).
Jeremy.
(This used to be commit 187d8a94ea)
2007-12-06 19:15:56 -08:00
Jeremy Allison
e7781bd20f Fix the '-N' option.
Jeremy.
(This used to be commit b91b61b54f)
2007-12-06 19:06:34 -08:00
Jeremy Allison
9fdf2d0586 Get closer to building with smbmount. Move parameter line changes
into lib/util.c
Jeremy.
(This used to be commit 6ac5d81655)
2007-12-06 18:49:39 -08:00
Jeremy Allison
c6f0352155 Make cmdline_auth_info private to lib/popt_common.c. Provide
accessor functions.
Jeremy.
(This used to be commit 420195dd3e)
2007-12-06 17:22:57 -08:00
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
Gerald (Jerry) Carter
5d22700782 Compile fix to the automount support. Patch from GlaDiaC.
(This used to be commit 487ab6e75e)
2007-12-05 11:52:35 -06:00
Volker Lendecke
78c6ee0090 Remove some globals
(This used to be commit 31d0a846db)
2007-12-05 14:39:07 +01:00
Volker Lendecke
66af070039 Make share_info_db_init static
(This used to be commit 111502d3a2)
2007-12-05 14:39:07 +01:00
Volker Lendecke
2b17840a0e Remove a static, and "signal_received" needs to be sig_atomic_t
(This used to be commit 8acd4a202f)
2007-12-05 14:39:07 +01:00
Jeremy Allison
3ec5a37280 Ok, down to just the client/*.c code now.
Jeremy.
(This used to be commit 7d3959f81a)
2007-12-04 18:02:06 -08:00
Jeremy Allison
3771ada352 Remove pstring from automount lookups. Remove premature optimization.
Jeremy.
(This used to be commit 6863fe51b5)
2007-12-04 17:48:38 -08:00
Jeremy Allison
74dfee916f Remove tok pstring from util_str.c
Do we even make rpctorture anymore ?
Jeremy.
(This used to be commit fecc3cc45a)
2007-12-04 17:23:19 -08:00
Jeremy Allison
755051b569 pull_ascii_pstring is gone.
Jeremy.
(This used to be commit 288aacce4b)
2007-12-04 17:05:33 -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
6f46f75dfc Make strhex_to_str clear on string limits. Remove pstring from web/*.c
Jeremy.
(This used to be commit f9c8d62389)
2007-12-03 17:17:05 -08:00
Jeremy Allison
bcf033b38e Change tdb_unpack "P" to return a malloc'ed string rather
than expect a pstring space to put data into.
Fix the (few) callers.
Jeremy.
(This used to be commit 7722a7d2c6)
2007-12-03 14:54:06 -08:00
Günther Deschner
6b37d8e627 Fix wkssvc callers.
Guenther
(This used to be commit b734cd8aab)
2007-12-03 18:43:19 +01:00
Michael Adam
66887ddfba Remove workaround for broken capabilites.h from lib/system.c - now in lib/replace.
Michael
(This used to be commit a3fbb53232)
2007-12-03 16:54:13 +01:00
Michael Adam
684a72c779 Reformat configure checks for broken capabilities.h.
Michael
(This used to be commit 834a16225a)
2007-12-03 16:54:12 +01:00
Michael Adam
f5b071e3b0 Move check for broken system capabilites.h headers to lib/replace.
Michael
(This used to be commit 8ec10c4ab1)
2007-12-03 16:54:12 +01:00
Michael Adam
fc0a63153f Add check for ppc statfs.h header to workaround for broken capabilities.h.
Taken from s3:lib/system.c

Michael
(This used to be commit 07e6cfdc62)
2007-12-03 16:54:12 +01:00
Volker Lendecke
b1a924a0fb Fix some bogus uninitialized variable warnings
(This used to be commit 48a162b709)
2007-12-02 23:39:12 +01:00
Jeremy Allison
d1807be93c Fix restart after length count.
Jeremy.
(This used to be commit fa8115f32b)
2007-11-30 14:15:34 -08:00
Günther Deschner
cfbbeebbc6 Avoid to include net prototypes, just reference user creds.
Guenther
(This used to be commit 09e01a4716)
2007-11-30 22:25:01 +01:00
Günther Deschner
9433010f35 Add header file for NetJoinDomain() and friends.
Guenther
(This used to be commit 7cea527e87)
2007-11-30 22:25:01 +01:00
Günther Deschner
9fdb8b82c9 Add NetUnjoinDomain().
Guenther
(This used to be commit fd9d73ad44)
2007-11-30 22:25:01 +01:00
Günther Deschner
ac512a5bb2 Robustness-fixes for NetJoinDomain().
Guenther
(This used to be commit 2d5236cc37)
2007-11-30 22:25:01 +01:00
Günther Deschner
1484b1d174 Give NetJoinDomain() enough time to finish.
Guenther
(This used to be commit 7f021b3cb7)
2007-11-30 22:25:01 +01:00
Günther Deschner
5ee27320ce domain_name is a ref pointer.
Guenther
(This used to be commit b350e482b9)
2007-11-30 22:25:01 +01:00
Günther Deschner
a51e682a21 Add NetJoinDomain call.
Guenther
(This used to be commit 08a5a036ba)
2007-11-30 22:25:01 +01:00
Jeremy Allison
810f760afd Add talloc versions of all the next_token() functions.
Now I can really start removing fixed length strings...
Jeremy.
(This used to be commit 0ae61e2654)
2007-11-30 13:09:04 -08:00
Günther Deschner
4a1fbf7bbf Fix build warning.
Guenther
(This used to be commit bf4881d777)
2007-11-30 01:45:06 +01:00
Jeremy Allison
b7db7c8352 Fix memleak.
Jeremy.
(This used to be commit ccacd17047)
2007-11-29 16:30:18 -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
Volker Lendecke
a605be7314 Add a warning for a potential bug I've run into
(This used to be commit 223352e323)
2007-11-28 09:45:40 -08: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
d4bfafa29c Fix bug 5055
(This used to be commit 8bcd2df841)
2007-11-26 15:28:13 +01:00
Volker Lendecke
5d85dd682a Fix a C++ warning
(This used to be commit 9bf5ead4b2)
2007-11-26 14:36:29 +01:00
Tomoki AONO
02571885a9 1. lib/system.c (xattr code for Solaris) could not be
built against c90 compilers. (declaration after
statement.) Sample patch attached.
(This used to be commit 102a247df9)
2007-11-26 09:00:33 +01:00
Volker Lendecke
afc3eee3b8 Add a missing prototype
(This used to be commit 89e2984a84)
2007-11-22 16:00:13 +01:00