1
0
mirror of https://github.com/samba-team/samba.git synced 2025-12-17 04:23:50 +03:00
Commit Graph

102 Commits

Author SHA1 Message Date
Jeremy Allison
e5787cf75b r15700: Make nmbd udp sockets non-blocking to prevent problem
with select returning true but no data being available.
Fix for bug #3779.
Jeremy.
2007-10-10 11:17:08 -05:00
Jeremy Allison
24aaa48677 r15672: Fix for bug #3783. winbindd_cm.c calls open_any_socket_out()
to make connections to ports 445 or 139 on the DC it's trying
to contact. It calls sys_select() on the non-blocking sockets,
not sys_select_intr(). This is a mistake (I believe) as it allows
a signal to early terminate the connection attempts - whereas
sys_select_intr() will ignore signals until we get back to
the main processing loop where they'll be handled correctly.
This change means winbindd_cm will not early terminate if it
gets a message whilst trying to connect to DC's.
Gunther, Volker and Jerry please review (but I think this
is correct).
Jeremy.
2007-10-10 11:17:06 -05:00
Jeremy Allison
1217ed392b r15030: On a performace hunt... Remove as many extraneous
memset's as possible.
Jeremy.
2007-10-10 11:15:58 -05:00
James Peach
2163e4b6b4 r12953: Support the TCP_FASTACK socket option if it is available. Note that this will
not acutally help, but it is good to be complete.
2007-10-10 11:06:09 -05:00
Jeremy Allison
a9cd218eb6 r7591: Don't call getpeeraddr on a disconnected socket.
Jeremy.
2007-10-10 10:57:15 -05:00
Jeremy Allison
cbd7578e7c r7554: Refactor very messy code in util_sock.c Remove write_socket_data/read_socket_data
as they do nothing that write_socket/read_socket don't do. Add a more useful
error message when read_socket/write_socket error out on the main client fd
for a process (ie. try and list the IP of the client that errored).
Jeremy.
2007-10-10 10:57:13 -05:00
Jeremy Allison
052b4f8e28 r7318: Unify HEAD and 3.0 socket functions. Add HEAD functions here #ifdef'ed out.
Correct branch this time !
Jeremy.
2007-10-10 10:57:06 -05:00
Jeremy Allison
09c9a62aa5 r7039: Ensure we always call read_socket_with_timeout() when
timeout > 0. Better solution after much helpful input
from derrell@samba.org. We may eventually change the
read_socket_with_timeout() interface to count down the
timeout value.
Jeremy.
2007-10-10 10:57:01 -05:00
Jeremy Allison
7ad6fdc1ef r7034: Revert change in util_sock.c from derrell until this is
discussed more on samba-technical.
Jeremy.
2007-10-10 10:57:01 -05:00
Derrell Lipman
7b4d4f6109 r7025: 1 if not all data is available at the time we go to read a packet, retry
the read using a timeout to ensure that all data for the packet is received.
2 some minor changes to meet coding standards
3 eliminate some compiler warnings
2007-10-10 10:57:00 -05:00
Jeremy Allison
482f7e0e37 r6890: Refactor printing interface to take offset into job. Fixes bug
where large print jobs can have out-of-order offsets. Bug found
by Arcady Chernyak <Arcady.Chernyak@efi.com>
Jeremy.
2007-10-10 10:56:56 -05:00
Jeremy Allison
96f0e2d3fc r6553: Added Linux per-socket TCP settings patch from "Ed Boraas" <ed.boraas@concordia.ab.ca>.
Jeremy.
2007-10-10 10:56:45 -05:00
Volker Lendecke
7230cb87eb r4217: Fix open_any_socket_out.
This was a missing merge from HEAD or rather a commit to 3_0 from the wrong
source. Fixed slightly over HEAD, HEAD merge will follow.

Deal with connection refused according to the specs.

Volker
2007-10-10 10:53:38 -05:00
Jeremy Allison
620f2e608f r4088: Get medieval on our ass about malloc.... :-). Take control of all our allocation
functions so we can funnel through some well known functions. Should help greatly with
malloc checking.
HEAD patch to follow.
Jeremy.
2007-10-10 10:53:32 -05:00
Volker Lendecke
84ac54aef2 r3843: If a connection to a DC is requested, open connections simultaeneously to all
DCs found. The first one to reply wins.

Volker
2007-10-10 10:53:20 -05:00
Jeremy Allison
4fd314243e r2978: Fix #1926 typo in debug. Found by Bill McGonigle <bill+samba@bfccomputing.com>.
Jeremy.
2007-10-10 10:52:58 -05:00
Volker Lendecke
5f482df169 r1104: get_called_name is used in the printing subsystem. In case of multi-homed
servers we need to make sure that the clients are given back the IP address
they connected to.

Volker
2007-10-10 10:51:55 -05:00
Gerald Carter
79fed5f5a7 r487: fixing some compile issues with the IBM AIX compiler reoported on the ml -- now to watch the build farm some more 2007-10-10 10:51:26 -05:00
Andrew Tridgell
88278b24de r426: fixed bug noticed by wim.delvaux@adaptiveplanet.com in handling of timeout in socket connections 2007-10-10 10:51:23 -05:00
Andrew Bartlett
e27b5cbe75 Merge from HEAD the SMB signing patch that I developed a couple of weeks
ago.

This patch re-adds support for 'optional' SMB signing.  It also ensures that
we are much more careful about when we enable signing, particularly with
on-the-fly smb.conf reloads.

