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

568 Commits

Author SHA1 Message Date
Jeremy Allison
2f194322d4 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.
(This used to be commit f755711df8)
2002-11-12 23:20:50 +00:00
Jeremy Allison
250c980119 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.
(This used to be commit 82b8f749a3)
2002-11-12 23:15:52 +00:00
Jelmer Vernooij
5e39c988f6 Remove testsmbc.c from source/ in 3.0 as well. It's already in examples/
(This used to be commit c1b3cffb3f)
2002-11-10 11:42:51 +00:00
Andrew Bartlett
017eec27bc Merge append_log fix from HEAD
(This used to be commit 2e33865417)
2002-11-09 23:18:25 +00:00
Andrew Bartlett
a0dd6128bf Kill append_log from smbmount (thanks vance for reminding me).
Andrew Bartlett
(This used to be commit 7501b2a518)
2002-11-09 23:17:01 +00:00
Jelmer Vernooij
dc5297f413 Sync with HEAD
(This used to be commit 1a25dc776d)
2002-11-09 16:57:45 +00:00
Jelmer Vernooij
a3090f0cc8 Move testsmbc.c to examples
(This used to be commit fdd70614d2)
2002-11-04 17:11:18 +00:00
Jelmer Vernooij
1bd97040d1 Sync with HEAD
(This used to be commit 987b62137d)
2002-10-29 17:21:59 +00:00
Jelmer Vernooij
9cfa18208b Don't encourage people to use -P - it's obsolete
(This used to be commit 59ecac901a)
2002-10-18 23:27:49 +00:00
Jeremy Allison
389a16d9d5 Added new error codes. Fix up connection code to retry in the same way
that app-head does.
Jeremy.
(This used to be commit b521abd86b)
2002-10-17 17:10:29 +00:00
Jeremy Allison
c53eb2ed54 Added new error codes. Fix up connection code to retry in the same way
that app-head does.
Jeremy.
(This used to be commit ec7953f201)
2002-10-17 17:10:24 +00:00
Andrew Bartlett
3a5577e552 Patch from Steve Langasek <vorlon@netexpress.net> to use nice big integers when
attempting to calculate the bytes/second being transferred.  (Avoid overflow
etc)

Andrew Bartlett
(This used to be commit cd41e5ab85)
2002-10-03 03:27:00 +00:00
Gerald Carter
f2d1f19a66 syncing up with HEAD. Seems to be a lot of differences creeping in
(i ignored the new SAMBA stuff, but the rest of this looks like it should
have been merged already).
(This used to be commit 3de09e5cf1)
2002-10-01 18:26:00 +00:00
Richard Sharpe
ed521b0cc4 Make sure that variable does not shadow a parameter.
(This used to be commit d83cae2bbd)
2002-09-29 06:44:13 +00:00
Richard Sharpe
6fa3f56e0a Commit a fix to smbclient so that it will connect to EMCs and NetApp's machines.
(This used to be commit 1e4ac9615d)
2002-09-28 03:38:37 +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
Tim Potter
af78eafa6c Don't uppercase the username and domain in a session setup.
(This used to be commit 0ad19825df)
2002-09-23 21:24:31 +00:00
Volker Lendecke
4af9c9ce3b Fixed a little, long standing bug: smbclient -M <name> should resolve
name#03, not name#20.

Volker
(This used to be commit 99017e887e)
2002-09-05 11:40:06 +00:00
Simo Sorce
05876f8bcd fix wrong check
(This used to be commit cb0ed2faa5)
2002-08-28 16:01:42 +00:00
Jeremy Allison
c3d707b088 Remove strsep - non portable.
Jeremy.
(This used to be commit 03c49b2e51)
2002-08-27 16:48:58 +00:00
Simo Sorce
8f6c926a8f add a trivial seeking function to xfile (tseek) that does not do SEEK_CUR
and add commands reget and reput to smbclient that continues a transfer that has been onterrupted.

thanks to josef Zlomek that did the original patch.
(This used to be commit b275547c9e)
2002-08-27 09:07:08 +00:00
Simo Sorce
ca0345623d fix typos
thanks Josef Zlomek
(This used to be commit fb32fd99b9)
2002-08-20 21:21:56 +00:00
Jelmer Vernooij
b2edf254ed sync 3.0 branch with head
(This used to be commit 3928578b52)
2002-08-17 17:00:51 +00:00
Andrew Bartlett
6ddba1e99b Fix the %m security bug again - and try to make it harder to reintroduce in
future.

This moves us from fstrcpy() and global variables to 'get' and 'set' functions.

In particular, the 'set' function sainity-checks the input, in the same way as
we always have.

Andrew Bartlett
(This used to be commit e57a896f06)
2002-08-10 23:20:04 +00:00
Andrew Tridgell
80c39a9c1f fix for smbtar filename matching
samba-patches 852
(This used to be commit e2558baa32)
2002-07-28 07:53:14 +00:00
Andrew Bartlett
a6a612a814 Looks like I missed this earlier. We should connect as the specified workgroup
- sombody using smbspool won't always have a full smb.conf, and this is how it
was written in the first place anyway.

Again, found by the IRIX compiler.

Andrew Bartlett
(This used to be commit 3118115876)
2002-07-21 01:20:28 +00:00
Andrew Bartlett
29075c97d3 More fixes towards warnings on the IRIX compiler
(and yes, some of these are real bugs)

In particular, the samr code was doing an &foo of various types, to a function
that assumed uint32.  If time_t isn't 32 bits long, that broke.

They are assignment compatible however, so use that and an intermediate
variable.

Andrew Bartlett
(This used to be commit 30d0998c8c)
2002-07-20 13:02:47 +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
Andrew Bartlett
04538bfb6c Make smbmnt a standalone program from a linker point of view. Hopefully this
will make it easier to prove this package correct from an audit point of view.

smbumount to follow, but it uses pstrcpy() so I'll need to decide what to do
with that.

Andrew Bartlett
(This used to be commit 62c56f9724)
2002-07-13 09:14:40 +00:00
Andrew Tridgell
ebfff1a475 - fixed a crash bug for 'print -'
- removed an unused variable
(This used to be commit 66af95716d)
2002-07-13 03:51:28 +00:00
Andrew Tridgell
3e63f3e106 fixed a prototype problem in client.c
(This used to be commit 922ab73c3c)
2002-07-02 01:35:07 +00:00
Andrew Tridgell
9930b0b065 used findstatic.pl to make some variables static and remove some dead
code
(This used to be commit 91ad9041e9)
2002-07-01 09:12:41 +00:00
Andrew Bartlett
0746576113 Update cli_full_connection() to take a 'flags' paramater, and try to get a
few more places to use it.

