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

90 Commits

Author SHA1 Message Date
Jelmer Vernooij
b2edf254ed sync 3.0 branch with head
(This used to be commit 3928578b52)
2002-08-17 17:00:51 +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
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
Andrew Tridgell
8cec5cf35f first step in converting the head branch to use lang_tdb.c instead
of gettext for internationalisation support. There is more to do
(This used to be commit ab7f67677a)
2001-10-11 08:40:42 +00:00
Simo Sorce
52341e94a8 initial support to error report in smbclient, useful when using smbclient -c in scripts.
Thanks to Claudio Cicali aka FleXer for the initial patch
(This used to be commit 53b95b3c0f)
2001-10-09 19:12:18 +00:00
Tim Potter
dc1fc3ee8e Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header.
(This used to be commit 2d0922b0ea)
2001-10-02 04:29:50 +00:00
Simo Sorce
77bdea1b95 move to SAFE_FREE()
(This used to be commit 29db6ef7a7)
2001-09-17 00:52:47 +00:00
Andrew Tridgell
b12a4dd9b6 declare dbf in one spot
(This used to be commit f41c3bb80f)
2001-09-10 12:14:18 +00:00
Andrew Tridgell
b30e75692d replaced stdio in many parts of samba with a XFILE. XFILE is a cut-down
replacemnt of stdio that doesn't suffer from the 8-bit filedescriptor
limit that we hit with nasty consequences on some systems

I would eventually prefer us to have a configure test to see if we need
to replace stdio, but for now this code needs to be tested widely so
I'm enabling it by default.
(This used to be commit 1af8bf34f1)
2001-09-10 11:08:57 +00:00
Andrew Tridgell
11ce0f4d2d a bunch of fixes from the sflight to seattle
in particular:
 - fixed NT status code for a bunch of ops
 - fixed handling of protocol levels in ms_fnmatch
(This used to be commit 3eba9606f7)
2001-08-20 05:15:26 +00:00
Simo Sorce
2e783a4707 this is a big global fix for the ptr = Realloc(ptr, size) bug.
many possible mem leaks, and segfaults fixed.

someone should port this fix to 2.2 also.
(This used to be commit fa8e55b8b4)
2001-08-12 17:30:01 +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
Andrew Tridgell
91b8a8d1d2 next_token() was supposed to be a reentrant replacement for strtok(),
but the code suffered from bitrot and is not now reentrant. That means
we can get bizarre behaviour
i've fixed this by making next_token() reentrant and creating a
next_token_nr() that is a small non-reentrant wrapper for those lumps
of code (mostly smbclient) that have come to rely on the non-reentrant
behaviour
(This used to be commit 674ee2f1d1)
2001-06-21 09:10:42 +00:00
Jeremy Allison
4e35283a8b Fix for smbtar race condition from Glenn Burkhardt <glenn@aoi.ultranet.com>.
Jeremy.
(This used to be commit 0c9a92a055)
2001-03-26 22:34:25 +00:00
Jeremy Allison
8d26523e90 Tar fixes from Craig Barratt craig@arraycomm.com.
Jeremy.
(This used to be commit cf05709ec3)
2000-11-22 23:06:29 +00:00
Andrew Tridgell
700f72453e - removed all our old wildcard matching code and replaced it with a
call to ms_fnmatch(). This also removes all the Win9X semantics stuff
and a bunch of other associated cruft.

- moved the stat cache code into statcache.c

- fixed the uint16 alignment requirements of ascii_to_unistr() and
  unistr_to_ascii()

- trans2 SMB_FIND_FILE_BOTH_DIRECTORY_INFO returns the short name as
  unicode always (at least thats what NT4 does)

- fixed some errors in the in-memory tdb code. Still ugly, but doesn't
  crash as much
