Michael Adam
ba8c48244e
r25598: Add missing become_root/unbecome_root around calls of add_aliases.
...
This triggered a "cannot access LDAP when not root"-bug with
"passdb backend = ldap" and "winbind nested groups = yes".
This *might* be a step towards fixing bug #4308 , since the
failure was observerd when triggered by acl code.
Michael
2007-10-10 12:31:17 -05:00
Günther Deschner
534ee13596
r25593: Add missing security_secinfo bits as seen while managing security descriptor
...
inheritance with regedit.
Guenther
2007-10-10 12:31:16 -05:00
Günther Deschner
09e10d1d29
r25592: Allow to set sec_info for registry security descriptor queries.
...
Guenther
2007-10-10 12:31:16 -05:00
Jeremy Allison
3824a10fbc
r25587: Fix getaddrinfo detection code. From Timur.
...
Jeremy.
2007-10-10 12:31:16 -05:00
Stefan Metzmacher
a3ce4d7c32
r25584: don't run WINBIND tests untill the faked users work with a running winbindd
...
metze
2007-10-10 12:31:16 -05:00
Stefan Metzmacher
a9c6d8fa8b
r25583: it makes no sense to run blackbox.kinit against samba3
...
metze
2007-10-10 12:31:16 -05:00
Günther Deschner
109b09edef
r25575: Document S-1-5-12 (restriced code sid).
...
Guenther
2007-10-10 12:31:16 -05:00
Simo Sorce
a024e27e71
r25573: Add my (C) as well
2007-10-10 12:31:15 -05:00
Jelmer Vernooij
2c77c3c58e
r25572: Fix warnings (values are always true).
2007-10-10 12:31:15 -05:00
Stefan Metzmacher
abbb36a37c
r25571: split up child_dispatch_table into domain, idmap and locator tables
...
metze
2007-10-10 12:31:15 -05:00
Stefan Metzmacher
2dbc168e54
r25570: move code of the locator child into its own file
...
metze
2007-10-10 12:31:15 -05:00
Stefan Metzmacher
953229f040
r25569: move more idmap stuff into winbindd_idmap.c
...
metze
2007-10-10 12:31:15 -05:00
Stefan Metzmacher
97c63f1b95
r25568: move idmap related functions into their own file.
...
the final goal is to have 3 child dispatch tables
'domain', 'idmap' and 'locator' instead of one.
metze
2007-10-10 12:31:14 -05:00
Stefan Metzmacher
badc714d7f
r25567: make do_async() non static
...
metze
2007-10-10 12:31:14 -05:00
Jeremy Allison
2827bbe0f8
r25565: Fix unintended consequence change for IPv6 noticed
...
by Volker. We used to return 0.0.0.0 for the text
address of an uninitialized socket - ensure we
still do so. Once uninitialized address is as
good as any other.
Jeremy.
2007-10-10 12:31:14 -05:00
Volker Lendecke
d100bfffe2
r25564: Pass sharename to delete_share_security()
2007-10-10 12:31:13 -05:00
Volker Lendecke
2b3392df10
r25563: Show which local-substitute subtest fails
2007-10-10 12:31:13 -05:00
Volker Lendecke
4dc4364b68
r25561: Make use of [un]marshall_sec_desc
...
Minor cleanup only
2007-10-10 12:31:13 -05:00
Jeremy Allison
3cd783e3a5
r25560: Merge from Jelmer. "Define HAVE_* for other gai functions to prevent problems with libroken."
...
Jeremy.
2007-10-10 12:31:13 -05:00
Jelmer Vernooij
8c1669997c
r25557: merge libreplace fixes from samba4
2007-10-10 12:31:13 -05:00
Volker Lendecke
1e02208c43
r25538: Revert r25533
2007-10-10 12:31:12 -05:00
Volker Lendecke
0141e64ad4
r25534: Apply some const
...
Why? It moves these structs from the data into the text segment, so they
will never been copy-on-write copied. Not much, but as in German you say
"Kleinvieh macht auch Mist...."
2007-10-10 12:31:12 -05:00
Volker Lendecke
0f2552e20f
r25533: remove a pstring
2007-10-10 12:31:12 -05:00
Volker Lendecke
e0927a7cbf
r25528: Only do transactions on registry.tdb if anything changes
...
I got annoyed by the fsync calls clobbering my harddrive when smbd started up
for debugging.
... things you do on a plane without internet
2007-10-10 12:31:12 -05:00
Günther Deschner
31a0bf7b8c
r25526: Fix usage output.
...
Guenther
2007-10-10 12:31:12 -05:00
Günther Deschner
550ae11ad1
r25525: Add "net rpc registry getsd <keyname>" to display security descriptors.
...
Guenther
2007-10-10 12:31:11 -05:00
Jeremy Allison
9fe14b5a78
r25511: Fix sockaddr_in6 detection.
...
Jeremy.
2007-10-10 12:31:11 -05:00
Jeremy Allison
5174acccb5
r25510: Now we're returning the port instead of using a global,
...
remember to use ntohs. Hopefully will fix the build farm.
Jeremy.
2007-10-10 12:31:11 -05:00
Jeremy Allison
b412ba6fb3
r25508: Reformatting.
...
Jeremy.
2007-10-10 12:31:11 -05:00
Jeremy Allison
4cf17df5ca
r25507: Fix definition of struct sockaddr_storage if
...
struct sockaddr_in6 is defined.
Jeremy.
2007-10-10 12:31:11 -05:00
Jeremy Allison
760d993340
r25505: Add a replacement (IPv4 only) implementation of getaddrinfo/freeaddrinfo
...
under the 2 clause *BSD license for future use in IPv6 code. Original
code was from PostgreSQL and I've maintained their license even though
I've rewritten large parts of it (I probably should donate this back
to them).
Jeremy.
2007-10-10 12:31:10 -05:00
Stefan Metzmacher
3d3881a3d1
r25503: ignore failing WINBIND tests
...
we should get the them going without ignoring error...
metze
2007-10-10 12:31:10 -05:00
Volker Lendecke
492977016f
r25502: Fix bug 5006
...
Thanks to Joerg.Bernau at web.de
2007-10-10 12:31:10 -05:00
Volker Lendecke
da5736f210
r25499: Fix rpc_file_list_internals
2007-10-10 12:31:10 -05:00
Jelmer Vernooij
2f2bdfa0df
r25498: Remove checks that are always true.
2007-10-10 12:31:10 -05:00
Jeremy Allison
d980ee5040
r25495: Fixup definitions for missing sockaddr_storage.
...
Jeremy.
2007-10-10 12:31:10 -05:00
Jelmer Vernooij
d05bf1fbee
r25494: Sanity check --with-samba4srcdir argument.
2007-10-10 12:31:09 -05:00
Jim McDonough
281c619154
r25493: Fix typo in Jeremy's thread-safe winbind patch:
...
lock->unlock (would have tried to lock a mutex
at the end of a function). Cut-n-paste error.
2007-10-10 12:31:09 -05:00
Jeremy Allison
18c6a2211d
r25492: Start adding IPv6 compatible code to lib/util_sock.c and deal with
...
the ripple effects this causes. utmp has to change etc. Remove some
global varables and store address/port in the unexpected db.
Jeremy.
2007-10-10 12:31:09 -05:00
Jeremy Allison
2cab825634
r25487: Try fix the build - fix socklen_t and sa_family_t.
...
Jeremy.
2007-10-10 12:31:08 -05:00
Volker Lendecke
9e1f513916
r25484: Fix srvsrc_NetFileEnum listing only for one user
2007-10-10 12:31:08 -05:00
Volker Lendecke
3acc00132c
r25482: Slightly simplify logic
...
Instead of one big if-branch for if (process_exists(..)) return if
(!process_exists(..))
2007-10-10 12:31:07 -05:00
Volker Lendecke
5ae4b27398
r25481: Fix some typos, don't panic as non-root on net getdomainsid
...
Thanks to Karolin Seeger <ks@sernet.de>
2007-10-10 12:31:07 -05:00
Volker Lendecke
7e72a3046d
r25480: Fix a segfault
2007-10-10 12:31:07 -05:00
Jeremy Allison
fffdad5285
r25476: Finally fix up new interface detection code :-).
...
Jeremy.
2007-10-10 12:31:07 -05:00
Jeremy Allison
ae8efc60aa
r25475: Fix braindead mistakes I made pointed out by Simo and
...
James (how did this compile ? :-).
Jeremy.
2007-10-10 12:31:07 -05:00
Jeremy Allison
f1b8c5de0a
r25474: Try and fix the build on Mac OS X 10.4.9.
...
Shuffle sa_family_t around.
Jeremy.
2007-10-10 12:31:06 -05:00
Jeremy Allison
2a8f3dd550
r25473: Reformatting only. Prepare for new ip functions.
...
Jeremy.
2007-10-10 12:31:06 -05:00
Jeremy Allison
327875182c
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.
2007-10-10 12:31:06 -05:00
Stefan Metzmacher
f5b089370a
r25470: use --immediate like in samba4 to get more usefull output
...
metze
2007-10-10 12:31:06 -05:00
Jeremy Allison
1f71990544
r25455: Ensure we have inet_ntop and inet_pton available in lib/replace.
...
Jeremy.
2007-10-10 12:31:06 -05:00
Jeremy Allison
ab2e190859
r25445: Fix IPV6 detection.
...
Jeremy.
2007-10-10 12:31:05 -05:00
Michael Adam
b0f59f18bc
r25441: Make wbinfo --sequence output the sequence number if --domain
...
is specified.
Michael
2007-10-10 12:31:05 -05:00
Michael Adam
066a46ba91
r25434: Add the option to print the debug class (DBGC_CLASS) in the debug header.
...
Control this by a new boolean smb.conf option "debug class" which is
by default set to "no" to keep the default debug header unchanged.
Michael
Note: You need to make clean for this patch.
2007-10-10 12:31:05 -05:00
James Peach
ee1eba2855
r25432: Merge module linking changes from SAMBA_3_2 to SAMBA_3_2_0 to reduce
...
spurious tree differences.
2007-10-10 12:31:05 -05:00
Jeremy Allison
86b47d267d
r25431: Add detection for IPv6 support.
...
Jeremy.
2007-10-10 12:31:05 -05:00
Stefan Metzmacher
fef2ed2130
r25429: Samba 3 doesn't need to selftest Samba4 code...
...
metze
2007-10-10 12:31:04 -05:00
Michael Adam
4a053d5bf9
r25426: Fix another implicit cast warning.
...
Michael
2007-10-10 12:31:04 -05:00
Michael Adam
9265b3cde2
r25424: Align log level (by two) in debugging output.
...
Michael
2007-10-10 12:31:04 -05:00
Michael Adam
3e155b249e
r25422: Get rid of some cast warnings.
2007-10-10 12:31:04 -05:00
Stefan Metzmacher
43df4928ec
r25418: fix generation of git revision calculation
...
metze
2007-10-10 12:31:04 -05:00
Günther Deschner
43ca04918a
r25417: Use DBGC_REGISTRY class.
...
Guenther
2007-10-10 12:31:04 -05:00
Günther Deschner
b28dd747cb
r25416: Add registry debug class.
...
Guenther
2007-10-10 12:31:03 -05:00
Jelmer Vernooij
bdc831ddb3
r25415: Merge the 3.2-perltest branch that switches Samba 3.2 to use Samba 4's selftest code. See the mailing list for details.
2007-10-10 12:31:03 -05:00
Gerald Carter
00a93ed336
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).
2007-10-10 12:31:03 -05:00
Jeremy Allison
cc19c0ace4
r25406: Make the Linux nss client code thread-safe.
...
Fix originally inspired from code from boyang <yyyeer.bo@gmail.com>.
Jeremy.
2007-10-10 12:31:03 -05:00
Gerald Carter
45fa393358
r25405: Fix formatting as per metze's comments
2007-10-10 12:31:03 -05:00
Gerald Carter
f387e0f256
r25402: BUG 4997 (3.2 only): Fix enumration level for smbtree
2007-10-10 12:31:02 -05:00
Gerald Carter
611fdd95a5
r25401: BUG 4982: Don't delete lanman hashes on invalid logins when
...
using the "lanman auth = no". Tested by Guenter Kukkukk.
2007-10-10 12:31:02 -05:00
Gerald Carter
8304ccba73
r25400: Windows 2008 (Longhorn) Interop fixes for AD specific auth2 flags,
...
and client fixes. Patch from Todd Stetcher <todd.stetcher@isilon.com>.
2007-10-10 12:31:02 -05:00
Jeremy Allison
b4ee924000
r25399: Excise uint - > uint32 (where appropriate) or unsigned int.
...
Jeremy.
2007-10-10 12:31:02 -05:00
Günther Deschner
1f0d05807b
r25396: Very obvious fix from Martin Zielinski.
...
Guenther
2007-10-10 12:31:02 -05:00
Gerald Carter
11894a62e3
r25393: Removed unused variable
2007-10-10 12:31:01 -05:00
Jeremy Allison
713277391a
r25391: Fix bug #4978 : Store DOS Attributes fails when copying folders.
...
Jeremy.
2007-10-10 12:31:01 -05:00
Jeremy Allison
993bd0995e
r25389: Fix crash bug using DFS info struct uninitialized.
...
Jeremy.
2007-10-10 12:31:01 -05:00
Gerald Carter
c5adb92c02
r25380: Remove the groupdb:mapping parameter as discussed in the following thread:
...
http://lists.samba.org/archive/samba-technical/2007-June/053747.html
2007-10-10 12:31:01 -05:00
Günther Deschner
e9922cd8ae
r25370: Allow to delete registry keys recursively without deleting the final key.
...
Guenther
2007-10-10 12:31:01 -05:00
Günther Deschner
ddc6d05111
r25362: Add "NT Authority\System" with Full Access to the default registry security
...
descriptor.
Guenther
2007-10-10 12:31:00 -05:00
Steve French
0202a84e3f
r25355: IP address parsing did not allow for fully expanded ipv6 addresses
...
(which can be 12 bytes longer than we were allowing for).
Thanks to Dr. David Holder
2007-10-10 12:31:00 -05:00
Günther Deschner
53c99d415d
r25328: When using ldap sasl wrapping with gssapi it's important to receive warnings
...
for clock-skew errors.
Guenther
2007-10-10 12:31:00 -05:00
Volker Lendecke
25cc27df97
r25327: Normalize the path we return for 'msdfs proxy'
...
We now accept both \\server\tmp and \server\tmp. There are other places
where this might be necessary, but at least the functionality is a bit
easier now.
2007-10-10 12:31:00 -05:00
Günther Deschner
0719835c4d
r25326: Free the context from the talloc_stackframe.
...
Guenther
2007-10-10 12:31:00 -05:00
Günther Deschner
cc38e4fc1f
r25325: Rename some defines.
...
Guenther
2007-10-10 12:30:59 -05:00
Volker Lendecke
d4eddf88d2
r25324: Fix "msdfs proxy"
...
Jeremy, please check!
2007-10-10 12:30:59 -05:00
Volker Lendecke
e55b30ab84
r25323: Fix the build
2007-10-10 12:30:59 -05:00
Volker Lendecke
1cbe40b27c
r25317: Activate raw-samba3rootdirfid
2007-10-10 12:30:58 -05:00
Günther Deschner
693b3c26c0
r25314: Add HKEY_CURRENT_USER to reg_hive_key().
...
Guenther
2007-10-10 12:30:58 -05:00
Günther Deschner
eb311cafbb
r25313: dd HKEY_CURRENT_USER to rpccli_winreg_Connect().
...
Guenther
2007-10-10 12:30:58 -05:00
Volker Lendecke
a8312a1d7b
r25311: Patch from Heinrich Mislik <Heinrich.Mislik@univie.ac.at> to fix AIX
...
quotas.
Heinrich, I trust you on that, I don't even have compiled this :-)
Volker
2007-10-10 12:30:58 -05:00
Jeremy Allison
f70ac2e258
r25309: Volker's fix for bug #4984 - samba4 torture test
...
to follow. Ensure we don't prepend "./" as a root
directory - this is an invalid pathname for unix_convert().
Jeremy.
2007-10-10 12:30:58 -05:00
Michael Adam
9a28be220d
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
2007-10-10 12:30:58 -05:00
Michael Adam
bf12f0c0f8
r25287: Eliminate a handful of red bars and overly long lines I just
...
came across.
Michael
2007-10-10 12:30:57 -05:00
Michael Adam
cd3d652d0d
r25286: Fix one more caller of unistr2_to_ascii() that passed
...
in -1 for maxlen.
Michael
2007-10-10 12:30:57 -05:00
Michael Adam
76cb05deec
r25285: Fix some more callers of unistr2_to_ascii to use the size of
...
destination instead of source as maxlen.
Michael
2007-10-10 12:30:57 -05:00
Michael Adam
841ff0beee
r25281: Fix a caller of unistr2_to_ascii():
...
The maxlen parameter should be set to the size of the
destination, not to the size of the soruce.
Michael
2007-10-10 12:30:57 -05:00
Jeremy Allison
32626e2b97
r25277: Belt-and-braces approach to Volker's fix for RPC-SAMBA3-GETUSERNAME.
...
If we promise dest is null terminated, ensure we do it even on
fast path exits.
Jeremy.
2007-10-10 12:30:57 -05:00
Stefan Metzmacher
9a9c164366
r25275: w2k3 (as PDC emulator) returns WERR_NO_SUCH_DOMAIN to netlogon_getanydcname()
...
when called for it's own domain. So we should use netlogon_getdcname() which
returns WERR_OK:-)
gd: feel free to usage rpccli_netlogon_dsr_getdcname(), but please make sure
the new WINBIND-STRUCT-GETDCNAME test is still passing.
metze
2007-10-10 12:30:56 -05:00
Volker Lendecke
f6f64cf0b5
r25274: Attempt to fix RPC-SAMBA3-GETUSERNAME
2007-10-10 12:30:56 -05:00
Jeremy Allison
9ed3046633
r25273: unistrX_to_ascii calls pull_ucs2 - ensure it's never
...
called with -1 (these calls were wrong anyway, target
was an fstring, not a pstring). Found by Michael Adam <ma@sernet.de>,
now to check all other uses.
Michael - this version uses sizeof(target) not sizeof(fstring).
This way is more future proof.
Jeremy.
2007-10-10 12:30:56 -05:00
Michael Adam
a4f53fe225
r25272: Fix a bunch of callers of pull_ucs2 that passed -1 for dest_len.
...
Michael
2007-10-10 12:30:56 -05:00
Stefan Metzmacher
579ed8ae87
r25270: for internal domains we should not ask a remote DC.
...
metze
2007-10-10 12:30:56 -05:00
Stefan Metzmacher
b8d67b78aa
r25260: add trusted domains always to the end of the list.
...
Now BUILTIN is always the first domain followed
by the domain of our own SAM DB and the primary
domain (in member server mode).
metze
2007-10-10 12:30:56 -05:00
Michael Adam
8b5c34b7d1
r25258: Fix a panic message and remove superfluous return after the call to smb_panic().
...
Michael
2007-10-10 12:30:55 -05:00
Günther Deschner
38eca60913
r25257: When dumping eventlist, display full timestring.
...
Guenther
2007-10-10 12:30:55 -05:00
Michael Adam
3246be8cf0
r25254: Add my C - Michael
2007-10-10 12:30:55 -05:00
Stefan Metzmacher
862046028c
r25252: move macro defines to the end of replace.h
...
and move the include location sys/param.h
before we redefine missing macros
metze
2007-10-10 12:30:55 -05:00
Stefan Metzmacher
b09024928d
r25248: According to the build-farm all this defines are not needed
...
for HPUX large file support.
But it would be nice if someone could verify that.
metze
2007-10-10 12:30:54 -05:00
Michael Adam
1194d4f36e
r25247: Rename the rpccli_lsa_lookup_sids_all() function to rpccli_lsa_lookup_sids()
...
and remove the old rpccli_lsa_lookup_sids() function. The old function would
fail due to server limits when requesting to resolve too many sids at once
(20480 for W2k3). The new version passes the list of sids in hunks to the
server. It has up to now been used (and tested) in the winbindd_ads
lookup_groupmem() function, and I think the time has come to replace the actual
function with this correct version.
Michael
2007-10-10 12:30:54 -05:00
Stefan Metzmacher
af91f4fd08
r25245: rerun 'make idl'
...
metze
2007-10-10 12:30:53 -05:00
Stefan Metzmacher
00ea030e67
r25244: see what the build-farm says when we only use large file support
...
detection from libreplace...
It would be good if someone could test that on HPUX...
metze
2007-10-10 12:30:53 -05:00
Stefan Metzmacher
9caf54c868
r25241: remove sequence_number out of WINBINDD_DOMAIN_INFO call
...
as this is always answered by the winbindd parent and will
most times return old sequence number values.
metze
2007-10-10 12:30:53 -05:00
Stefan Metzmacher
ff94d05576
r25239: fix cut-n-paste bug in code with LIBUNWIND support
...
metze
2007-10-10 12:30:53 -05:00
Jeremy Allison
abedd96786
r25238: Make the error returns from the string functions
...
always consistent. Return -1 on error, and ensure
we check for this. In cases where the dest is already
specified and we've been asked to terminate with a
null, ensure we always do so even on error.
Jeremy.
2007-10-10 12:30:53 -05:00
Stefan Metzmacher
5566cf01e8
r25236: make it possible to alter WINBINDD_SOCKET_DIR via
...
"winbindd:socket dir=/path/to/dir" for usage in make test
metze
2007-10-10 12:30:52 -05:00
Stefan Metzmacher
828d2ca061
r25232: sync lib/replace with SAMBA_4_0
...
metze
2007-10-10 12:30:52 -05:00
Stefan Metzmacher
84ebb6cac2
r25230: sync lib/talloc with SAMBA_4_0
...
metze
2007-10-10 12:30:52 -05:00
Stefan Metzmacher
200b5bfb81
r25227: Patch from "Steven Danneman" <steven.danneman@isilon.com>:
...
-
We ran across a bug joining our Samba server to a Win2K domain with LDAP
signing turned on. Upon investigation I discovered that there is a bug
in Win2K server which returns a duplicated responseToken in the LDAP
bindResponse packet. This blob is placed in the optional mechListMIC
field which is unsupported in both Win2K and Win2K3. You can see RFC
2478 for the proper packet construction. I've worked with metze on this
to confirm all these finding.
This patch properly parses then discards the mechListMIC field if it
exists in the packet, so we don't produce a malformed packet error,
causing LDAP signed joins to fail. Also attached is a sniff of the
domain join, exposing Win2Ks bad behavior (packet 21).
-
(I've just changed the scope of the DATA_BLOB mechList)
metze
2007-10-10 12:30:52 -05:00
Michael Adam
aa603bcc6c
r25226: Get rid of more red bars...
2007-10-10 12:30:52 -05:00
Michael Adam
7238884c2c
r25225: Add a debug message.
...
Michael
2007-10-10 12:30:52 -05:00
Michael Adam
b4fff6d09d
r25224: Fix a potential segfault in lsa_lookupsids client code due to
...
uninitialized data.
Michael
2007-10-10 12:30:51 -05:00
Michael Adam
2c68ebd693
r25223: Fix behaviour of rpccli_lsa_lookupsids_all() when
...
rpccli_lsa_lookupsids_noalloc() returns an error for one hunk
of SIDs: free all allocated arrays and return the error code
returned by the hunk lookup.
Michael
2007-10-10 12:30:51 -05:00
Jeremy Allison
9fc14c83cc
r25222: Fix last assumptions that (size_t)-1 can be used
...
as a special dest_len of sizeof(pstring).
Jeremy.
2007-10-10 12:30:51 -05:00
Michael Adam
cc4599fdc1
r25201: Fight those red bars...
2007-10-10 12:30:51 -05:00
Michael Adam
f1f4758e2c
r25200: Fix a debug message.
2007-10-10 12:30:51 -05:00
Jeremy Allison
db1b629377
r25199: Remove pstring from strdup_upper - make it the
...
same as talloc_strdup_upper.
Jeremy.
2007-10-10 12:30:51 -05:00
Michael Adam
5a16da2185
r25198: Change net_rpc_join_ok() to return NTSTATUS for better
...
error propagation.
Michael
2007-10-10 12:30:50 -05:00
Michael Adam
46093004a7
r25197: Change net_make_ipc_connection() and net_make_ipc_connection_ex() to
...
return NTSTATUS to allow for better error propagation.
Michael
2007-10-10 12:30:50 -05:00
Jeremy Allison
8bb85f3f14
r25195: Fix issue with calling pull_uc2_*alloc with
...
str_len == 0. We should just return 0 in this
case.
Jeremy.
2007-10-10 12:30:50 -05:00
Volker Lendecke
b64df8a3c5
r25184: Fix some C++ warnings and an uninitialized variable
2007-10-10 12:30:49 -05:00
Stefan Metzmacher
2e5f478165
r25179: fix libunwind detection on x86 based hosts
...
we need -lunwind-x86 not -lunwind-i686
metze
2007-10-10 12:30:49 -05:00
Stefan Metzmacher
93bdd2724c
r25177: if configured using --enable-socket-wrapper
...
allow overwritting the location of the WINBINDD_SOCKET_DIR
via an environment variable
metze
2007-10-10 12:30:48 -05:00
Jeremy Allison
37cf2c2727
r25173: Use the append_buffer version in a loop.
...
Jeremy.
2007-10-10 12:30:48 -05:00
Jeremy Allison
6032fbc358
r25172: Remove commented out code we will never enable.
...
Jeremy.
2007-10-10 12:30:48 -05:00
Jeremy Allison
4748d26397
r25171: More pstring removal.
...
Jeremy.
2007-10-10 12:30:48 -05:00
Jeremy Allison
764574ee05
r25170: Remove pstring limits from ms_fnmatch and module load.
...
Jeremy.
2007-10-10 12:30:48 -05:00
Volker Lendecke
1a02226700
r25169: Fix bug 4028
2007-10-10 12:30:48 -05:00
Jeremy Allison
c215d6e849
r25167: Fix breakage from mangling rewrite. Use the
...
new name if unmangling succeeded, not if it
failed. Jerry - please re-test, this should
fix your bug.
Jeremy.
2007-10-10 12:30:47 -05:00
Jeremy Allison
fe30a523df
r25165: Use talloc_asprintf_append_buffer with an unmodified
...
string.
Jeremy.
2007-10-10 12:30:47 -05:00
Jeremy Allison
2243a73d65
r25164: Add talloc_asprintf_append_buffer() and the docs for it.
...
Jeremy.
2007-10-10 12:30:47 -05:00
Jeremy Allison
a7370eea6b
r25163: Fix wrong ctx passed to talloc_asprintf_append().
...
Found by Metze's code review (thanks Metze !).
Jeremy.
2007-10-10 12:30:47 -05:00
Michael Adam
883fd79061
r25162: Refactor further: add mapping functions between
...
REGISTRY_VALUE and struct registry_value formats for
registry values. Lacking better naming, I called them
regval_hilvl_to_lolvl and regval_lolvl_to_hilvl for a
start. The might be useful elsewhere, so might be put
into another place later on.
Michael
2007-10-10 12:30:47 -05:00
James Peach
ea226c5ed9
r25161: Don't panic if setgroups fails in non-root mode.
2007-10-10 12:30:46 -05:00
Michael Adam
7761f9b3cc
r25160: Refactor out and slightly clean up canonicalization of the registry value
...
from smbconf_store_values().
Michael
2007-10-10 12:30:46 -05:00
Stefan Metzmacher
3ac7566ae1
r25154: move winbindd code into winbindd/
...
metze
2007-10-10 12:30:46 -05:00
Stefan Metzmacher
2a794db3c5
r25152: fix headers used in wbinfo.c
...
metze
2007-10-10 12:30:46 -05:00
Stefan Metzmacher
f41efe01b5
r25150: don't recursivly call call dump_core()
...
as currently seen in 'make test' localy and in the farm
metze
2007-10-10 12:30:45 -05:00
Günther Deschner
c3b423c52a
r25148: Adapt to coding conventions.
...
Guenther
2007-10-10 12:30:45 -05:00
Stefan Metzmacher
e9e03aac22
r25146: rename winbindd_nss.h => winbind_struct_protocol.h
...
as this header has nothing todo with winbindd nor nss
and it contains the definitions for the struct based
protocol
metze
2007-10-10 12:30:45 -05:00
Stefan Metzmacher
8a95d7a7ed
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
2007-10-10 12:30:45 -05:00
James Peach
a136de663f
r25142: Panic if setting the group list fails while switching security
...
contexts. Patch from Tim Prouty <tim.prouty@isilon.com>.
2007-10-10 12:30:45 -05:00
Jeremy Allison
cfcf7cf03e
r25141: More pstring removal.
...
Jeremy.
2007-10-10 12:30:45 -05:00
Michael Adam
f935d21200
r25140: Less red bars to hurt my eyes...
2007-10-10 12:30:44 -05:00
Michael Adam
2daaaaa835
r25139: Avoid code duplication: let regval_ctr_copyvalue() call regval_ctr_addvalue().
...
This also corrects regval_ctr_copyvalue() in that it cannot create (invalid)
regval containers with dupliacte entries...
Michael
2007-10-10 12:30:44 -05:00
Jeremy Allison
39c211a702
r25138: More pstring elimination. Add a TALLOC_CTX parameter
...
to unix_convert().
Jeremy.
2007-10-10 12:30:44 -05:00
Jeremy Allison
54c658867d
r25136: When tallocing a string to uppercase remember the terminating
...
'\0' in size calculations.
Jeremy.
2007-10-10 12:30:43 -05:00
Günther Deschner
98f2e10e3f
r25135: Remove one END_PROFILE(SMBntcreateX) from call_nt_transact_create() which
...
appears to be a leftover. Should fix the build with profiling enabled.
Jeremy, please check.
Guenther
2007-10-10 12:30:43 -05:00
Günther Deschner
913fb138aa
r25134: Fix Bug #4968 and make dns updates work with heimdal as well (again,
...
gss_import_name() needs to follow the same logic as in the LDAP sasl wrapping
(see -r25133).
Tested with MIT 1.2.7, 1.3.6, 1.4.3, 1.5.1, 1.6.1 and Heimdal 0.7.2, 1.0,
1.0.1.
Guenther
2007-10-10 12:30:43 -05:00
Günther Deschner
cb2dc715e3
r25133: Fix sasl wrapping (for ldap sign&seal).
...
The gss_import_name() broke as we switched from the internal MIT OID
"gss_nt_krb5_principal" to "GSS_KRB5_NT_PRINCIPAL_NAME" and didn't switch from
passing the krb5_principal (or better: a pointer to that, see MIT's "*HORRIBLE*
bug") to pass the string principal directly.
Jerry, Jeremy, neither I could figure out the need of passing in a
krb5_principal at all nor could I reproduce the crash you were seeing.
I sucessfully tested the code (now importing a string) with MIT 1.2.7, 1.3.6,
1.4.3, 1.5.1, 1.6.1 and Heimdal 0.7.2, 1.0, 1.0.1.
Guenther
2007-10-10 12:30:43 -05:00
Stefan Metzmacher
2e13e05fa9
r25130: make use only of base types which are provided by libreplace
...
in winbind client and nss/pam stuff
metze
2007-10-10 12:30:43 -05:00
Stefan Metzmacher
b3ee9adf28
r25128: _XOPEN_SOURCE_EXTENDED and socklen_t are always provided by libreplace
...
metze
2007-10-10 12:30:42 -05:00
Stefan Metzmacher
5afa66970e
r25125: create prototypes for 'bool ' functions
...
metze
2007-10-10 12:30:42 -05:00
Jeremy Allison
6552e52979
r25121: Remove pstring limits from much of our string handling function.
...
Still a few left (mainly the substitute ones).
Jeremy.
2007-10-10 12:30:42 -05:00
Jeremy Allison
9cc70e3ccf
r25120: One more warning.
...
Jeremy.
2007-10-10 12:30:42 -05:00
Jeremy Allison
0e655ac946
r25119: Fix a couple of warnings.
...
Jeremy.
2007-10-10 12:30:42 -05:00
Jeremy Allison
7632f8fb40
r25118: More pstring elimination.
...
Jeremy.
2007-10-10 12:30:41 -05:00
Jeremy Allison
7f0db75fb0
r25117: The mega-patch Jerry was waiting for. Remove all pstrings from
...
the main server code paths. We should now be able to cope with
paths up to PATH_MAX length now.
Final job will be to add the TALLOC_CTX * parameter to
unix_convert to make it explicit (for Volker).
Jeremy.
2007-10-10 12:30:41 -05:00
Jeremy Allison
93c42fd9b5
r25116: Fix talloc_asprintf_append to do the right thing with
...
truncated strings.
Jeremy.
2007-10-10 12:30:41 -05:00
Jeremy Allison
0c9a8c4dff
r25111: Move to talloced pathnames on most code paths.
...
There are now ony 17 pstrings left in reply.c,
and these will be easy to remove (and I'll be
doing that shortly). Had to fix an interesting
bug in pull_ucs2_base_talloc() when a source
string is not null terminated :-).
Jeremy.
2007-10-10 12:30:41 -05:00
Günther Deschner
2dea9464bb
r25109: Remove obsolete argument from ads_guess_service_principal().
...
Guenther
2007-10-10 12:30:41 -05:00
Günther Deschner
f31949ec34
r25108: Make ifdef labyrinth in sasl code a bit more readable.
...
Guenther
2007-10-10 12:30:40 -05:00
Simo Sorce
6ce01bf413
r25107: Fix const warning caused by the way I reformatted this
2007-10-10 12:30:40 -05:00
Jeremy Allison
a28a35f9cd
r25104: Fix extra lines added by mistake.
...
Jeremy.
2007-10-10 12:30:40 -05:00
Jeremy Allison
b3f0d39d11
r25103: Ensure we don't return unwritten memory (valgrind caught).
...
Jeremy.
2007-10-10 12:30:40 -05:00
Jeremy Allison
cf6b6f9c3a
r25102: 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.
2007-10-10 12:30:40 -05:00
Gerald Carter
aa768a4a20
r25099: Commit fix for CVE-2007-4138 from 3.0.26 release.
2007-10-10 12:30:39 -05:00
Michael Adam
6c3c20e6c4
r25092: 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
2007-10-10 12:30:39 -05:00
Michael Adam
9c03cdf3a4
r25091: 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
2007-10-10 12:30:39 -05:00
Michael Adam
d8676f30d5
r25087: Reformatting: Get rid of an abundance of leading tabs...
2007-10-10 12:30:39 -05:00
Michael Adam
2322fe5cd7
r25086: 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.
2007-10-10 12:30:38 -05:00
Günther Deschner
7e4dcf8e7e
r25080: 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
2007-10-10 12:30:38 -05:00
Stefan Metzmacher
6e238fe5b4
r25074: as all requests in the winbindd child are sync, we can use talloc_tos()
...
metze
2007-10-10 12:30:38 -05:00
Günther Deschner
9b85f7ca43
r25068: 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
2007-10-10 12:30:38 -05:00
Simo Sorce
f624a269bf
r25064: We use BOOL/True/False not bool/true/false
2007-10-10 12:30:38 -05:00
Simo Sorce
6316a9c14d
r25063: 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.
2007-10-10 12:30:38 -05:00
Simo Sorce
1850d1c10f
r25062: Reformat, remove trailing spaces and fit lines into 80 columns
2007-10-10 12:30:37 -05:00
Volker Lendecke
f2ce4a803c
r25061: Pro-actively shut up Coverity :-)
2007-10-10 12:30:37 -05:00
Simo Sorce
7a4d465890
r25060: Fix formatting, remove trailing spaces and cut lines longer than 80 chars
2007-10-10 12:30:37 -05:00
Simo Sorce
17a7d33b3b
r25059: Apply to 3.2 as well
2007-10-10 12:30:37 -05:00
Volker Lendecke
638c848c9a
r25055: Add file_id_string_tos
...
This removes file_id_string_static and file_id_string_static2
2007-10-10 12:30:36 -05:00
Andrew Bartlett
87d39f61b4
r25049: Set new, more secure defaults for Samba 3.2.
...
Andrew Bartlett
2007-10-10 12:30:36 -05:00
Volker Lendecke
0c5657b5ef
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
2007-10-10 12:30:36 -05:00
Volker Lendecke
9e53f50e94
r25036: Fix a become/unbecome_root() pair
2007-10-10 12:30:36 -05:00
Lars Müller
50879e6de5
r25032: Contact an off site DC if non is available on site.
2007-10-10 12:30:36 -05:00
Lars Müller
287604a1c7
r25030: ip_srv_nonsite and count_nonsite are initialized in get_kdc_list() in any
...
case.
2007-10-10 12:30:36 -05:00
Volker Lendecke
858f7b7d78
r25025: Remove an unused function
2007-10-10 12:30:35 -05:00
Volker Lendecke
bc8b74dbfe
r25024: 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.
2007-10-10 12:30:35 -05:00
Jeremy Allison
5ba12eefbe
r25023: Coverity #455 . Not actually a bug, but this clarifies
...
the code a lot.
Jeremy.
2007-10-10 12:30:35 -05:00
Jeremy Allison
6a237600b8
r25022: Fix coverity #395 . Resource leak on error.
...
Jeremy.
2007-10-10 12:30:35 -05:00
Jeremy Allison
f789186086
r25021: Fix coverity #435 . Use of -1.
...
Jeremy.
2007-10-10 12:30:35 -05:00
Jeremy Allison
82b3656b4b
r25020: Fix coverity #374 , possible null deref.
...
Jeremy.
2007-10-10 12:30:34 -05:00
Jeremy Allison
a58de8cee5
r25019: Fix coverity bug #105 , run #332 . Use of uninitialized variable.
...
Jeremy.
2007-10-10 12:30:34 -05:00
Jeremy Allison
2e0999c1df
r25011: We don't use mangle_map any more.
...
Jeremy.
2007-10-10 12:30:33 -05:00
Jeremy Allison
dee8beba7a
r25009: 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.
2007-10-10 12:30:32 -05:00
Michael Adam
6026d13253
r25002: Refactor out code duplication created by the previous
...
unification of r24998.
Michael
2007-10-10 12:30:32 -05:00
Michael Adam
dab9ffe602
r24999: Use the new regval_compose() function in regval_ctr_addvalue().
...
Michael
2007-10-10 12:30:32 -05:00
Michael Adam
f4caa2d7d4
r24998: 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
2007-10-10 12:30:32 -05:00
Michael Adam
1ee1b75113
r24996: Eliminate more trailing spaces...
2007-10-10 12:30:32 -05:00
Volker Lendecke
613b9fcd18
r24993: Apply some const
2007-10-10 12:30:32 -05:00
Michael Adam
2e99e141c3
r24991: Kill all those lots of trailing whitespaces from secrets.c.
...
These red bars in vi really hurt my eyes... :-o
Michael
2007-10-10 12:30:31 -05:00
Michael Adam
b9e76a479e
r24990: Kill an incredible amount of trailing whitespaces...
...
Further reformat get_trust_pw to conform to coding rules.
Michael
2007-10-10 12:30:31 -05:00
Derrell Lipman
e746aaaf4d
r24981: - 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
2007-10-10 12:30:31 -05:00
Stefan Metzmacher
18e830a935
r24978: move domain_init_recv() near the functions that uses it
...
metze
2007-10-10 12:30:31 -05:00
Rafal Szczesniak
3a9b5eabf9
r24977: Ensure negative caching for name2sid, sid2name and rids2names
...
mappings.
rafal
2007-10-10 12:30:31 -05:00
Stefan Metzmacher
ab15f5c3e7
r24974: catch SIGINT and SIGQUIT like SIGTERM
...
metze
2007-10-10 12:30:30 -05:00
Michael Adam
aa043bb446
r24970: Polish some comments and add my (C).
...
Michael
2007-10-10 12:30:30 -05:00
Simo Sorce
113d62682a
r24969: Fwd port "open" patch
2007-10-10 12:30:30 -05:00
Michael Adam
5d94c3dab2
r24955: Reformat some object lists in Makefile.in to minimize the diff.
2007-10-10 12:30:30 -05:00
Günther Deschner
9df961914c
r24954: Fix the build without krb5.
...
Guenther
2007-10-10 12:30:30 -05:00
Günther Deschner
800645d538
r24952: Set the kdc locator env vars. This makes the krb5 locator plugin fully
...
operational (from within winbindd and outside).
Guenther
2007-10-10 12:30:30 -05:00
Volker Lendecke
3abf06efc1
r24951: Warn if "os level" > 255
...
Thanks to Karolin Seeger <ks@sernet.de>
2007-10-10 12:30:29 -05:00
Volker Lendecke
df648d47ff
r24949: Remove some static buffers
2007-10-10 12:30:29 -05:00
Volker Lendecke
cddb9f11d5
r24943: Some stackframes
2007-10-10 12:30:29 -05:00
Günther Deschner
62426a0555
r24920: Reformatting.
...
Guenther
2007-10-10 12:30:29 -05:00
Volker Lendecke
e0b4fb55e3
r24903: One more tick in #if 0 code
2007-10-10 12:30:29 -05:00
Volker Lendecke
1b39374a17
r24902: DEBUG might use talloc_tos() itself...
2007-10-10 12:30:28 -05:00
Michael Adam
f379a5c47d
r24879: 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
2007-10-10 12:30:28 -05:00
Michael Adam
9b25355dd6
r24877: Don't panic in tdb validation code when the fork or waitpid fails.
...
Return error instead.
Michael
2007-10-10 12:30:28 -05:00
Derrell Lipman
1f122352b0
r24864: - 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
2007-10-10 12:30:28 -05:00
Rafal Szczesniak
86af9fedad
r24853: Rename function as Jerry asked.
...
s/net_use_upn_machine_account/net_use_krb_machine_account/
rafal
2007-10-10 12:30:28 -05:00
Michael Adam
dc0b08e659
r24848: 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
2007-10-10 12:30:27 -05:00
Michael Adam
cb3583b392
r24847: 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
2007-10-10 12:30:27 -05:00
Michael Adam
f1bbf9bc18
r24845: Fix a segfault in smbcontrol when called with parameters but no extra args.
...
Michael
2007-10-10 12:30:27 -05:00
Michael Adam
ef92d505c0
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
2007-10-10 12:30:27 -05:00
Günther Deschner
205ef6ab3e
r24842: Fix build warning.
...
Guenther
2007-10-10 12:30:27 -05:00
Günther Deschner
ce7c816083
r24841: The locator has no dependencies to ldap libs anymore. Also fix the build.
...
Guenther
2007-10-10 12:30:27 -05:00
Günther Deschner
28f9b8d98d
r24838: Now for real: build the locator, if we can.
...
Guenther
2007-10-10 12:30:26 -05:00
Michael Adam
58d31e057b
r24836: Initialize some uninitialized variables.
...
This prevents a segfault when get_kdc_ip_string() is called
with sitename == NULL.
Michael
2007-10-10 12:30:26 -05:00
Günther Deschner
af90c6949c
r24833: Move locator to nsswitch (does not belong to libads anymore).
...
Guenther
2007-10-10 12:30:26 -05:00
Günther Deschner
7f42fe4e08
r24832: In the winbind-locator recursion case, try to pick up the kdc from the
...
environment.
Guenther
2007-10-10 12:30:26 -05:00
Michael Adam
b3dcadbed0
r24830: Add a winbindd cache validation function that does not do
...
backup and corrupt file handling. (To be used in subsequent
changes.)
2007-10-10 12:30:26 -05:00
Michael Adam
9062665208
r24829: Make use of a variable, that is available... :-)
2007-10-10 12:30:26 -05:00
Michael Adam
55020b07b5
r24828: Give smbcontrol an initial talloc stackframe.
2007-10-10 12:30:25 -05:00
Michael Adam
dbe38995ec
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
2007-10-10 12:30:25 -05:00
Volker Lendecke
0a9171f9ef
r24826: Fix two memleaks in idmap_cache.c, bug 4917
...
Thanks again to Patrick Rynhart for persisting :-)
Simo, please check!
2007-10-10 12:30:25 -05:00
Michael Adam
705336ee10
r24825: Give testparm an initial talloc stackframe, so it does not complain
...
it is leaking.
2007-10-10 12:30:25 -05:00
Michael Adam
c97600b96f
r24824: Create an initial talloc stackframe for the net binary.
2007-10-10 12:30:25 -05:00
Jeremy Allison
c6c8f5a897
r24813: Reformat to 80 columns.
...
Jeremy.
2007-10-10 12:30:25 -05:00
Jeremy Allison
0cdf046dae
r24811: Simple reformatting to fit the 80 columns rule.
...
Jeremy.
2007-10-10 12:30:24 -05:00
Volker Lendecke
6585ea2cb7
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
2007-10-10 12:30:24 -05:00
Jeremy Allison
229e02d732
r24808: Fix the same problem Volker noticed.
...
For some funny reason us4/gcc seems to fall over the '
Jeremy.
2007-10-10 12:30:23 -05:00