Andrew Bartlett
(This used to be commit 23689b0746)
2002-06-25 08:57:24 +00:00
Andrew Bartlett
e3958c2105 And another .cvsignore
(This used to be commit fa0037a294)
2002-06-25 08:34:17 +00:00
Andrew Bartlett
0327428f27 Break up samba's object dependencies, and its prototype includes.
Now smbclient, net, and swat use their own proto files - now the global
proto.h

The change to libads/kerberos.c was to break up the dependency on secrets.c -
we want to be able to write an ADS client that doesn't need local secrets.

I have other breakups in the works - I will remove the dependency of
rpc_parse on passdb (and therefore secrets.c) shortly.

(NOTE:  This patch does *not* break up includes.h, or other such forbidden
actions).

Andrew Bartlett
(This used to be commit edb41dad2d)
2002-06-25 02:29:09 +00:00
Gerald Carter
0c7925e429 removed compiler warning
(This used to be commit 73ba155a6b)
2002-06-25 00:22:21 +00:00
Andrew Bartlett
eed5094264 This removes --with-ssl from Samba.
This option was badly maintained, useless and confused our users and
distirbutors.  (its SSL, therfore it must be good...)

No windows client uses this protocol without help from an SSL tunnel.

I can't see any reason why setting up a unix-side SSL wrapper would
be any more difficult than the > 10 config options this mess added
to samba in any case.

On the Samba client end, I think the LIBSMB_PROG hack should be
sufficient to start stunnel on the unix side.  We might extend this
to take %i and %p (IP and port) if there is demand.

Andrew Bartlett
(This used to be commit b04561d3fd)
2002-05-17 12:42:39 +00:00
Gerald Carter
615e607194 segfault fix merged from SAMBA_2_2
(This used to be commit d3388d1953)
2002-05-14 14:01:47 +00:00
Tim Potter
57bd576445 getpid() -> sys_getpid()
(This used to be commit a3cea5e9ae)
2002-03-14 01:53:04 +00:00
Jeremy Allison
69adbb0ce3 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.
(This used to be commit 3af16ade17)
2002-01-31 23:26:12 +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
Martin Pool
8f5fa6871f Doc.
(This used to be commit 91e8cb7662)
2002-01-29 05:34:16 +00:00
Martin Pool
2a2f4a24f7 Make the -L option to smbclient slightly less gross:
smbclient -L //nautilus1/

should definitely not say "unknown host "nautilus1/".  Sheesh.
(This used to be commit 1cd431b8f1)
2002-01-21 06:42:45 +00:00
Simo Sorce
7019bfe546 fixes (asprintf) from 2.2
(This used to be commit 6b123adda9)
2002-01-19 17:29:32 +00:00
Andrew Bartlett
350161d44b Move the bang (!) command back to the bottom of the list, allowing smbclient
to function again.

Add comment to warn anybody that wants to 'Alphabetize' the list to read crh's
existing comment on the issue.

Andrew Bartlett
(This used to be commit d123d79060)
2002-01-17 07:14:21 +00:00
Jeremy Allison
1cd8c9c41f Alphabetize.
Jeremy.
(This used to be commit 64301bc5f7)
2002-01-16 20:25:23 +00:00
Jeremy Allison
0173911b46 Added CIFS UNIX extension code to client.
Jeremy.
(This used to be commit 794c3e2c76)
2002-01-16 20:13:28 +00:00
Martin Pool
b8b7ab052a browse_fn: FIXME: If the remote machine returns non-ascii characters
in any of these fields, they can corrupt the output.  We
	   should remove them.
(This used to be commit 934aacdb39)
2002-01-10 03:53:06 +00:00
Martin Pool
a56f0e93ea FIXME: At the moment, if the user should happen to give the options
ahead of the service name (in standard Unix fashion) then smbclient
just spits out the usage message with no explanation of what in
particular was wrong.  Is there any reason we can't just parse out the
service name and password after running getopt??
(This used to be commit 5f6feb55d7)
2002-01-09 08:17:12 +00:00
Herb Lewis
f1256e847e merge changes from 2.2 branch to prevent smb.conf from changing debug level
of commands when specified on command line.
(This used to be commit 39d6b31e14)
2002-01-07 21:32:22 +00:00
Andrew Bartlett
69d6c9fe1a One line fix to get smbmount working again.
This just turns of SPNGO becouse Win2k breaks if you attempt this and DOS
errors at the same time.

