1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-02 09:47:23 +03:00

2663 Commits

Author SHA1 Message Date
Stefan Metzmacher
05a23dd756 r21312: merge from SAMBA_4_0:
fix memory hierachy, and access to already freed memory

metze
2007-10-10 12:17:55 -05:00
Volker Lendecke
1b3239f2ab r21264: LDAP_OPT_ERROR_NUMBER seems more portable than LDAP_OPT_RESULT_CODE 2007-10-10 12:17:52 -05:00
Volker Lendecke
730cc3dc1e r21263: getpeername() returning -1 is not a reliable indication if a TCP connection is
dead. Might be my code, this rings a very distant bell...

Attempt to fix bug # 4372.

Volker
2007-10-10 12:17:52 -05:00
Gerald Carter
e2681eb4be r21262: Final part of BUG 4093: fix %a with Windows XP 64bit 2007-10-10 12:17:52 -05:00
Jeremy Allison
2dab892876 r21257: Better fix for bug #4188 :
Windows Vista RC1 and RC2 can't delete directory on Samba share
based on work by Joe Meadows <jmeadows@webopolis.com>.
Jeremy.
2007-10-10 12:17:51 -05:00
Gerald Carter
d781eeb0e4 r21250: Partial fix for BUG 4093: Make %a expand to "Vista"
based on the flags2 values in the negprot request.

This also includes some code for testing the dialect
strings for "SMB 2.001" but this is unreliable as Vista
only sends that in the 1st negprot and caches the fact
that we don't support it.  Restartnig the WOrkstation
service on the client clears the cache.
2007-10-10 12:17:51 -05:00
Andrew Tridgell
04f6f01dfe r21176: merged va_end() changes from Samba4 2007-10-10 12:17:45 -05:00
Volker Lendecke
3f620d181d r21115: notify_internal.c needs to remove the table entry if a process has crashed. So
it needs the specific error message.

Make messages.c return NTSTATUS and specificially NT_STATUS_INVALID_HANDLE if
sending to a non-existent process.

Volker
2007-10-10 12:17:39 -05:00
Volker Lendecke
c24854433a r21084: Make the Samba4 files compile in Samba3, not activated yet.
Volker
2007-10-10 12:17:34 -05:00
Volker Lendecke
4a99fa2666 r21081: Add forgotten function 2007-10-10 12:17:34 -05:00
Volker Lendecke
c01f164dca r21076: Two pieces of infrastructure from Samba4: An API-compatible messaging wrapper
and tdb_wrap_open.

