1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-13 13:18:06 +03:00
Commit Graph

121 Commits

Author SHA1 Message Date
Richard Sharpe
80728c7045 r616: Bug #1333.
Make sure we return an error code when things go wrong.
(This used to be commit 21cdb45b54)
2007-10-10 10:51:31 -05:00
Richard Sharpe
6a110a5d2b r588: Some fixes from coolo ...
I think that the ECONNREFUSED should probably be ENOENT.
(This used to be commit faa8cc18df)
2007-10-10 10:51:30 -05:00
Richard Sharpe
a6e6cd5691 r559: Some fixes from coolo ...
(This used to be commit d80e90d7c1)
2007-10-10 10:51:29 -05:00
Gerald Carter
3bbf2f1e0a r557: another patch from Stephan Kulow <coolo@suse.de> -- check cli * before dereferencing it
(This used to be commit c385fb467f)
2007-10-10 10:51:29 -05:00
Gerald Carter
04e8a07bb5 r494: patch from Stephan Kulow <coolo@kde.org> to fix a cut-n-paste error in strlen which caused Konqueror to crash
(This used to be commit 5150b62420)
2007-10-10 10:51:26 -05:00
Gerald Carter
7af3777ab3 r116: volker's patch for local group and group nesting
(This used to be commit b393469d95)
2007-10-10 10:51:10 -05:00
Gerald Carter
56ce613679 updating release notes & merging Derrel Lipman's libsmbclient patch from HEAD
(This used to be commit 5fbfaa687a)
2004-03-19 16:22:47 +00:00
Jeremy Allison
6b9dbbcd24 Modified fix for bugid #784. Based on a patch from moriyama@miraclelinux.com (MORIYAMA Masayuki).
Don't use nstrings to hold workgroup and netbios names. The problem with them is that MB netbios
and workgroup names in unix charset (particularly utf8) may be up to 3x bigger than the name
when represented in dos charset (ie. cp932). So go back to using fstrings for these but
translate into nstrings (ie. 16 byte length values) for transport on the wire.
Jeremy.
(This used to be commit b4ea493599)
2004-03-13 02:16:21 +00:00
Andrew Bartlett
5eee23cc64 auth/auth_util.c:
- Fill in the 'backup' idea of a domain, if the DC didn't supply one.  This
   doesn't seem to occour in reality, hence why we missed the typo.

lib/charcnv.c:
lib/smbldap.c:
libads/ldap.c:
libsmb/libsmbclient.c:
printing/nt_printing.c:
 - all the callers to pull_utf8_allocate() pass a char ** as the first
   parammeter, so don't make them all cast it to a void **

nsswitch/winbind_util.c:
 - Allow for a more 'correct' view of when usernames should be qualified
   in winbindd.  If we are a PDC, or have 'winbind trusted domains only',
   then for the authentication returns stip the domain portion.
 - Fix valgrind warning about use of free()ed name when looking up our
   local domain.  lp_workgroup() is maniplated inside a procedure that
   uses it's former value.  Instead, use the fact that our local domain is
   always the first in the list.

Andrew Bartlett
(This used to be commit 494781f628)
2003-12-31 00:31:43 +00:00
Richard Sharpe
15b14fc857 Put in a work-around for ENOTSUP not being defined on OpenBSD.
(This used to be commit ca3d98d08b)
2003-10-25 04:13:32 +00:00
Richard Sharpe
b0ead3a03d Apply latest of Derrell Lippman's changes to libsmbclient.
(This used to be commit 84e620e5ba)
2003-10-24 18:58:41 +00:00
Richard Sharpe
2f84a990bc Commit Derrell's changes to libsmbclient plus a small change to configure.in
to see if SGI and other platforms will build.
(This used to be commit cf9311044c)
2003-10-24 17:01:19 +00:00
Tim Potter
ec890d5c0f Enclose usage of st_blksize and st_blocks struct stat members in
#ifdef HAVE_STAT_ST_BLKSIZE and #ifdef HAVE_STAT_ST_BLOCKS,
respectively.

Fixes bug 550 reported by Joachim Schmitz <schmitz@hp.com>.
(This used to be commit 18adfdbe0c)
2003-10-14 03:56:42 +00:00
Jelmer Vernooij
ddf662d118 More merges from HEAD:
- Stephan Kulow's changes (fixing warnings in libsmbclient)
 - VFS modules
 - Seperating libs
(This used to be commit 6e9b780233)
2003-04-16 14:45:11 +00:00
Richard Sharpe
1551254432 Add some castiness for Don McCall.
(This used to be commit 57c860b41b)
2003-04-04 22:16:50 +00:00
Andrew Bartlett
63894f2b5a Merge fixes to libsmbclient (fstring/pstring) from HEAD.
Andrew Bartlett
(This used to be commit 6bf04c41ed)
2003-03-22 09:27:42 +00:00
Richard Sharpe
16925589eb Now that I am running config.developer, I decided to get rif of some warnings:
1. reboot in parse_reg and cli_reg was shadowing a definition on FreeBSD
   4.3 from system includes.