Andrew Bartlett
(This used to be commit 2c09907b53)
2002-01-05 03:45:50 +00:00
Andrew Tridgell
caaac2803a - handle kerberos session setup reply with broken null termination
- don't display Domain=[] for auth protocols that don't give us a domain
(This used to be commit 20368455ea)
2001-12-21 12:29:51 +00:00
Jeremy Allison
9ed10f83d7 Removed global debugf. Replaced with lp_set_logfile(name).
Fixed winbindd to finally stop leaving log. file droppings :-).
Jeremy.
(This used to be commit 0bea6cf79a)
2001-12-20 22:27:05 +00:00
Jeremy Allison
22f25edb8e Fix for extra capabilities from Urban Widmark <urban@teststation.com>.
Jeremy.
(This used to be commit e943ace4f0)
2001-12-19 03:14:54 +00:00
Jeremy Allison
9648cd0c0f Patch from dan_thibadeau@hp.com to allow domain set in authfile.
Jeremy.
(This used to be commit 5700cbbd3f)
2001-12-19 02:50:44 +00:00
Andrew Tridgell
f6b962fba3 fixed some krb5 ifdefs
(This used to be commit 23ef22f117)
2001-11-28 23:54:07 +00:00
Andrew Tridgell
eec9e8a052 fix a bunch of places where we can double-free a cli structure
(This used to be commit e2ba2383c9)
2001-11-28 03:56:30 +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
Tim Potter
9aa4342bae Fixed compiler warnings and dyn_CONFIGFILE related breakage.
(This used to be commit bf491d2aa2)
2001-11-26 01:59:33 +00:00
Andrew Tridgell
ad2974cd05 added "net join" command
this completes the first stage of the smbd ADS support
(This used to be commit 058a5aee90)
2001-11-24 14:16:41 +00:00
Tim Potter
79b34d1b11 Removed TimeInit() call from every client program (except for one place
in smbd/process.c where the timezone is reinitialised.  Was replaced with
check for a static is_initialised boolean.
(This used to be commit 8fc772c9e5)
2001-11-23 00:52:29 +00:00
Martin Pool
5b1fb34731 Rename xmalloc, xmemdup, xstrdup to smb_$1 to avoid conflicts with the
versions defined by libreadline on SCO (!).
(This used to be commit 32480d7aff)
2001-11-20 06:38:09 +00:00
Martin Pool
f741f65673 Store some path names in global variables initialized to configure
default, rather than in preprocessor macros.
(This used to be commit 79ec88f0da)
2001-11-19 02:49:53 +00:00
Andrew Bartlett
015aa4244b Return 1 (rather than 0) on failure. This may well help get the build farm
back into order, becouse its the inverse tests that are 'failing' - they get
error 0 back and think that we just let sombody in without a password and the
like.

Andrew Bartlett
(This used to be commit 83c2d79774)
2001-11-02 11:31:49 +00:00
Jim McDonough
11d830c533 Remove xstrdup since it was added to lib/util.c. Caused compile failure
(This used to be commit 43c384fa78)
2001-10-24 17:58:03 +00:00
Jeremy Allison
b49b5b9481 client : Fixed error return.
uid.c: Added missing void.
Jeremy.
(This used to be commit c2e06ed221)
2001-10-19 00:02:36 +00:00
Andrew Tridgell
9f7cb41f11 added NTLMSSP authentication to libsmb. It seems to work well so I have enabled it by default if the server supports it. Let me know if this breaks anything. Choose kerberos with the -k flag to smbclient, otherwise it will use SPNEGO/NTLMSSP/NTLM
(This used to be commit 076aa97bee)
2001-10-12 04:49:42 +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
Andrew Tridgell
81f56139b6 initial kerberos/ADS/SPNEGO support in libsmb and smbclient. To
activate you need to:

- install krb5 libraries
- run configure
- build smbclient
- run kinit to get a TGT
- run smbclient with the -k option to choose kerberos auth
(This used to be commit d330575856)
2001-10-11 07:42:52 +00:00
Simo Sorce
e1e689debc ops, remove my test code, sorry.
fix some return codes missed in previous commit.
(This used to be commit de70a56e04)
2001-10-10 07:51:20 +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
Christopher R. Hertel
9a22ac94a4 I told Jeremy at the CIFS conference that I would sort the command list
in smbclient.  Done.  I had a little trouble because the "!" command is
a special case and must be listed last.  Awkward.

Chris -)-----
(This used to be commit 14bfd9107a)
2001-09-30 06:49:44 +00:00
Jeremy Allison
b54692bea7 smbmount fixes from Urban.
Jeremy.
(This used to be commit 73ec939239)
2001-09-20 21:06:02 +00:00
Simo Sorce
77bdea1b95 move to SAFE_FREE()
(This used to be commit 29db6ef7a7)
2001-09-17 00:52:47 +00:00
Simo Sorce
e2d393bd24 introduce SAFE_FREE() macro as suggested by andreas moroder.
(This used to be commit b7edd55885)
2001-09-17 00:47:40 +00:00
Andrew Bartlett
b0c3915d5e Fix compile warnings on IRIX's cc.
(This used to be commit 5b369bce69)
2001-09-16 08:29:03 +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
381b245d79 fixed typo
(This used to be commit 160906b57d)
2001-09-09 03:18:23 +00:00
Andrew Tridgell
444a01d265 removed pointless parameter from readfile()
(This used to be commit 0742342ec4)
2001-09-09 02:43:30 +00:00
Andrew Tridgell
5573a1c739 added "display charset" option in smb.conf, along with d_printf()
which should now be used instead of DEBUG(0) or printf() for
interactive messages

I have only converted client.c to use d_printf(), and the code hasn't
had much testing yet. Eventually we want all interactive code to use
d_printf(), plus SWAT
(This used to be commit 266d8e6766)
2001-09-07 14:14:57 +00:00
Andrew Tridgell
19fea3242c the next stage in the NTSTATUS/WERROR change. smbd and nmbd now compile, but the client code still needs some work
(This used to be commit dcd6e735f7)
2001-09-04 07:13:01 +00:00
Andrew Tridgell
464237cdb8 fixed handling of 139/445 in clients
(This used to be commit 22b372f8a7)
2001-08-24 20:11:09 +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
Simo Sorce
2f844bf447 Change all realloc() statements to Realloc() (ecxept for tdb.c)
changed some code to exploit the fact that Realloc(NULL, size) == malloc(size)
fixed some possible mem leaks, or seg faults.