Volker
2007-10-10 12:17:33 -05:00
Volker Lendecke
c8ae60ed65 r21064: The core of this patch is
void message_register(int msg_type,
                      void (*fn)(int msg_type, struct process_id pid,
-                                void *buf, size_t len))
+                                void *buf, size_t len,
+                                void *private_data),
+                     void *private_data)
 {
        struct dispatch_fns *dfn;

So this adds a (so far unused) private pointer that is passed from
message_register to the message handler. A prerequisite to implement a tiny
samba4-API compatible wrapper around our messaging system. That itself is
necessary for the Samba4 notify system.

Yes, I know, I could import the whole Samba4 messaging system, but I want to
do it step by step and I think getting notify in is more important in this
step.

Volker
2007-10-10 12:17:32 -05:00
Jeremy Allison
461db3c8ed r21060: Start refactoring out the non-return case statements
into functions.
Jeremy.
2007-10-10 12:17:31 -05:00
Volker Lendecke
70c589a832 r21005: Add a debug message for EAGAIN error of setresuid.
Volker
2007-10-10 12:17:26 -05:00
Jeremy Allison
7f817067a7 r20916: Add in the delete on close final fix - but only enabled
with -DDEVELOPER.
Jeremy.
2007-10-10 12:17:19 -05:00
Jeremy Allison
dce98dae2d r20913: Fix the build.
Jeremy.
2007-10-10 12:17:19 -05:00
Jeremy Allison
6fee874ab4 r20912: Ensure the list always remains sorted even when
moving events around.
Jeremy.
2007-10-10 12:17:19 -05:00
Jeremy Allison
0296358858 r20873: Some correctness fixes w.r.t. Samba4 torture BASE-DELETE.
Allow us to correctly refuse to set delete on close on a
non-empty directory. There are still some delete-on-close
wrinkles to be fixed, but I understand how to do that better
now. I'll fix this tomorrow.
Jeremy.
2007-10-10 12:17:16 -05:00
Volker Lendecke
cd07f93a8a r20846: Before this gets out of control...
This add a struct event_context and infrastructure for fd events to smbd. This
is step zero to import lib/events.

Jeremy, I rely on you to watch the change in receive_message_or_smb()
closely. For the normal code path this should be the only relevant change. The
rest is either not yet used or is cosmetic.

Volker
2007-10-10 12:17:13 -05:00
Jeremy Allison
34d891c81a r20838: Small fix from Jiri.Sasek@Sun.COM to fix null
pointer deref.
Jeremy
2007-10-10 12:17:11 -05:00
Stefan Metzmacher
024dd7d7c9 r20820: merge from samba4:
- include system/aio.h
- use full prototype for main
- use ifdef instead if

metze
2007-10-10 12:17:09 -05:00
Stefan Metzmacher
352ee73030 r20817: sync lib/replace with samba4
metze
2007-10-10 12:17:09 -05:00
Stefan Metzmacher
3061c333ec r20789: merge from samba4:
- remove the epoll configure checks from libreplace

metze
2007-10-10 12:17:09 -05:00
Jeremy Allison
66cca893e1 r20695: Remove duplication of constants.
Jeremy.
2007-10-10 12:17:03 -05:00
Jeremy Allison
31f8e0edc0 r20694: To get this right we need to do signed 64-bit
comparisons here, not unsigned as we're eventually
casting into what it normall a signed 32 bit
value. Guenther please check (but I think I'm right here).
Jeremy.
2007-10-10 12:17:03 -05:00
Jeremy Allison
f4e898b622 r20692: Fix bug found by Guenther -
Just try to log on in offline mode without the fix: all accounts are expired,
although they are set to never expire in the PAC/info3.

NTTIME "Never" needs to get (time_t) -1.

We were casting a uint64 to time_t before
comparing, and we should have been doing it
the other way around.

Guenther please check this fixes things.

Jeremy.
2007-10-10 12:17:03 -05:00
Volker Lendecke
bcf5c751cb r20394: This is a *VERY* early start of my work on notify.
Checking in because Jeremy was bugging me. Potentially this becomes quite
intrusive, I'm not sure if I should open a temporary branch for this.

Jeremy, Jerry, do you think 3_0 is the right place for this?

Volker
2007-10-10 12:16:46 -05:00
Stefan Metzmacher
b303e929d1 r20385: merge from samba4:
only try to find dlfcn.h if the dlopen symbol was found,
it hopefully fixes systems where dlfcn.h but no library with dlopen

metze
2007-10-10 12:16:45 -05:00
Jeremy Allison
08d551163c r20361: Prevent strnlen_w reading beyond max. Valgrind
found by Volker.
Jeremy
2007-10-10 12:16:44 -05:00
Herb Lewis
41be182f78 r20269: merge -r20264:20267 from SAMBA_3_0_24
more no previous prototype warnings
2007-10-10 12:16:38 -05:00
Herb Lewis
c60687db11 r20261: merge 20260 from samba_3_0_24
clean up a bunch of no previous prototype warnings
2007-10-10 12:16:37 -05:00
Herb Lewis
ebe16589cb r20248: merge 20247 from samba_3_0_24
get rid of warning: value computed is not used
2007-10-10 12:16:36 -05:00
Volker Lendecke
a77d8fa08e r20215: Next step trying to fix the Solaris build.
I think "anonimous" is correctly spelled "anonymous". The Solaris compile is
referring to this as "anonymous" in line 814 of smbldap.c. Simo, please check.

Thanks,

Volker
2007-10-10 12:16:33 -05:00
Jeremy Allison
437cb7c888 r20208: Change sprintf_append() never to use malloc,
but always use a talloc context.
Thanks to simo for pointing this out.
Jeremy.
2007-10-10 12:16:32 -05:00
Stefan Metzmacher
c718eb7a7c r20197: merge talloc fixes from samba4:
- make most static functions inline
- handle NULL pointers in talloc_parent_chunk()
- use talloc_parent_chunk() in talloc_parent_name()
  to fix a bug found by the IBM checker

metze
2007-10-10 12:16:31 -05:00
Günther Deschner
fe3ed63d29 r20183: Fix the build.
Guenther
2007-10-10 12:16:31 -05:00
Jeremy Allison
794ebd8a84 r20181: Improve NT status to pam error mapping.
Jeremy.
2007-10-10 12:16:30 -05:00
Jeremy Allison
ea8215935e r20179: Sync up with Samba4 - remove blank lines at the
end parsing a file.
Jeremy.
2007-10-10 12:16:30 -05:00
Jeremy Allison
da3d0b6234 r20174: If we're only going to call one handler per message
then terminate the traversal once we've done that.
Jeremy.
2007-10-10 12:16:29 -05:00
Jeremy Allison
2e9b6faeae r20165: Change messaging subsystem to only allow one message
per type - this is all we use right now and makes
re-entrancy problems with deleting handlers with
a message dispatch loop go away.
Jeremy.
2007-10-10 12:16:28 -05:00
Jeremy Allison
27a4c11214 r20160: Fix long-standing (ie. from initial code I think) bug
in tdb message processing. If we're inside a dispatch
function and we delete our own handler we'd walk onto
the next pointer from a deleted memory block. Fixes
crash bug in winbindd (and goodness knows where else).
Jeremy.
2007-10-10 12:16:28 -05:00
Jeremy Allison
c264a0aa4a r20148: Forgot to merge. Ensure open_any_socket_out()
is safe from signals.
Jeremy.
2007-10-10 12:16:27 -05:00
Herb Lewis
43ab1d2ba5 r20133: get rid of defined but not used warning - static function only used
inside the #ifdef HAVE_NATIVE_ICONV
2007-10-10 12:16:27 -05:00
Herb Lewis
e710a7d39a r20131: get rid of a few no previous prototype warnings 2007-10-10 12:16:26 -05:00
Simo Sorce
50cd8bffee r20116: Start merging in the work done to create the new idmap subsystem.
Simo.
2007-10-10 12:16:25 -05:00
Jeremy Allison
67c4d5e73f r20110: Fix interaction between paranoid malloc checker
and lib/replace. Found by Herb - thanks !
Jeremy.
2007-10-10 12:16:25 -05:00
Jeremy Allison
0ffca7559e r20090: Fix a class of bugs found by James Peach. Ensure
we never mix malloc and talloc'ed contexts in the
add_XX_to_array() and add_XX_to_array_unique()
calls. Ensure that these calls always return
False on out of memory, True otherwise and always
check them. Ensure that the relevent parts of
the conn struct and the nt_user_tokens are
TALLOC_DESTROYED not SAFE_FREE'd.
James - this should fix your crash bug in both
branches.
Jeremy.
2007-10-10 12:16:24 -05:00
Jeremy Allison
0a1352f440 r20087: Ensure we clean up any random pending events we
may have inherited from our parent in the winbindd
forked child.
Jeremy.
2007-10-10 12:16:23 -05:00
Volker Lendecke
4b5cf0c9cf r20054: Revert my changes, Simo promised to work on it :-) 2007-10-10 12:16:22 -05:00
Volker Lendecke
f64866a43f r20050: Remove a bogus NULL check, LTDB_OBJECTCLASS is a static string 2007-10-10 12:16:22 -05:00