2. Added a bit of const to places.

3. Made sure internal functions were declared where needed.
(This used to be commit fd847aa936)
2003-01-13 20:04:40 +00:00
Andrew Bartlett
098c08ccab Merge from HEAD
- make configure check for the location of Heimdal KRB5 on suse systems
	- fix libsmbclient for new global_myname()
(This used to be commit 111b0405cf)
2002-11-13 07:04:00 +00:00
Jelmer Vernooij
6af2433ce6 Include ../include/libsmbclient.h instead of just libsmbclient.h - we don't want to include the globally installed libsmbclient.h - found by jht
(This used to be commit a7a54fc2c8)
2002-09-28 20:06:41 +00:00
Gerald Carter
a834a73e34 sync'ing up for 3.0alpha20 release
(This used to be commit 65e7b5273b)
2002-09-25 15:19:00 +00:00
Andrew Tridgell
e90b652848 updated the 3.0 branch from the head branch - ready for alpha18
(This used to be commit 03ac082dcb)
2002-07-15 10:35:28 +00:00
Tim Potter
ab13654dc9 Renamed get_nt_error_msg() to nt_errstr().
(This used to be commit 1f007d3ed4)
2002-03-17 04:36:35 +00:00
Tim Potter
57bd576445 getpid() -> sys_getpid()
(This used to be commit a3cea5e9ae)
2002-03-14 01:53:04 +00:00
Jeremy Allison
62299aa747 bcopy must DIE ! Stop people creeping use of bcopy back into the code
(and yes I know who you are..... :-).
Jeremy.
(This used to be commit 330b0df960)
2002-02-26 17:40:43 +00:00
Tim Potter
cd68afe312 Removed version number from file header.
Changed "SMB/Netbios" to "SMB/CIFS" in file header.
(This used to be commit 6a58c9bd06)
2002-01-30 06:08:46 +00:00
Tim Potter
9731bbe06d Removed unused static variable.
(This used to be commit 7c2d720593)
2002-01-25 04:26:16 +00:00
Richard Sharpe
7527ec3ffd Fix another memory leak spotted by Tom Jansen.
(This used to be commit 6e2c06a6e6)
2001-11-27 10:42:39 +00:00
Tim Potter
585d0efbc6 Got medieval on another pointless extern. Removed extern struct ipzero
and replaced with two functions:

	void zero_ip(struct in_adder *ip);
	BOOL is_zero_ip(struct in_addr ip);
(This used to be commit 778f5f77a6)
2001-11-26 03:11:44 +00:00
Jeremy Allison
f146325e7d W2K doesn't seem to respond to *#0 names in node status. Ensure name
lookup uses password server parameter when looking for PDCs.
Jeremy.
(This used to be commit 54c968913d)
2001-11-21 23:00:59 +00:00
Andrew Bartlett
cade294409 Fix up the build again...
Andrew Bartlett
(This used to be commit a34c07377b)
2001-11-21 05:19:13 +00:00
Richard Sharpe
7c74cc5cab Fix up libsmbclient in head.
Apply the patches from Tom Jansen, get rid of fprintfs and change them to
DEBUGs, etc ...
(This used to be commit 7ac404c853)
2001-11-21 03:55:59 +00:00
Richard Sharpe
15ca82215e Fix problems with lp_workgroup() being passed to routines that will modify
it and fix smb://<IP-addr>.
(This used to be commit ac2562a0fb)
2001-11-17 07:30:19 +00:00
Jeremy Allison
18ffa22657 Fix for @ in pathname from Kian Win.
Jeremy.
(This used to be commit 070fd5180f)
2001-10-22 02:50:20 +00:00
Simo Sorce
bcbd75f7ad move to SAFE_FREE()
(This used to be commit 48fc6a6cd5)
2001-09-17 03:33:37 +00:00
Andrew Tridgell
c76dd14040 it now all compiles - so try enabling it by default and see what explodes on the build farm
(This used to be commit 5bb7e4f0f6)
2001-09-04 10:57:29 +00:00
Andrew Tridgell
b031af348c converted another bunch of stuff to NTSTATUS
(This used to be commit 1d36250e33)
2001-08-27 19:46:22 +00:00
Andrew Tridgell
e8e98c9ea0 converted smbd to use NTSTATUS by default
major changes include:

- added NSTATUS type
- added automatic mapping between dos and nt error codes
- changed all ERROR() calls to ERROR_DOS() and many to ERROR_NT()
  these calls auto-translate to the client error code system