The client code will now attempt to use smb signing by default, and disable
it if the server doesn't correctly support it.

Andrew Bartlett
-
Gerald Carter
5fbfaa687a updating release notes & merging Derrel Lipman's libsmbclient patch from HEAD -
Jim McDonough
4319df7fdc Janitor for tpot...bugzilla #1098, msleep already exists on aix -
Gerald Carter
7a61c2ae45 more fixes from the static changes; please move static functions to the top of files to prevent this from happening -
Andrew Bartlett
25a09004e8 More 'static' work.
Andrew Bartlett
-
Andrew Tridgell
655ec16828 there are places in the samba3 code that don't check properly for
packet-termination of strings. This change ensures that when we go
past the end of a packet we hit 2 null bytes, thus terminating. We are
relying on the SAFETY_MARGIN packet allocation stuff here.
-
Gerald Carter
b7df6849c9 fix bug in get_peer_name() caused by --enable-developer and using the same src & dest strings to alpha_strcpy(); reported by Michael Young -
Volker Lendecke
3a7c8c4f0e Implement %i-Macro for the locally used IP address. With this you can again
have virtual hosts with different configurations on a single smbd even on port
445.

Volker
-
Volker Lendecke
d7162122ea Simple rename of get_socket_addr to get_peer_addr and get_socket_name to
get_peer_name. This is to get closer to the getsockname/getpeername system
functions.

Next step will be the %i macro for the local IP address. I still want to play
%L-games in times of port 445.

Volker
-
Tim Potter
23443e3aa0 Fix more 64-bit printf warnings. -
Jeremy Allison
d7e35dfb92 Put strcasecmp/strncasecmp on the banned list (except for needed calls
in iconv.c and nsswitch/). Using them means you're not thinking about multibyte at
all and I really want to discourage that.
Jeremy.
-
Jeremy Allison
06aa434c3f Patch from Stefan Metzmacher <metze@metzemix.de> to fix signing problems
when reverse connecting back to a client for printer notify.
Jeremy.
-
Gerald Carter
9f835b85dd convert snprintf() calls using pstrings & fstrings
to pstr_sprintf() and fstr_sprintf() to try to standardize.
lots of snprintf() calls were using len-1; some were using
len.  At least this helps to be consistent.
-
Jeremy Allison
61fc9a7b2e Add API framework for server SMB signing.
Jeremy.
-
Gerald Carter
7d63b69000 Volker's patch for open_socket_out() to speed up connections -
Paul Green
10bf65d335 Refactor existing sock_exec() and socketpair_tcp() functions into their own
source file. I will be making changes to sock_exec to work on VOS, which
has a blocking connect() call, but first I want to get it in its own source
file so that it can be called from a test program.
-
Andrew Bartlett
107731c080 When possible, store the IP address of the connecting client, not just the
hostname.

This makes 'last -i' show the IP.

Thanks to Philip Anderson <pza@australia.op.org> for the idea.

Andrew Bartlett
-
Gerald Carter
ab51878a97 workaround streams leak on SCO openserver 5.0.x -
Jeremy Allison
d4d8d27bf1 Samba janitor: adding mbp's umask patch :-).
Jeremy.
-
Gerald Carter
0fb724b321 *lots of small merges form HEAD
*sync up configure.in
*don't build torture tools in make all
*make sure to remove torture tools as part of make clean
-
Andrew Bartlett
3a7458f947 Merge from HEAD - make Samba compile with -Wwrite-strings without additional
warnings.  (Adds a lot of const).

Andrew Bartlett
-
Jeremy Allison
f755711df8 Removed global_myworkgroup, global_myname, global_myscope. Added liberal
dashes of const. This is a rather large check-in, some things may break.
It does compile though :-).
Jeremy.
-
Andrew Bartlett
9fa1863d8e Try to catch up on the code I've put into HEAD that should be in 3.0:
- vorlan's hosts allow with DNS names patch
 - use x_fileno() in debug.c, not the struct directly.
 - check for server timeout on password change (was reporting success)
 - better error/status loggin in both the pam_winbind client and winbindd_pam
server code.
 - (pdb_ldap) don't set the ldap version twice - we do it on every bind anyway.
-
Gerald Carter
65e7b5273b sync'ing up for 3.0alpha20 release -
Jelmer Vernooij
3928578b52 sync 3.0 branch with head -
Andrew Tridgell
03ac082dcb updated the 3.0 branch from the head branch - ready for alpha18 -
Jeremy Allison
3b1b8ac435 Fix the mp3 rename bug - also tidy up our open code and remove the special
cases for rename and unlink. Had to add desired_access into the share mode record.
Jeremy.
-
Jeremy Allison
8220135fd1 Only set smb_read_error if not already set.
Jeremy.
-
Martin Pool
b6d5d02aa1 Back out 1.16.2.3:
receive_smb: You might think that we ought to set smb_read_error here,
but apparently that breaks the recursive main loop in oplock.c.
Global variables suck. :-/
-
Jeremy Allison
3af16ade17 Fix from Michael Steffens <michael_steffens@hp.com> to make signal
processing work correctly in winbindd. This is a really good patch
that gives full select semantics to the Samba modified select.
Jeremy.
-
Tim Potter
6a58c9bd06 Removed version number from file header.
Changed "SMB/Netbios" to "SMB/CIFS" in file header.
-