(This used to be commit 03e9cea004)
2000-04-30 11:04:28 +00:00
Jeremy Allison
d867b86721 Second set of inline optimisation fixes from Ying Chen <ying@almaden.ibm.com>.
Stop makeing function calls for every use of skip_multibyte_char. This function
is called several *million* times during a NetBench run :-).
Jeremy.
(This used to be commit e5a3deba46)
2000-01-26 00:12:35 +00:00
Andrew Tridgell
e8b5cb4515 cli_open() wasn't handling DENY_FCB or O_WRONLY correctly.
After fixing that I needed to use O_RDWR instead of O_WRONLY in
several places to avoid the silly bug in MS servers that doesn't allow
getattrE on a file opened with O_WRONLY
(This used to be commit e21aa4cb08)
2000-01-08 10:15:53 +00:00
Andrew Tridgell
3db52feb1f first pass at updating head branch to be to be the same as the SAMBA_2_0 branch
(This used to be commit 453a822a76)
1999-12-13 13:27:58 +00:00
Alexandre Oliva
a8aff598f4 declare ttarf as double, as in client.c
(This used to be commit dfcfeb743a)
1999-03-30 10:41:07 +00:00
Alexandre Oliva
d963fb524c use double instead of SMB_BIG_UINT for dir_total and ttarf
(by tridge, merged from branch)
(This used to be commit b482ac8fc4)
1999-03-30 10:25:20 +00:00
Alexandre Oliva
1db113b0a2 * client/client.c (dir_total): use SMB_BIG_UINT
* client/clitar.c (ttarf): ditto
* * lib/snprintf.c: support long longs; adapted from Cloyce D. Spradling's
patch <cloyce@headgear.org>
(This used to be commit 29581f8486)
1999-03-25 20:21:01 +00:00
Luke Leighton
91403ea47d %s not $s
(This used to be commit 62118e15fe)
1999-02-03 16:30:54 +00:00
Richard Sharpe
8dac09c5a1 A small change to clitar.c (really, I promise :-)
If we are writing the tar file to stdout, set dbf to stderr
so that we do not screw up tar output with log info etc.