thanks to andreas moroder (mallocs not checked in client/client.c, client/smbumount.c)
(This used to be commit 7f33c01688)
2001-08-08 16:54:16 +00:00
Tim Potter
afa7300006 Changed instances of TRUE, FALSE to True, False as some compilers don't
have the first set of symbols.
(This used to be commit ad0cbfbd79)
2001-07-12 22:27:00 +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
Jeremy Allison
6daea198a8 Applied Michael Sweet's patch, with one minor signal change.
Jeremy.
(This used to be commit 8d1dab74c2)
2001-07-03 00:52:56 +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
Andrew Tridgell
9d5348c758 removed need for scandir in client.c
fixed possible bug with readdirname on systems with NAMELEN != strlen
(This used to be commit 78f448b7d4)
2001-05-07 05:19:52 +00:00
Andrew Tridgell
a636c642b5 new mput code from idra that doesn't need a call to find
(This used to be commit 5dac4cdee4)
2001-05-07 01:51:56 +00:00
Jeremy Allison
8f11c24b74 More gcc compile on solaris tidyups.
Jeremy.
(This used to be commit 956201c4fb)
2001-04-27 22:42:10 +00:00
Andrew Tridgell
d3e438d54f a couple of minor merges from 2_2
(This used to be commit 67aa587eb2)
2001-04-22 03:16:04 +00:00
Tim Potter
af08cd21eb Getting medieval with compiler warnings as Jeremy puts it.
(This used to be commit d05c3cf0f4)
2001-04-16 02:35:35 +00:00
Jeremy Allison
c9f2c1fc5e Fix from Tony Butt - shouldn't set got_pass for -c option.
Jeremy.
(This used to be commit 83aa762058)
2001-04-15 20:40:08 +00:00
John Terpstra
548ca26bd5 Patch from Mandrakesoft to ensure we close all files.
(This used to be commit 8051406588)
2001-04-14 18:39:32 +00:00
Jeremy Allison
6578fd8742 To stop people complaining about the mktemp call, move it into lib/util.c. Thanks
to Andrew for all this code. Fixed extra line in lib/sysacls.c that broke
XFS ACL code.
Jeremy.
(This used to be commit 9b32b8a8cf)
2001-04-11 23:19:08 +00:00
Jeremy Allison
f9a15ce1a6 Got "medieval on our ass" about adding the -1 to slprintf.
Jeremy.
(This used to be commit 94747b4639)
2001-04-08 20:22:39 +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
7adb11393e Missed a cli_set_port on message code connect.
Jeremy.
(This used to be commit 799e043ae3)
2001-03-26 22:28:12 +00:00
Andrew Tridgell
e17e7b6417 added basic command completion support
(This used to be commit 386fdff2df)
2001-03-19 00:22:52 +00:00
Andrew Tridgell
bc25293f96 much simpler readline code
should work with readline 2.x
(This used to be commit 7940b6b0cf)
2001-03-18 23:41:53 +00:00
Andrew Tridgell
9c4927d362 much better readline support from Simo Sorce, with some mods from me
to make it a bit simpler
(This used to be commit e1487eb2c4)
2001-03-18 13:24:57 +00:00
Jeremy Allison
5b45f4a6a6 Updates for CUPS 1.1 from Michael Sweet.
Jeremy.
(This used to be commit 4e76f33869)
2001-03-16 19:17:04 +00:00
Jeremy Allison
a9855dedea Sync up Urbans changes from 2.2 into HEAD.
Jeremy.
(This used to be commit d0fcd91443)
2001-03-10 19:50:36 +00:00
Jeremy Allison
00ab9021b0 Serious (and I *mean* serious) attempt to fix little/bigendian RPC issues.
We were reading the endainness in the RPC header and then never propagating
it to the internal parse_structs used to parse the data.
Also removed the "align" argument to prs_init as it was *always* set to
4, and if needed can be set differently on a case by case basis.
Now ready for AS/U testing when Herb gets it set up :-).
Jeremy.
(This used to be commit 0cd37c831d)
2001-03-09 23:48:58 +00:00
Richard Sharpe
632ed01166 Fixes to testsmbc to ensure it will compile on SGI ...
(This used to be commit ad3a21b281)
2001-03-09 03:59:45 +00:00
Andrew Tridgell
4d6e45e41b the -m option to the client is back
(This used to be commit 69c13434f6)
2001-02-25 23:45:06 +00:00
Richard Sharpe
b206b16cb3 Fix a small problem where tree.c was using the creation time to display, rather than modification time. Creation time is not returned by the SMB protocol.
(This used to be commit d7f3793a2b)
2001-02-20 04:40:49 +00:00
Richard Sharpe
0ea6c2473b Improve the sample GTK+ client program to make it a bit more functional.
(This used to be commit 3e8366c58c)
2001-02-19 02:19:03 +00:00
Jeremy Allison
fd46817f0b Excise snprintf -> slprintf.
srv_samr.c: duplicate gid fix.
srv_spoolss_nt.c: Merge of JF's work.
uid.c: Fix for returning names when a PDC.
Jeremy.
(This used to be commit d938ad6963)
2001-02-16 19:21:18 +00:00
Richard Sharpe
b4b387e31b Fix calls to smbc_init in testsmbc.c and tree.c
(This used to be commit 244edad065)
2001-02-12 12:31:05 +00:00
Anton Blanchard
c15a054b21 io_bufsize was set too large and so full length reads
and writes got broken up into one ~64k and one ~1k packet.
(This used to be commit b91f906467)
2001-01-25 06:40:44 +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
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
e646dddfde Update the tree.c GTK+ App so it can walk down directories etc ...
(This used to be commit 0490a0ed10)
2001-01-07 12:54:03 +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
dca808cbc4 Needed a callback arg on cli_list ...
(This used to be commit d45e667a74)
2001-01-05 13:11:29 +00:00
Richard Sharpe
92ebc81734 I need a callback arg for cli_NetServerEnum and cli_RNetShareEnum, so I had
to modifiy any routine that calls it to pass NULL and so forth.

Should have no impact. It compiles OK.
(This used to be commit 7f862e387f)
2001-01-04 11:35:55 +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
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
Gerald Carter
cb55856e4e fixed typo
jerry
(This used to be commit d2949468dc)
2000-09-14 16:47:49 +00:00
Gerald Carter
28c07a5e9f added -A <authfile> option to smbclient for the reading of username /
password credentials from a file.



--jerry
(This used to be commit e291500903)
2000-08-29 14:35:31 +00:00
Andrew Tridgell
8843a6379d Linux kernel oplocks now seem to work, but need a _lot_ of testing
I had to modify sys_select() to not loop on EINTR. I added a wrapper
called sys_select_intr() which gives the old behaviour.
(This used to be commit b28cc4163b)
2000-06-11 05:57:58 +00:00
Andrew Tridgell
88a97957e7 and yet another memory leak - this one in the client
(This used to be commit a85ae6e0ae)
2000-05-02 07:50:33 +00:00
Jeremy Allison
693ffb8466 Added sys_fork() and sys_getpid() functions to stop the overhead
of doing a system call every time we want to just get our pid.
Jeremy.
(This used to be commit 148628b616)
2000-05-02 02:23:41 +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
d56e3425a1 Fix for names with spaces and some I18N filename issues from
V. Fyodorov <V.Fyodorov@VAZ.RU>.
Jeremy.
(This used to be commit 4673aa1a4b)
2000-03-10 22:25:02 +00:00
Jeremy Allison
0f1eee5c7a client/client.c:
libsmb/clientgen.c: Fixes for Win2k smbclient browsing.
Other fixes implement smbpasswd -x user to delete users. Also allows swat
to do the same.
Jeremy.
(This used to be commit 9f6ad04676)
2000-02-25 22:25:25 +00:00
Jeremy Allison
451dcb3351 Fixed code page conversions of messages outgoing/incoming.
Jeremy.
(This used to be commit 84b045cbc8)
2000-01-27 01:09:21 +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
171da4d787 this looks like a big commit, but it isn't really :)
This fixes our netbios scope handling. We now have a 'netbios scope' option
in smb.conf and the scope option is removed from make_nmb_name()

this was prompted by a bug in our PDC finding code where it didn't append
the scope to the query of the '*' name.
(This used to be commit b563be824b)
2000-01-07 06:55:36 +00:00
Jeremy Allison
20bd653b48 Fixed spurious error message when doing a 'put' of an empty file.
Jeremy
(This used to be commit 9ba8ad1d3d)
2000-01-06 21:23:49 +00:00
Jeremy Allison
c4914e2202 client/client.c: I18N fixes.
smbd/dir.c: Reformatting comments.
smbd/ipc.c: New password change code for Win98.
Jeremy.
(This used to be commit 9e90122afd)
2000-01-05 19:59:42 +00:00
Andrew Tridgell
3da55bfb8e changed %g to %3.1f to be friendly to our poor snprintf() code
(This used to be commit 6d506ee641)
1999-12-21 09:54:24 +00:00
Andrew Tridgell
a0b9e3ef4f client/smbspool.c from 2.0.6
(This used to be commit 599a7e7f9e)
1999-12-17 01:48:16 +00:00
Andrew Tridgell
32a965e09c 2nd phase of head branch sync with SAMBA_2_0 - this delets all the files that were in the head branch but weren't in SAMBA_2_0
(This used to be commit d7b2087865)
1999-12-13 13:35:20 +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
Luke Leighton
6ddfc68e04 sys_select added one more argument (read, write selectors).
(This used to be commit e4d92ff9df)
1999-12-01 02:15:14 +00:00
Luke Leighton
9b68305475 whoa. _major_ restructure of rpcclient. fixed some buuugs, created a few.
found out that getopt() _must_ have optind set to 0 before reuse.

