diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-08-07 06:16:10 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:31:27 -0500 |
commit | f9e0b8aca502357d64f4816204ddcb2c7e876c8d (patch) | |
tree | 3323910713f08f29afde1b9bfe5c0c8cf15a9417 /source4/lib/appweb | |
parent | 2ed26253c1cc84fce6d9a00c642f3e7baffb5c80 (diff) | |
download | samba-f9e0b8aca502357d64f4816204ddcb2c7e876c8d.tar.gz samba-f9e0b8aca502357d64f4816204ddcb2c7e876c8d.tar.bz2 samba-f9e0b8aca502357d64f4816204ddcb2c7e876c8d.zip |
r9172: - fixed a nasty bug in the 'deep copy' mpr code that caused variables
called 'credentials' to not copy correctly (the bug was in handling
of chaining in the copy code
- ensure that C pointer variables are copied via a talloc reference so that
we can persist rpc pipes and credentials between sessions
(This used to be commit ca6f049693f8bfe69d5c7533b2cc92221d0cf6d4)
Diffstat (limited to 'source4/lib/appweb')
-rw-r--r-- | source4/lib/appweb/mpr/var.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source4/lib/appweb/mpr/var.c b/source4/lib/appweb/mpr/var.c index 9b02c0f8b0..77f4cbc55a 100644 --- a/source4/lib/appweb/mpr/var.c +++ b/source4/lib/appweb/mpr/var.c @@ -1416,7 +1416,9 @@ static void copyVarCore(MprVar *dest, MprVar *src, int copyDepth) break; case MPR_TYPE_PTR: - dest->ptr = src->ptr; + /* we have to reference here so talloc structures survive a + copy */ + dest->ptr = talloc_reference(dest, src->ptr); break; case MPR_TYPE_STRING_CFUNCTION: @@ -1477,7 +1479,7 @@ static void copyVarCore(MprVar *dest, MprVar *src, int copyDepth) srcProp->visited = 1; copyVarCore(destProp, srcProp, copyDepth); srcProp->visited = 0; - last = srcProp; + last = destProp; } } dest->properties->numItems = src->properties->numItems; |