Compiles clean and tested with 38MB backup. Honest :-)
(This used to be commit 57301a3eb4)
1999-01-17 01:03:52 +00:00
Richard Sharpe
ddfe1d35fc Fixed problems in debug code because I did not compile
first :-(
(This used to be commit 47e36bed8f)
1998-12-19 02:08:35 +00:00
Richard Sharpe
a7e4be0e78 Added some debugging to clitar ...
(This used to be commit b75af70990)
1998-12-19 01:43:24 +00:00
Jeremy Allison
d5791b826d Fixed tar recurse bug.
Jeremy.
(This used to be commit 7be5c8e8f7)
1998-12-17 22:44:56 +00:00
Jeremy Allison
768761820e Added the same open()/fopen()/creat()/mmap() -> sys_XXX calls.
Tidied up some of the mess (no other word for it). Still doesn't
compile cleanly. There are calls with incorrect parameters that
don't seem to be doing the right thing.

This code still needs surgery :-(.

Jeremy.
(This used to be commit 18ff93a9ab)
1998-11-17 20:50:07 +00:00
Andrew Tridgell
c57ab7807d fixed setmode in smbclient
(This used to be commit c58f496510)
1998-11-14 04:08:19 +00:00
Andrew Tridgell
fedc62d17a - handle servers that don't support getattrE (ie. NT)
- use * in clitar instead of *.*
(This used to be commit 2d9335fe2a)
1998-11-14 03:53:24 +00:00
Jeremy Allison
8fc1504ff8 Makefile.in configure configure.in include/config.h.in: Changes for DGUX and UNIXWARE.
groupdb/aliasdb.c groupdb/aliasfile.c groupdb/groupfile.c: Don't use snprinf, use slprintf.
include/includes.h: Fix YP problem.
include/smb.h: Fix ZERO_STRUCTP.
lib/util_sock.c: Added strerror() in debugs.
passdb/ldap.c: Don't use snprinf, use slprintf.
rpc_client/cli_lsarpc.c rpc_client/cli_pipe.c rpc_parse/parse_sec.c rpc_server/srv_pipe.c: Don't use snprinf, use slprintf.
script/installman.sh: DGUX changes.
smbd/open.c smbd/oplock.c: Fixed gcc warnings.
web/swat.c: Changes USER to SWAT_USER.
(This used to be commit 4c2b5a0098)
1998-11-13 21:41:01 +00:00
Jeremy Allison
e4f974c611 Makefile.in: Removed rpc_server/srv_ldap_helpers.c per J.F.'s instructions.
client/client.c:
client/clitar.c:
include/client.h:
smbwrapper/smbw_dir.c:
smbwrapper/smbw_stat.c:
smbwrapper/smbw.c:
lib/util.c: Converted all use of 'mode' to uint16.
smbd/quotas.c: Fixed stupid comment bug I put in there :-(.
printing/printing.c: Fix from J.F. to new code.
Jeremy.
(This used to be commit bacd3e9d20)
1998-11-09 20:33:37 +00:00
Andrew Tridgell
8c62b28e0e converted smbclient to use clientgen.c rather than clientutil.c
I did this when I saw yet another bug report complaining about
smbclient intermittently missing files. Rather than applying more
patches to smbclient it was better to move to the more robust
clientgen.c code.

The conversion wasn't perfect, I probably lost some features of
smbclient while doing it, but at least smbclient should be consistent
now. It if fails it should _always_ fail rather than giving people the
false impression of a reliable utility.

the tar stuff seems to work, but hasn't had much testing as I never
use it myself. I'm sure someone will find bugs in my conversion of
smbtar.c. It was quite tricky as it did a lot of its own SMB calls. It
now uses clientgen.c exclusively.

smbclient is still quite messy, but at least it doesn't build its own
SMB packets.

I haven't touched smbmount as I never use it. Mike, do you want to
convert smbmount to use clientgen.c?
(This used to be commit e14ca7765a)
1998-11-09 03:45:49 +00:00
Andrew Tridgell
fe2681dd4b fixed a cast warning
(This used to be commit 4093bb16d2)
1998-10-05 12:34:43 +00:00
Richard Sharpe
832ca93117 Added E Jay Berkenbilt's fixes
(This used to be commit fcdc9bc208)
1998-10-04 07:09:38 +00:00
Jeremy Allison
f82217a589 Fixed extern definition of cnum in clitar.c
Jeremy
(This used to be commit 6c08f3b81c)
1998-09-29 22:52:38 +00:00
Jeremy Allison
cf3a9741dc Changes to test in configure if capabilities are enabled on a system.
Changes to get Samba to compile cleanly with the IRIX compiler
with the options : -fullwarn -woff 1209,1174 (the -woff options
are to turn off warnings about unused function parameters and
controlling loop expressions being constants).
Split prototype generation as we hit a limit in IRIX nawk.
Removed "." code in smbd/filename.c (yet again :-).
Jeremy.
(This used to be commit e0567433bd)
1998-09-28 21:43:48 +00:00
Richard Sharpe
1ea570da83 Small update to clitar.c to omit warnings about servers not
letting us change the date unless tar_real_noisy is True.

Also updated a few places where variables are declared but not set.
(This used to be commit b46f1024c9)
1998-09-26 00:41:20 +00:00
Richard Sharpe
921b171acf Added a minor fix to clitar.c for a bug.
Could not check that it compiles clean with Jeremy's -Wflags because
someone loaded some changes to reply.c that break in the locking area

:-(
(This used to be commit b18cd03c0b)
1998-09-24 13:43:36 +00:00
Richard Sharpe
474110e3e0 Fixed data corruption bugs in clitar.c with restores.
Have tested against samba with clitar using a hard-coded
max_xmit of 2920, since max smit = 2920 does not seem to work in
the smb.conf file.

Will have to test correctly against Win95 and WinNT now.

Have also compiled with -WJeremy'sFlags and get no more warnings
after I removed an unused variable.
(This used to be commit f24bbaccda)
1998-09-23 14:37:01 +00:00
Jeremy Allison
242d068297 Fixed up warnings in new client code.
Note to coders. If using gcc please use the compiler flags :
-Wall -Werror -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual
*before* checking anything in to ensure a clean compile.
Jeremy.
(This used to be commit 1daf424da6)
1998-09-23 00:57:34 +00:00
Alexandre Oliva
81babe9b0d implemented du and tar -n
(This used to be commit 23484508a8)
1998-09-21 08:45:11 +00:00
Richard Sharpe
b65bbdeefc Fixed changes in clitar.c that Jeremey noted. One change was
correct, the other needed slightly changing.

Now to test it is all OK :-)
(This used to be commit d54c91598c)
1998-09-19 04:25:10 +00:00
Jeremy Allison
717f538e2e Fixed compile errors in new code.
Jeremy.
(This used to be commit dbd8ce8a70)
1998-09-18 17:32:35 +00:00
Richard Sharpe
c198d4c8be Adding rewritten restore code ... Old code is still there
surrounded by a OLD_DOTARPUT.
(This used to be commit 00ba54d4ee)
1998-09-18 12:47:46 +00:00
Jeremy Allison
9b20e5bac2 Ok so with this bugfix 64 bit file access actually seems to work :-).
Problems were just dumb bugs like (defining sys_lseek to return 'int' DOH !).

Jeremy.
(This used to be commit 54dd51176f)
1998-09-11 21:42:18 +00:00
Andrew Tridgell
e9ea36e4d2 tridge the destroyer returns!
prompted by the interpret_security() dead code that Jean-Francois
pointed out I added a make target "finddead" that finds potentially
dead (ie. unused) code. It spat out 304 function names ...

I went through these are deleted many of them, making others static
(finddead also reports functions that are used only in the local
file).

in doing this I have almost certainly deleted some useful code. I may
have even prevented compilation with some compile options. I
apologise. I decided it was better to get rid of this code now and add
back the one or two functions that are needed than to keep all this
baggage.

So, if I have done a bit too much "destroying" then let me know. Keep
the swearing to a minimum :)

One bit I didn't do is the ubibt code. Chris, can you look at that?
Heaps of unused functions there. Can they be made static?
(This used to be commit 2204475c87)
1998-09-05 05:07:05 +00:00
Jeremy Allison
7bb86c1b13 Ok - this is the 64 bit widening check in. It changes the configure
to check for stat64 and friends, and then changes much of Samba
to use the data type SMB_OFF_T for file size information.

stat/fstat/lstat/lseek/ftruncate have now become sys_stat etc. to hide
the 64 bit calls if needed.

Note that this still does not expose 64 bit functionality to the
client, as the changes to the reply_xxx smb's are not yet done.

This code change should make these changes possible.

Still to do before full 64 bit-ness to the client:

fcntl lock code.
statfs code
widening of dev_t and ino_t (now possible due to SMB_DEV_T and SMB_OFF_T
types being in place).

Let me know if wierd things happen after this check-in and I'll
fix them :-).

Jeremy.
(This used to be commit 14500936c3)
1998-09-03 18:40:31 +00:00
Jeremy Allison
1855627413 More abstraction of file system data types, to move to a 64
bit file interface for the NT SMB's.

Created a new define, SMB_STRUCT_STAT that currently is
defined to be struct stat - this wil change to a user
defined type containing 64 bit info when the correct
wrappers are written for 64 bit stat(), fstat() and lstat()
calls.

Also changed all sys_xxxx() calls that were previously just
wrappers to the same call prefixed by a dos_to_unix() call
into dos_xxxx() calls. This makes it explicit when a pathname
translation is being done, and when it is not.

Now, all sys_xxx() calls are meant to be wrappers to mask
OS differences, and not silently converting filenames on
the fly.

Jeremy.
(This used to be commit 28aa182dbf)
1998-09-01 20:11:54 +00:00