still haven't decided what to do with the net* api yet...
(This used to be commit 29c480085e)
1999-11-26 23:04:19 +00:00
Luke Leighton
eae9b12ca5 general, drastic improvements to rpcclient.
added samgroup <groupname> command
added samgroupmem <groupname> command

added proper registry key completion

added sam command user-completion (e.g samuser [tab])

added sam command group-completion (e.g samgroup [tab])
(This used to be commit bc5d021916)
1999-10-30 20:32:40 +00:00
Tim Potter
59bd1de1a5 Put back in GNU readline support for smbclient accidentally trashed by
tridge in the clientgen.c to clientutil.c conversion.
(This used to be commit 26d66071fb)
1999-07-09 03:34:09 +00:00
Luke Leighton
8e14594798 smbclient modified to use cli_establish_connection(). smbclient therefore
now uses improved authentication.  smbclient now "broken" for "scripts"
based on DEBUG() output.  cli_establish_connection() requires modification
to support old scripts.
(This used to be commit b0539d4340)
1999-06-29 19:39:23 +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
Luke Leighton
754be76bde SMB_BIG_INT dir_total incompatible with %d: must use %llu (line 446)
(This used to be commit 1cece21246)
1999-03-25 21:01:08 +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
Michael Warfield
894a824041 Got to the bottom of another weird one...
Piping the output of smbmount back to autofs/automount was causing the
automount process to hang.  Reason was that automount was depending
on the pipe to close to continue on, rather than detecting the child
signal.  This occured with debug enabled and the daemon process was not
closing the stdout process.  Disabling debuging avoids the problem.
Debugging is turned off in the cvs repository and a warning placed over
the debugging option.
(This used to be commit 329ceaee49)
1999-02-18 04:33:06 +00:00
Michael Warfield
e588ffdaa8 Added caching of user password if it was entered via getpass. We were already
caching the password if it came from the command line or from the environment.
This completes the set and deals with the bloody nusance when reconnecting
a connection after we have gone daemon...  Grrr...

Added code to clean up the mount point following a catastrophic failure
during reconnect.  The smbmount daemon was exiting but leaving the mount
point in an unusable state.  If smbmount must exit following a reconnect
failure, we "unmount" the mount point and clean up mnttab.  Currently,
the unmount works, fixing some really ugly I/O errors and failure when
trying to remount.  The cleanup on mnttab still has problems.  This
is better than what it was and doesn't break anything that wasn't broken
before, so I'm committing this in even with the mnttab problem.  Will
commit the fix to that when I figure out what is busted there...

	-mhw-
(This used to be commit ad8389804c)
1999-02-14 23:15:54 +00:00
Michael Warfield
cbbac5455c Fixed a glibc glitch in smbumount.c and reenabled some debugging
in smbmount.c
(This used to be commit 4b4a706213)
1999-02-13 18:36:49 +00:00
Luke Leighton
91403ea47d %s not $s
(This used to be commit 62118e15fe)
1999-02-03 16:30:54 +00:00
Michael Warfield
8fdc846070 Minor change to bring smbmount in the main branch in line with some bzero
to memset changes...
(This used to be commit 1cb8fcb33b)
1999-02-01 22:01:29 +00:00
Michael Warfield
f5ac863e5a Ok... Yet another round of fixes for smbmount and autofs.
1)  The earlier fix for the smbmount race conditions broke the PID
	registration with smbfs.  That fix has been backed out and
	replaced by a signalling convention from the child smbmount
	process back to the parent telling the parent when it is safe
	to exit.

2)  Fixing all of this uncovered a NASTY deadly embrace between smbmount,
	smbmnt, and autofs.  This was caused by the setsid call in the
	daemon code.  The smbmnt process no longer was registered as
	"magic" because it was no longer in the autofs process group.
	Many many kudos and thanks to H Peter Anvin for giving me the
	clue to solving this agravating puzzle.  The setsid was moved
	down the where the child signals the parent and a warn left in
	its place in the daemonize code.

3)  Fixed (actually worked around with a BUTT UGLY HACK) a problem with
	SMB_GET_MOUNTPID in smbumount.c.  The smb_fs.h header file has
	the parameter to this ioctl defined as a uid_t.  Unfortunately
	that's a 32 bit quantity under glibc and it's currently a 16 bit
	quantity in kernel space.  Undefined the macro and redefined
	it with a parameter of __kernel_uid_t.  That should keep us
	out of trouble till I can have someone fix smb_fs.h in the
	kernel sources...
(This used to be commit c5608093e4)
1999-01-31 21:28:55 +00:00
Luke Leighton
f6c646467d set_port warning / unused / global/local variable overlap issues
cmd_svcctl.c tests got put into cvs by mistake.
(This used to be commit 0ed70972d7)
1999-01-27 19:37:29 +00:00
Richard Sharpe
f5f913b001 Putting back the -p flag in smbclient.
However, it seems that the -s flag
in smbclient is also ignored :-(
(This used to be commit f6c7819266)
1999-01-25 01:46:14 +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
Michael Warfield
da7a6d46b0 Earlier fix for smbmount timing window was the wrong patch.
My bad...  Earlier one was the patch from the CIFS conference that
didn't work, this fixes...
(This used to be commit 12739f0456)
1998-11-30 18:06:29 +00:00
Jeremy Allison
bfc38ff872 Makefile.in: Added maintainer mode fixes.
aclocal.m4: Added AC_LIBTESTFUNC.
configure.in: Fixed -lsecurity -lsec problems.
client.c: dos_ fixes.
groupdb/aliasunix.c: Dead code removal.
include/includes.h: Added default PRINTCAP_NAME.
lib/genrand.c: dos_ fixes.
lib/replace.c: Added strtoul.
lib/system.c: dos_ fixes.
lib/util.c: dos_ fixes.
lib/util_sid.c: Signed/unsigned fixes.
lib/util_str.c: removed bad const.
locking/locking_slow.c: dos_ fixes.
printing/printing.c: dos_ fixes.
rpc_server/srv_samr.c: Dead code removal.
rpc_server/srv_sid.c: global_myworkgroup defined with wrong size AGAIN !
smbd/dir.c: dos_ fixes.
smbd/open.c: dos_ fixes.
smbd/oplock.c: dos_ fixes.
smbd/reply.c smbd/server.c smbd/service.c smbd/uid.c: dos_ fixes.

Jeremy.
(This used to be commit 6acb4b68f6)
1998-11-25 21:17:20 +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
Jeremy Allison
b7c4cd9fc6 Fixed missing NULL check in tar op.
Jeremy.
(This used to be commit 6db04cd462)
1998-11-17 01:44:25 +00:00
Andrew Tridgell
3ba68d045c automatically uppercase server and share names (win95 won't handle
lowercase share names!)
(This used to be commit dddf1d8522)
1998-11-14 04:16: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
2a28d20f20 Fixed problem with smbclient issuing '*.*' to NT server when an
NT server needs '*'. Win95/98 doesn't care either way :-).
Jeremy.
(This used to be commit a0adae90ca)
1998-11-14 03:34:44 +00:00
Andrew Tridgell
2b67f7eba4 prompt for password on smbclient -L
(This used to be commit 1558f34a87)
1998-11-14 02:34:19 +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
Michael Warfield
9c3cbb8012 Fixed timing window created by daemonize function. Smbmount was going daemon
before the mount was actually completed.  This caused weird problems when
used with autofs such as empty directories on first listing or files which
would appear in "ls" but would return "no such file or directory" under
"ls -l".  Note to Volker:  Initial attempt from CIFS conference didn't work.
Had to move daemonize function inside of loop after ioctl.
(This used to be commit 2f456be660)
1998-11-13 20:32:22 +00:00
Andrew Tridgell
2db96e3047 fixes for OSF1 compilation
(This used to be commit 5be3c37f50)
1998-11-13 03:37:01 +00:00
Andrew Tridgell
c1bf51bd2c please remember to check that code compiles before checkin!
(This used to be commit 88c90ec65c)
1998-11-12 23:10:48 +00:00
Herb Lewis
d30b6ab548 .cvsignore: Removed old entries.
client/client.c:
include/client.h: Added some debug messages that the old client used to
		  generate. These are needed to make scripts such as
		  'findsmb' work - there may be other changes to keep
		  backwards output compatibility. Do we need a -old-client-compat
		  argument ?
libsmb/clientgen.c: Fixed crash bug where malloc'ed data wasn't being
		    cleared - corrupted malloc chains.
web/swat.c: John's changes to get rid of "ghost" table entries.
(This used to be commit 3c45a3503e)
1998-11-12 22:17:51 +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
Jeremy Allison
c082539152 client/client.c: Patch to tidy up file size output.
nmbd/nmbd.c: Someone (a "yank" no doubt :-) Changed instances of "initialise" to
             "initialize". Someone get that man an *English* dictionary.... :-) :-).