- got rid of the cached error code and the writebmpx code

We eventually will need to also:
- get rid of BOOL, so we don't lose error info
- replace all ERROR_DOS() calls with ERROR_NT() calls

but that is too much for one night
(This used to be commit 83d9896c1e)
2001-08-27 08:19:43 +00:00
Tim Potter
afbca61a28 Fixes for new client error api.
(This used to be commit 9c57e45d44)
2001-08-10 06:16:05 +00:00
Tim Potter
2ccfea3de7 A rewrite of the error handling in the libsmb client code. I've separated
out the error handling into a bunch of separate functions rather than all
being handled in one big function.

Fetch error codes from the last received packet:

    void cli_dos_error(struct cli_state *cli, uint8 *eclass, uint32 *num);
    uint32 cli_nt_error(struct cli_state *);

Convert errors to UNIX errno values:

    int cli_errno_from_dos(uint8 eclass, uint32 num);
    int cli_errno_from_nt(uint32 status);
    int cli_errno(struct cli_state *cli);

Detect different kinds of errors:

    BOOL cli_is_dos_error(struct cli_state *cli);
    BOOL cli_is_nt_error(struct cli_state *cli);
    BOOL cli_is_error(struct cli_state *cli);

This also means we now support CAP_STATUS32 as we can decode and understand
NT errors instead of just DOS errors.  Yay!

