1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-14 19:24:43 +03:00

217 Commits

Author SHA1 Message Date
Luke Leighton
1cece21246 SMB_BIG_INT dir_total incompatible with %d: must use %llu (line 446) -
Alexandre Oliva
29581f8486 * 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>
-
Michael Warfield
329ceaee49 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.
-
Michael Warfield
ad8389804c 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-
-
Michael Warfield
4b4a706213 Fixed a glibc glitch in smbumount.c and reenabled some debugging
in smbmount.c
-
Luke Leighton
62118e15fe %s not $s -
Michael Warfield
1cb8fcb33b Minor change to bring smbmount in the main branch in line with some bzero
to memset changes...
-
Michael Warfield
c5608093e4 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...
-
Luke Leighton
0ed70972d7 set_port warning / unused / global/local variable overlap issues
cmd_svcctl.c tests got put into cvs by mistake.
-
Richard Sharpe
f6c7819266 Putting back the -p flag in smbclient.
However, it seems that the -s flag
in smbclient is also ignored :-(
-
Richard Sharpe
57301a3eb4 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 :-)
-
Richard Sharpe
47e36bed8f Fixed problems in debug code because I did not compile
first :-(
-
Richard Sharpe
b75af70990 Added some debugging to clitar ... -
Jeremy Allison
7be5c8e8f7 Fixed tar recurse bug.
Jeremy.
-
Michael Warfield
12739f0456 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...
-
Jeremy Allison
6acb4b68f6 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.
-
Jeremy Allison
18ff93a9ab 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.
-
Jeremy Allison
6db04cd462 Fixed missing NULL check in tar op.
Jeremy.
-
Andrew Tridgell
dddf1d8522 automatically uppercase server and share names (win95 won't handle
lowercase share names!)
-
Andrew Tridgell
c58f496510 fixed setmode in smbclient -
Andrew Tridgell
2d9335fe2a - handle servers that don't support getattrE (ie. NT)
- use * in clitar instead of *.*
-
Jeremy Allison
a0adae90ca Fixed problem with smbclient issuing '*.*' to NT server when an
NT server needs '*'. Win95/98 doesn't care either way :-).
Jeremy.
-
Andrew Tridgell
1558f34a87 prompt for password on smbclient -L -
Jeremy Allison
4c2b5a0098 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.
-
Michael Warfield
2f456be660 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.
-
Andrew Tridgell
5be3c37f50 fixes for OSF1 compilation -
Andrew Tridgell
88c90ec65c please remember to check that code compiles before checkin! -
Herb Lewis
3c45a3503e .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.
-
Jeremy Allison
bacd3e9d20 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.
-
Andrew Tridgell
e14ca7765a 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?
-
Jeremy Allison
6279be7f96 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.
-
Jeremy Allison
97a14db756 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.
-
Andrew Tridgell
9d33d405cd fix for John.
don't seek unless absolutely necessary on files in do_put()
-
John Terpstra
98ba0b3a0a Unlink zero length files that did NOT exist at the point of origin on a do_get() call. -
Andrew Tridgell
59d99ad76c use the username GUEST if no other username is available -
Andrew Tridgell
b0a6962250 fixed a bug in the readline support -
Andrew Tridgell
378290bfe1 somehow "in_client" got included twice in two places. -
Richard Sharpe
1398feebbc Added capability for smbclient to use the local WINS server on the same
machine if WINSsupport configured
-
Andrew Tridgell
4093bb16d2 fixed a cast warning -
Andrew Tridgell
a4e607c17d - 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/
-
Andrew Tridgell
bf409a40e2 support using #xx at end of netbios name to connect to the specified name type -
Richard Sharpe
fcdc9bc208 Added E Jay Berkenbilt's fixes -
Michael Warfield
3459541abc Removed a redundant include for "includes.h"
Cleaned up a prototype warning message.
smbumount.c now compiles warning free.
-
Jeremy Allison
60c2278e8c Fixed uid->vuid confusion in smbmount (hopefully).
Jeremy.
-
Jeremy Allison
6c08f3b81c Fixed extern definition of cnum in clitar.c
Jeremy
-
Jeremy Allison
e570db46fc 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.
-
Alexandre Oliva
90a8a02484 get away with dummy and .dummy files -
Richard Sharpe
b665756bfc 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.
-
Jeremy Allison
14ee57f336 Fixed stupid bug with "cd /" appending a "/" character to the path forever....
Jeremy.
-
Jeremy Allison
3fd28812f7 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.
-