Jeremy.
(This used to be commit 6279be7f96)
1998-11-02 18:12:28 +00:00
Jeremy Allison
54ebe3fa01 Tidied up option processing in smbclient - usage message now actually
reflects the real options. Removed '-S' option - couldn't see what
this was doing (seemed to have something to do with nt_domain_logon ?).
Luke please check if you needed this code (code is only #ifdef'ed out
and can be re-instated).
Did this to make writing of yodl smbclient man page possible :-).
Jeremy.
(This used to be commit 97a14db756)
1998-10-29 02:18:17 +00:00
Andrew Tridgell
d9ebe8dcea fix for John.
don't seek unless absolutely necessary on files in do_put()
(This used to be commit 9d33d405cd)
1998-10-24 08:24:11 +00:00
John Terpstra
b0c360c25a Unlink zero length files that did NOT exist at the point of origin on a do_get() call.
(This used to be commit 98ba0b3a0a)
1998-10-24 02:49:09 +00:00
Andrew Tridgell
a6298e2cba use the username GUEST if no other username is available
(This used to be commit 59d99ad76c)
1998-10-16 17:05:19 +00:00
Andrew Tridgell
8043472753 fixed a bug in the readline support
(This used to be commit b0a6962250)
1998-10-08 22:12:13 +00:00
Andrew Tridgell
52d52a5131 somehow "in_client" got included twice in two places.
(This used to be commit 378290bfe1)
1998-10-07 01:03:35 +00:00
Richard Sharpe
0cf1ea4e2e Added capability for smbclient to use the local WINS server on the same
machine if WINSsupport configured
(This used to be commit 1398feebbc)
1998-10-06 23:46:01 +00:00
Andrew Tridgell
fe2681dd4b fixed a cast warning
(This used to be commit 4093bb16d2)
1998-10-05 12:34:43 +00:00
Andrew Tridgell
40984f6b55 - modified resolve_name() to take a name_type
- cleaned up resolve_name() (split into separate functions for each resolver)
- if can't find local master then use #1B name
- support listing of foreign workgroups in /smb/
(This used to be commit a4e607c17d)
1998-10-04 12:00:40 +00:00
Andrew Tridgell
f2c43ee039 support using #xx at end of netbios name to connect to the specified name type
(This used to be commit bf409a40e2)
1998-10-04 10:48:31 +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
Michael Warfield
4828c1c3b8 Removed a redundant include for "includes.h"
Cleaned up a prototype warning message.
smbumount.c now compiles warning free.
(This used to be commit 3459541abc)
1998-09-30 03:02:35 +00:00
Jeremy Allison
9a5f40cadf Fixed uid->vuid confusion in smbmount (hopefully).
Jeremy.
(This used to be commit 60c2278e8c)
1998-09-30 00:25:04 +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
9066025a8a Got very strict about the differences and uses of
uid_t, gid_t and vuid. Added sys_getgroups() to get
around the int * return problem. Set correct datatypes
for all uid, gid and vuid variables.
Jeremy.
(This used to be commit e570db46fc)
1998-09-29 20:24:17 +00:00
Alexandre Oliva
a2d7f765e8 get away with dummy and .dummy files
(This used to be commit 90a8a02484)
1998-09-29 04:52:17 +00:00
Richard Sharpe
e1d962659f Now have a better solution to the need to have smblcient find
a WINS server if running on the WINS server.  As suggested by
Andrew, we have a flag, in_client=False by default, and set it
to True in the client.  loadparam.c checks this and sets
szWINSserver to 127.0.0.1 when in_client && bWINSsupport.

BTW, we seem to have picked up and unused value in some of
Luke's new code.
(This used to be commit b665756bfc)
1998-09-29 04:43:40 +00:00
Jeremy Allison
4746a0b93f Fixed stupid bug with "cd /" appending a "/" character to the path forever....
Jeremy.
(This used to be commit 14ee57f336)
1998-09-29 01:55:48 +00:00
Jeremy Allison
008fd97309 Fixed problems found in lint pass over the old code by <cpeterso@microsoft.com>.
These were the problems that still existed in the 2.0 branch.
Jeremy.
(This used to be commit 3fd28812f7)
1998-09-28 23:55:09 +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
Michael Warfield
cdaa53e3ef Two changes in this ball...
1) Changes to smbmnt.c, smbmount.c, and smbumount.c allow them to compile on
both RedHat 4.x (libc 4.x) systems and RedHat 5.x (glibc 2) systems.

2) Changes to Makefile.in and configure.in (and subsequently configure) are to
configure for smbmount, smbumount, and smbmnt to compile.

