1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-29 11:21:54 +03:00
Commit Graph

2510 Commits

Author SHA1 Message Date
Derrell Lipman
ae259575c4 [Bug 6069] Add a fstatvfs function for libsmbclient
- port functionality from v3_3_test to master

Derrell
2009-02-12 10:39:48 -05:00
Volker Lendecke
7ecaced886 Do not use strlen if not necessary... :-) 2009-02-10 21:55:13 +01:00
Volker Lendecke
e3569df15b If we receive a DOS error code, nt_errstr should display it 2009-02-10 21:55:13 +01:00
Derrell Lipman
76f4cc3c70 eliminate compiler warnings 2009-02-09 09:54:22 -05:00
Günther Deschner
542251f7ae s3: use struct netr_Credential in cred_step().
Guenther
2009-02-05 00:48:26 +01:00
Ted Percival
189a85dd68 Probably fixes a crash during name resolution when log level >= 10
and libc segfaults if printf is passed NULL for a "%s" arg
(eg. Solaris).
2009-02-03 14:25:31 -08:00
Volker Lendecke
810b670b75 Fix Coverity ID 870 2009-02-03 10:22:36 +01:00
Volker Lendecke
d3f9b0fab6 Next step disentangling async_req from NTSTATUS
Now I need to document this :-)
2009-02-02 20:15:03 +01:00
Volker Lendecke
c14b7e648b Split up async_req into a generic and a NTSTATUS specific part 2009-02-01 19:05:39 +01:00
Volker Lendecke
b99859b948 Make is_andx_req non-static 2009-01-31 11:09:39 +01:00
Volker Lendecke
a0d52e7d54 Add async cli_ntcreate 2009-01-30 12:47:59 +01:00
Volker Lendecke
0bd92281e4 Make cli_tcon_andx async 2009-01-30 12:47:59 +01:00
Volker Lendecke
7b934c6af3 Make cli_session_setup_guest async 2009-01-30 12:47:59 +01:00
Volker Lendecke
37da26a06e Add the strlen to push to smb_bytes_push_str, return the converted size
The pushed strlen replaces the STR_TERMINATE flag which I personally always
find very confusing.
2009-01-29 21:38:06 +01:00
Volker Lendecke
89caa0e86b cli_ucs2 2009-01-29 21:38:06 +01:00
Volker Lendecke
c001b456cf Fix a valgrind error when the socket dies
Don't reference anything that might have been deleted in the async_req_error
call.
2009-01-28 16:18:15 +01:00
Stefan Metzmacher
7d93d3d4b8 s3:namecache: remove unused namecache_shutdown() function
metze
2009-01-27 15:28:06 +01:00
Volker Lendecke
7f25e0da73 Decouple clistr_pull from struct cli_state->inbuf 2009-01-26 05:39:34 +01:00
Volker Lendecke
6baf760d17 Fix an error path memleak 2009-01-25 20:52:42 +01:00
Volker Lendecke
28b7c44de8 Make smb_bytes_push_str deal with a NULL buf returning NULL 2009-01-25 20:52:39 +01:00
todd stecher
989ad44d32 Memory leaks and other fixes found by Coverity 2009-01-21 17:13:03 -08:00
Volker Lendecke
0dbd396862 Add a macro async_req_setup()
This streamlines setting up a multi-step async request a bit
2009-01-18 16:45:07 +01:00
Derrell Lipman
6d300399b5 Determine case sensitivity based on file system attributes.
- Most of the time, we can determine from the file system we're connecting to
  whether it supports case sensitivity. In those cases, we now set the
  internal case sensitivity flag automatically. For those cases where the
  request to retrieve file system attributes fails, we'll use the
  user-specified option value.

Derrell
2009-01-17 13:33:39 -05:00
Derrell Lipman
c6b4f3526a [Bug 6022] smbc_urlencode and smbc_urldecode were not exported
- Since the revamp of libsmbclient, there has still been an external
  declaration for smbc_urlencode and smbc_urldecode in libsmbclient.h, yet
  those functions were renamed and made private. The two choices were to
  remove the function names from libsmbclient.h or to make them public
  again. The reported requested that they be public. This commit makes it so.

Derrell
2009-01-16 20:26:46 -05:00
Derrell Lipman
1c77c7f3d5 Treat file names in POSIX-like case-sensitive fashion by default
*** THIS COMMIT CAUSES A CHANGE OF DEFAULT BEHAVIOR IN libsmbclient!!! ***

- libsmbclient now calls cli_set_case_sensitive() for a new CLI. By default,
  it requests case-sensitive, but the old behavior of case-insensitive can be
  requested with smbc_setOptionCaseSensitive(context, False);

  The change of behavior is considered a bug fix, as it was previously
  possible to accidentally overwrite a file that had the same case-insensitive
  name but a different case-sensitive name as a previously-existing file,
  while creating a new file.

Derrell
2009-01-16 16:41:36 -05:00
Andreas Schneider
3fe974c4fe Fix a segfault if ? is there but the options are NULL. This is the case if SMBC_parse_path is called by SMBC_stat_ctx. 2009-01-16 12:26:46 -08:00
Michael Adam
0cea990d75 s3: put netsamlogon_cache.tdb into cache_dir instead of lock_dir
Michael
2009-01-16 01:02:24 +01:00
Michael Adam
39ec8791f8 s3: make better use of ccache by not including version.h in every C-file.
version.h changes rather frequently. Since it is included via includes.h,
this means each C file will be a cache miss. This applies to the following
situations:

* When building a new package with a new Samba version

* building in a git branch after calling mkversion.sh
  after a new commit (i.e. virtually always)

This patch improves the situation in the following way:

* remove inlude "version.h" from includes.h

* Use samba_version_string() instead of SAMBA_VERSION_STRING
  in files that use no other macro from version.h instead of
  SAMBA_VERSION_STRING.

* explicitly include "version.h" in those files that use more
  macros from "version.h" than just SAMBA_VERSION_STRING.

Michael
2009-01-15 22:56:01 +01:00
Jeremy Allison
907f085296 Remove smbclient globals that bled into clidfs.c. Now we only have
the connections list and authentication structures to worry about.
Jeremy
2009-01-14 16:08:19 -08:00
Jeremy Allison
2c0a802cf8 Remove another global from clidfs that is only used in client.c.
Jeremy.
2009-01-14 14:26:56 -08:00
Stefan Metzmacher
7d9fd64f38 s3:libsmb: handle the smb signing states the same in the krb5 and ntlmssp cases
SMB signing works the same regardless of the used auth mech.

We need to start with the temp signing ("BSRSPYL ")
and the session setup response with NT_STATUS_OK
is the first signed packet.

Now we set the krb5 session key if we got the NT_STATUS_OK
from the server and then recheck the packet.

All this is needed to make the fallback from krb5 to
ntlmssp possible. This commit also resets the cli->vuid
value to 0, if the krb5 auth didn't succeed. Otherwise
the server handles NTLMSSP packets as krb5 packets.

The restructuring of the SMB signing code is needed to
make sure the krb5 code only starts the signing engine
on success. Otherwise the NTLMSSP fallback could not initialize
the signing engine (again).

metze
2009-01-12 13:22:40 +01:00
Volker Lendecke
ce5eded7e0 Move cli_api_pipe() to its only user cli_pipe.c 2009-01-11 22:53:24 +01:00
Jeremy Allison
590c9b7b6d Fix bug #6021 - smbclient du command does not recuse properly
Jeremy.
2009-01-08 15:41:49 -08:00
Jelmer Vernooij
af744e0954 Merge branch 'master' of ssh://git.samba.org/data/git/samba 2009-01-04 22:48:23 +01:00
Volker Lendecke
b4f8996ac7 Simulate the Windows behaviour to fire 445 and after a timeout 139 2009-01-04 16:42:41 +01:00
Volker Lendecke
19b783cce9 Async wrapper for open_socket_out_send/recv 2009-01-04 16:42:40 +01:00
Volker Lendecke
fafb9ecc61 open_socket_out is always used with SOCK_STREAM, remove argument "type" 2009-01-03 19:22:06 +01:00
Volker Lendecke
27abf6731e struct async_req doesn't really need to carry an event_context 2009-01-03 19:07:57 +01:00
Jeremy Allison
3d2d0203e5 Remove cli_cm_set_dest_ss() - removes the global dest_ss
from libsmb/clidfs.c. Keep the '-I<address>' option in
smbclient working. The intent is to remove all globals
from libsmb/clidfs.c.
Jeremy.
2009-01-02 12:49:49 -08:00
Volker Lendecke
707a5a41b5 Remove a global variable 2009-01-01 20:01:32 +01:00
Volker Lendecke
bf34e998f9 fix some nonempty blank lines 2009-01-01 20:01:32 +01:00
Jelmer Vernooij
08259c1c52 Add iconv_convenience argument to size functions. 2009-01-01 04:45:33 +01:00
Jeremy Allison
bb23f5725f Fix more asprintf and "ignoring return code" warnings from gcc 4.3.
Jeremy.
2008-12-31 16:30:11 -08:00
Volker Lendecke
8ae4155f82 Make a CONST_DISCARD unnecessary by applying some const
Derrell, please check!
2008-12-31 19:33:25 +01:00
Volker Lendecke
e4d28dbc04 Attempt to fix bug 5953: Make cli_send_smb_direct_writeX use writev
It seems there are SMB servers around which can't cope with the write header
being sent in a packet of its own. With writev we keep the advantage of direct
writes, giving the kernel the chance to coalesce the write calls.
2008-12-29 13:24:28 +01:00
Volker Lendecke
9f31468bd3 Add async cli_write_andx and cli_pull 2008-12-19 23:16:25 +01:00
Volker Lendecke
ae1d6020f0 Fix setting smb_len for huge write&x calls 2008-12-19 18:15:30 +01:00
Volker Lendecke
fa5f11279b Add the cli_wct_ofs routine to calculate the offset for write&x 2008-12-19 18:12:44 +01:00
Volker Lendecke
13eefa7c43 Add a doxygen comment line I forgot to merge 2008-12-19 17:50:34 +01:00
Volker Lendecke
1f04d07db0 Convert cli_request->outbuf to uint8_t 2008-12-19 17:47:30 +01:00