Ported a whole bunch of files in libsmb to use this new API instead of the
just the DOS error.
(This used to be commit 6dbdb0d813)
2001-08-10 06:00:33 +00:00
Andrew Tridgell
527e824293 strchr and strrchr are macros when compiling with optimisation in gcc, so we can't redefine them. damn.
(This used to be commit c41fc06376)
2001-07-04 07:36:09 +00:00
Andrew Tridgell
87fbb7092b The big character set handling changeover!
This commit gets rid of all our old codepage handling and replaces it with
iconv. All internal strings in Samba are now in "unix" charset, which may
be multi-byte. See internals.doc and my posting to samba-technical for
a more complete explanation.
(This used to be commit debb471267)
2001-07-04 07:15:53 +00:00
Richard Sharpe
8831dcd59d Fix a stupid typo ...
(This used to be commit 8a873b5dfb)
2001-06-27 04:06:13 +00:00
Richard Sharpe
87b5c37707 Fix up the problems with calling smbc_init multiple times.
(This used to be commit 832227a72b)
2001-06-07 22:17:01 +00:00
Richard Sharpe
eb40ad72ba Change EUCLEAN to EINVAL, as some systems do not have EUCLEAN, and EINVAL
is a better return code anyway (I knew that :-)
(This used to be commit 0bf2797b18)
2001-05-15 01:45:54 +00:00
Richard Sharpe
87f8d78fd7 More memory leaks fixed courtesy of Insure ...
(This used to be commit 4fc385ca68)
2001-03-28 14:45:57 +00:00
Richard Sharpe
5e0734417c One small Insure fix for a memory leak. More fixes to come perhaps ...
Also fixed an error return for smbc_rmdir so that we can distinguish
between EACCES and ENOTEMPTY
(This used to be commit f204901fcc)
2001-03-27 12:13:59 +00:00
Richard Sharpe
e8fcbc5df1 More SGI type fixes ...
(This used to be commit 26d7d8af29)
2001-03-09 05:47:48 +00:00
Richard Sharpe
2b22019e42 Fix the definition and implementation of smbc_lseekdir ...
(This used to be commit e628d80d1e)
2001-03-07 04:39:31 +00:00
Richard Sharpe
5bf5952fd6 Implement smbc_lseekdir, but it will have to change ... because it has the
wrong interface defn.
(This used to be commit 317e369c3e)
2001-03-06 14:00:48 +00:00
Richard Sharpe
134c0d27cc smb.h: add one error code for no such printer job
libsmbclient.c: fix problems with return codes on smbc_unlink_print_job
(This used to be commit 7557f9145c)
2001-03-05 13:34:48 +00:00
Richard Sharpe
1b476b12d9 Fix two problems identified by the test suite, one a major one
where I was indexing through a NULL pointer :-(
(This used to be commit 5f1ea70e11)
2001-03-01 19:21:57 +00:00
Richard Sharpe
00e4feec00 Fix some errors uncovered in libsmbclient by the test suite
Fix some problems with unused variables and reaching the end of a
  nonvoid function
(This used to be commit 44986f397a)
2001-02-26 11:53:22 +00:00
Andrew Tridgell
a8ab984078 the unicode conversion of our client code is complete enough to be
enabled by default

you can disable it by setting the environment variable CLI_FORCE_ASCII
(This used to be commit 4d59c08c5e)
2001-02-21 03:40:20 +00:00
Richard Sharpe
2e99f0f8d3 Opps, last one did not commit the correct changes ... Here they are.
This now uses a lookup on <DOMAIN><1D> and then does a name status query to
the IP address returned to find the name of the server. Seems to work well
against Samba, Win9X, WinNT and Win2K.
(This used to be commit debb723194)
2001-02-19 05:50:09 +00:00
Richard Sharpe
0293869b1f Fixes to libsmbclient so it will work when browsing real Windows systems which
only respond to port 138 when dealing with NetBIOS datagrams.

We use the unexpected packed database.
(This used to be commit 620cc34015)
2001-02-18 10:36:03 +00:00
Richard Sharpe
167a7d76d9 Added commented/documented version of libsmbclient.h and fixed up a small
problem in libsmbclient.c where we no longer pass the workgroup.
(This used to be commit 3c66114346)
2001-02-12 12:17:54 +00:00
Richard Sharpe
5455f2896f Fix problems in libsmbclient with pring job struct plus add implementation
of last two print routines ...
(This used to be commit 7c50af3b71)
2001-02-06 19:25:12 +00:00
Richard Sharpe
ca03ad79cf Implement two printing related functions and start the remaining two.
(This used to be commit c19559a286)
2001-02-05 13:02:20 +00:00
Richard Sharpe
2fd7e6e6a0 Fix some further small bugs in libsmbclient to make it pass the
Caldera test suite and start to add the printing routines.
(This used to be commit 838cfad404)
2001-02-04 19:48:26 +00:00
Richard Sharpe
b370588b9c Fix some bugs and prepare for some other bug fixes ...
(This used to be commit 4ae7812353)
2001-01-29 09:34:24 +00:00
Richard Sharpe
d53f9716bb Fix a problem with smbc_unlink on directories where it was returning EACCES
instead of EPERM and a problem with SMBC_OPEN where it ignored an error
from the underlying cli_open routine and cheerfully returned a bogus FD.
(This used to be commit 68614bac5a)
2001-01-24 12:32:20 +00:00
Richard Sharpe
552d6bce08 Fixed bugs relating to Win2K and the need for a codepage so that unicode
strings can be handled correctly.
(This used to be commit 5629b097d4)
2001-01-14 00:11:29 +00:00
Richard Sharpe
338fd23290 Some more bug fixes plus implementations of smbc_mkdir and smbc_rmdir,
both tested ...

More later.
(This used to be commit 66bb40153a)
2001-01-12 12:48:55 +00:00
Richard Sharpe
fb40134446 Many bug fixes to the libsmbclient.c code plus
- an implementation of smbc_readdir
  - extensions to tree.c to show files in a second window
  - changes to auth_fn to provide buffers for username, password, etc
    from caller rather than callee
(This used to be commit 7f559c1a73)
2001-01-12 05:10:45 +00:00
Richard Sharpe
8788aea643 Add support for logging to wherever smb.conf specifies.
(This used to be commit cc5a2db8a0)
2001-01-08 02:47:30 +00:00
Richard Sharpe
bdb2c12d2e More bug fixen ...
(This used to be commit a13b5ef7bb)
2001-01-07 13:07:26 +00:00
Richard Sharpe
c6d5280a54 More fixes and implementation bits and pieces for libsmbclient
(This used to be commit 991f6907ac)
2001-01-07 07:10:50 +00:00
Richard Sharpe
34fea75f35 Fix some more bugs in libsmbclient.c and add functionality to tree.c
(This used to be commit d6cef8877a)
2001-01-06 14:48:55 +00:00
Richard Sharpe
a0feaf62b7 Fix a minor problem with listing servers in a workgroup and add a
gtk+ test application that tests out some of this stuff ...
(This used to be commit 606c4aecea)
2001-01-06 12:15:46 +00:00
Richard Sharpe
b6e811b90b The latest changes to libsmbclient ...
It can now do a directory listing for workgroups, servers, and shares, and,
with a bit more effort, it will be able to list directories and files.

I also does not request a username and password for the IPC$ share, but it
should if the first attempt to connect fails.
(This used to be commit 38ff91c505)
2001-01-05 13:43:19 +00:00
Richard Sharpe
b87c484051 First pass at the libsmbclient code ...
This code handles the basic stuff and compiles and links under Linux, but
I do not know about any other operating systems. Now onto directory
listing routines, including those that list workgroups, servers, etc.

Nothing is built automatically yet, you have to make client/testsmbc to build
the library and test program. Also, no make install targets are defined for
libsmbclient.so as yet, either.

Would be good if people test on operating systems other than Linux.
(This used to be commit 51c0436a50)
2000-12-26 05:57:10 +00:00