This adds a "--with(out)-smbmount" option to configure.  Sanity checking is
not present yet.  You can specify this if you are not on linux, it just
won't compile.
(This used to be commit 8a4730f619)
1998-09-28 19:18:21 +00:00
Alexandre Oliva
cf971f88ac automated generation of .dummy files for each subdirectory;
dummy.in files are no longer needed, and new directories will be taken
care of automatically, at configure (or config.status --recheck) time
(This used to be commit 237a8e5fe6)
1998-09-28 00:14:36 +00:00
Alexandre Oliva
464f71f414 wait_keyboard must still be defined if readline is not available
(This used to be commit dc21f6c982)
1998-09-27 20:38:06 +00:00
Richard Sharpe
ecd8ca2431 Fixed up more possibly uninitialized variables.
Now only two compilation warnings seem to be left.

Luke may want to check the changes I made.
(This used to be commit 2456c95c16)
1998-09-27 08:29:50 +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
Luke Leighton
1631d3fba7 not needed.
(This used to be commit 78b5c15121)
1998-09-25 16:01:14 +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
e649750cb4 major autoconf clean-up
fix problems in builds with srcdir!=builddir
(This used to be commit 1ffc3b807a)
1998-09-21 09:07:08 +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
012e575e13 ahh, the joy of deleting large chunks of code that someone else has
painstakingly put in :)

This gets rid of most of the #ifdef LARGE_SMB_INO_T ifdefs around
DEBUG() statements. We just use %.0f in all cases. Makes the code a
bit easier to read :)
(This used to be commit 41f0069afc)
1998-09-05 05:23:29 +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
Andrew Tridgell
61b5fd6f32 bounds check next_token() to prevent possible buffer overflows
(This used to be commit 3eade55dc7)
1998-08-31 03:11:42 +00:00
Andrew Tridgell
56cbed3904 allow smbclient to connect to IPC$ as an IPC service
(This used to be commit 275679db29)
1998-08-30 04:37:07 +00:00
Jeremy Allison
38142a1ebb This checking fixes the statcache bug that stopped NetBench from running
correctly. Added new parameter "stat cache size" - set to 50 by default.

I now declare the statcache code officially "open" for business :-).
It gets a hit rate of 97% with a NetBench run and seems to make
using a case insensitive run as efficient as a case sensitive run.

Also tidied up our sys_select usage - added a maxfd parameter and
also added an implementation of select in terms of poll(), for systems
where poll() is much faster. This is disabled by default.

Jeremy.
(This used to be commit 779b924ec1)
1998-08-28 21:46:29 +00:00
Jeremy Allison
e13aeea928 configure: Changes for extra headers.
configure.in: Source for header changes.
client/clitar.c: Fixed isXXX macros & debugs for gcc pedantic compile.
include/config.h.in: Added MEMSET, BZERO, MEMORY, RPCSVC_YPCLNT, STRINGS headers.
include/includes.h: Headers for the above.
include/smb.h: Made SIGNAL_CAST POSIX by default void (*)(int).
lib/access.c: Fixed isXXX macros & debugs for gcc pedantic compile.
lib/charset.c: Fixed isXXX macros & debugs for gcc pedantic compile.
lib/debug.c: Fixed signal functs.
lib/kanji.c: Fixed isXXX macros & debugs for gcc pedantic compile.
lib/smbrun.c: Fixed isXXX macros & debugs for gcc pedantic compile.
lib/util.c: Fixed isXXX macros & debugs for gcc pedantic compile.
libsmb/namequery.c: Fixed isXXX macros & debugs for gcc pedantic compile.
locking/shmem.c: Fixed isXXX macros & debugs for gcc pedantic compile.
locking/shmem_sysv.c: Fixed error messages in sysV stuff.
nmbd/asyncdns.c: Fixed signal functs.
nmbd/nmbd.c: Fixed isXXX macros & debugs for gcc pedantic compile.
passdb/passdb.c: Fixed isXXX macros & debugs for gcc pedantic compile.
passdb/smbpassfile.c: Fixed isXXX macros & debugs for gcc pedantic compile.
smbd/chgpasswd.c: Fixed isXXX macros & debugs for gcc pedantic compile.
smbd/ipc.c: Fixed isXXX macros & debugs for gcc pedantic compile.
smbd/nttrans.c: Fixed fsp code path.
smbd/password.c: fixed HAVE_YP_GET_DEFAULT_DOMAIN problem.
smbd/printing.c: Fixed isXXX macros & debugs for gcc pedantic compile.
smbd/reply.c: Fixed isXXX macros & debugs for gcc pedantic compile.
smbd/server.c: Fixed isXXX macros & debugs for gcc pedantic compile.
smbd/trans2.c: Fixed core dump bug.
smbd/uid.c: Fixed isXXX macros & debugs for gcc pedantic compile.
Jeremy.
(This used to be commit 1b9cbcd02e)
1998-08-15 01:19:26 +00:00
Andrew Tridgell
b9623ab59e this is the bug change to using connection_struct* instead of cnum.
Connections[] is now a local array in server.c

I might have broken something with this change. In particular the
oplock code is suspect and some .dll files aren't being oplocked when
I expected them to be. I'll look at it after I've got some sleep.
(This used to be commit c7ee025ead)
1998-08-14 17:38:29 +00:00
Andrew Tridgell
58fb3c31c0 remove an unused variable
(This used to be commit 6f9228b011)
1998-08-14 06:26:31 +00:00
Christopher R. Hertel
5032122753 Changed a call to fflush(dbg) to dbgflush().
(This used to be commit c626828471)
1998-08-12 15:27:13 +00:00
Christopher R. Hertel
08feb74221 I've added a dbgflush() function to debug.c. Calling this will cause the
debug format buffer to be written out (and reset).  fflush() is also called
to force the issue.  I replaced the call to fflush() in client.c with a
call to dbgflush(), which seems to have fixed the problem that Andrew was
working on (i.e., that the prompt was not displayed when using smbclient).

