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

215 Commits

Author SHA1 Message Date
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