Chris -)-----
(This used to be commit a97460869f)
1998-08-12 14:51:17 +00:00
Jeremy Allison
9042aa41c3 Makefile.in: Added CHECK target back in (at Herb's request). Added
manpath in (although we don't currently use it).
client/client.c: Added John Blair's fixes for "put -".
include/nterr.h: Added NT_STATUS_NOTIFY_ENUM_DIR error code.
smbd/nttrans.c: Added in devious fix for one-shot NT change notify bug.
Jeremy.
(This used to be commit 4ac3091e57)
1998-08-11 02:13:01 +00:00
Andrew Tridgell
87bcd5502c added ignore rules for the dummy files
(This used to be commit 687f76a17d)
1998-08-09 11:25:49 +00:00
Andrew Tridgell
27ff18a184 these dummy files are needed for autoconf processing
(This used to be commit be762dc3de)
1998-08-09 11:24:15 +00:00
Richard Sharpe
4fa20ebdc0 Fixing clitar.c so that tar to stdout works correctly.
Replaced printfs with DEBUG(0. Tested ... Works.

Hope I didn't disturb the autoconf code ... It feels
great to be able to run configure for Samba at long last!

Regards
Richard Sharpe
(This used to be commit b968aa31ba)
1998-08-03 10:35:00 +00:00
Christopher R. Hertel
28900ea26f As per a Andrew's message, I went through and removed the timestring()
timestamps from several DEBUG messages.  The timestamps are redundant now
that DEBUG() provides them automatically.

There are still a few more files to do, but I've got to get home for dinner.

Chris -)-----
(This used to be commit 60286cceca)
1998-07-31 22:39:15 +00:00
Andrew Tridgell
64578c0589 merge from the autoconf2 branch to the main branch
(This used to be commit 3bda7ac417)
1998-07-29 03:08:05 +00:00
Jeremy Allison
bc39cff279 clitar.c: Fixed gcc warning with comment in /* */ code.
nmbd_winsserver.c: Remember to free packet in multi-homed register code.
                   Use correct query_name_from_wins_server call instead of
                   query_name call in multihomed code.
Jeremy.
(This used to be commit 6e995802fe)
1998-06-25 23:51:28 +00:00
Richard Sharpe
9d001d5c95 Arrrgh, one more fix. Restores of long file names were
broken ...

Added a bzero of the buffer the names went into ...

Seems OK now ...

Richard Sharpe
(This used to be commit c749c8d046)
1998-06-22 06:31:39 +00:00
Richard Sharpe
8afebcdd7e Remove the copyright to Canon Information Systems Australia, as we don't
want them to have the copyright.

Added a new DOSERR response code that Win95 returns, unimp, unimplemented.

Added code to ignore errors on setting remote time, as Win 95 does not like
the time being changed on a directory.  Win NT and Samba are OK at this.

This is the next to last clean-ups here. Next is to properly handle restore
times on directories (except for Win95--see above).

Now have Jay's changes in and have fixed a bug reported by Tim Lee.
(This used to be commit dc9436bae4)
1998-06-21 12:44:34 +00:00
Jeremy Allison
55da32fb45 clitar.c: Fixed minor gcc -pedantic-error compile warnings.
passdb.c: Fixed stupid bug in read_sid_from_file().
Jeremy.
(This used to be commit e65efe3f78)
1998-06-20 10:06:26 +00:00
Richard Sharpe
c47cce6dd9 Re-submit changes for CLITAR.
Have fixed the location of create_string_s back to clitar.c, and have
added Jay Berkenbilt's changes.

Have used safe_strcpy and safe_strcat everywhere and have tested with
long file names extensively, but have not yet been able to check that
it works OK on Solaris.
(This used to be commit daf239a188)
1998-06-17 01:52:57 +00:00
Jeremy Allison
bbd7ca65e7 clientgen: Added USE_SSL for client shutdown.
clitar.c: Added 'Samba style' comments before string_create_s().
loadparm.c: Fixed missing comma in SSL code.
util.c: Removed string_create_s(). Currently it's only called from
        clitar.c and having it here as well as a static in clitar
        causes the compile to break (Richard, please decide where
        you want this function).
lib/rpc/parse/parse_net.c: Fix from <anders.blomdell@control.lth.se>
                           to stop coredump on missing parameter.
Jeremy.
(This used to be commit d23b443225)
1998-06-16 18:25:36 +00:00
Jeremy Allison
cb757820f5 Added SSL support from Christian Starkjohann <cs@obdev.at>
This patch may not yet compile with -DUSE_SSL enabled, further
Makefile changes may be needed. But it was important to get
this code in place before I go off to USENIX.
Jeremy.
(This used to be commit 31e768369f)
1998-06-16 01:35:52 +00:00
Jeremy Allison
7ed5a181ac client.c: Made -L do a null-session share unless -U user is specified.
clientutil.c: Fixed NT session to add NT password.
groupname.c: Added lookup function.
Jeremy.
(This used to be commit 8216363e83)
1998-06-15 22:02:14 +00:00
Jeremy Allison
644fbaaf9b Makefile:
smbumount.c: Added fixes to compile under Linux.
includes.h: Added SunOS 4.x QSORT_CAST fix.
reply.c: Fixed user name mapping function for security=server, security=domain.
Jeremy.
(This used to be commit 21ca6bfb3b)
1998-06-15 18:19:54 +00:00
Jeremy Allison
28029c73b7 client.c: Allowed client to proceed even if it gets error 234 (more data
available) when scanning server/workgroup/share lists.
ipc.c: Removed redundent definition of ERROR_MORE_DATA (234) we already have
       ERRmoredata in smb.h
Jeremy.
(This used to be commit ae3510e9fb)
1998-06-04 18:49:13 +00:00
Jeremy Allison
ffe91d6443 clientutil.c: Don't core dump if no controlling terminal available for password.
passdb.c:
lib/rpc/include/rpc_misc.h: First cut at automatic uid/gid to rid mapping.
We can change this at a later date to make more bits available if neccessary.
Jeremy.
(This used to be commit 34f40474ab)
1998-06-01 18:50:27 +00:00
Jeremy Allison
ee9a61841a includes.h: SunOS doesn't have strcasecmp, solaris versions prior to 2.6 don't
have vsnprintf.
locking_slow.c: slight tidy.
make_smbcodepage.c: Use safe_strcpy instead of pstrcpy.
nmbd_winsserver.c: Use pstrcpy instead of fstrcpy.
smbmount.c: Fixed reported bug.
util.c: Removed old fstrcpy/fstrcat functions.
Jeremy.
(This used to be commit f257d2e4ba)
1998-05-12 22:11:24 +00:00
Jeremy Allison
f888868f46 This is a security audit change of the main source.
It removed all ocurrences of the following functions :

sprintf
strcpy
strcat

The replacements are slprintf, safe_strcpy and safe_strcat.

It should not be possible to use code in Samba that uses
sprintf, strcpy or strcat, only the safe_equivalents.

Once Andrew has fixed the slprintf implementation then
this code will be moved back to the 1.9.18 code stream.

Jeremy.
(This used to be commit 2d77445400)
1998-05-12 00:55:32 +00:00
Andrew Tridgell
b3cd94780d don't use system functions as arguments to qsort() as otherwise you
get stuck on systems with broken headers (like SunOS4). In this case
use StrCaseCmp instead of strcasecmp
(This used to be commit 1386c6e25a)
1998-05-11 08:41:09 +00:00
Andrew Tridgell
3dfc0c8472 changed to use slprintf() instead of sprintf() just about
everywhere. I've implemented slprintf() as a bounds checked sprintf()
using mprotect() and a non-writeable page.

This should prevent any sprintf based security holes.
(This used to be commit ee09e9dadb)
1998-05-11 06:38:36 +00:00