1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-22 05:57:43 +03:00

68 Commits

Author SHA1 Message Date
Alexander Bokovoy
738666ce0a r76: Fix smbfs problem with Tree Disconnect issued before smbfs starts its work.
We use cli_state.smb_rw_error to pass this specific case into cli_close_connection()
from smbmount as smb_rw_error can have only selected number of states and
it is ignored in cli_close_connection().

Compiled and tested by Lars Mueller from SuSE on x86, x86_64, ppc, ppc64, s390 and
s390x.
2007-10-10 10:51:07 -05:00
Gerald Carter
ae452e51b0 metze's autogenerate patch for version.h -
Jeremy Allison
455ed2d51d Get rid of MAXPATHLEN, move to standard PATH_MAX.
Jeremy.
-
Jeremy Allison
4f78d747e6 More conversions I missed. Thanks metze.
Jeremy.
-
Jelmer Vernooij
d817eaf0ec Reverse previous patch from Stefan and me after comments by Andrew Bartlett -
Jelmer Vernooij
74d9ecfe2d Patch from metze and me that adds dummy smb_register_*() functions so
that is now possible to, for example, load a module which contains
an auth method into a binary without the auth/ subsystem built in.
-
Alexander Bokovoy
fbbb9a6660 Update smbmount to include unicode and lfs capabilities options -- smbfs supports this already -
Andrew Bartlett
4c7163e7c2 Add an extra parameter to our 'set_remote_machine_name' and
'set_local_machine_name' so that the client can't change it from under us.

(.NET RC2 and WinXP install calls the machine 'machinename' during NTLMSSP
on the domain join).

Andrew Bartlett
-
Andrew Bartlett
a25f612664 Cleint-side-auth/kerberos fixes from HEAD, and don't connect to a share
twice, let the libsmb code determine what form the share name should take.

Andrew Bartlett
-
Gerald Carter
dc6cda5951 s/WIFSIGNALLED/WIFSIGNALED/g -
Gerald Carter
0fb724b321 *lots of small merges form HEAD
*sync up configure.in
*don't build torture tools in make all
*make sure to remove torture tools as part of make clean
-
Jeremy Allison
57f7ab45b7 Sorry Jim we can't assign to global_xxx(), we need to call set_global_xxx()
to ensure the malloc is done.
Jeremy.
-
Jim McDonough
79a0f2c251 Bring smbmount.c in line with jra's global-cide. global_scope was used here... -
Andrew Bartlett
2e33865417 Merge append_log fix from HEAD -
Jelmer Vernooij
3928578b52 sync 3.0 branch with head -
Tim Potter
a3cea5e9ae getpid() -> sys_getpid() -
Tim Potter
6a58c9bd06 Removed version number from file header.
Changed "SMB/Netbios" to "SMB/CIFS" in file header.
-
Andrew Bartlett
2c09907b53 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
-
Jeremy Allison
e943ace4f0 Fix for extra capabilities from Urban Widmark <urban@teststation.com>.
Jeremy.
-
Andrew Tridgell
e2ba2383c9 fix a bunch of places where we can double-free a cli structure -
Tim Potter
778f5f77a6 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);
-
Tim Potter
bf491d2aa2 Fixed compiler warnings and dyn_CONFIGFILE related breakage. -
Tim Potter
8fc772c9e5 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.
-
Martin Pool
32480d7aff Rename xmalloc, xmemdup, xstrdup to smb_$1 to avoid conflicts with the
versions defined by libreadline on SCO (!).
-
Martin Pool
79ec88f0da Store some path names in global variables initialized to configure
default, rather than in preprocessor macros.
-
Jim McDonough
43c384fa78 Remove xstrdup since it was added to lib/util.c. Caused compile failure -
Tim Potter
2d0922b0ea Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header. -
Jeremy Allison
73ec939239 smbmount fixes from Urban.
Jeremy.
-
Simo Sorce
29db6ef7a7 move to SAFE_FREE() -
Andrew Tridgell
1af8bf34f1 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.
-
Andrew Tridgell
22b372f8a7 fixed handling of 139/445 in clients -
Andrew Tridgell
c41fc06376 strchr and strrchr are macros when compiling with optimisation in gcc, so we can't redefine them. damn. -
Andrew Tridgell
debb471267 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.
-
Andrew Tridgell
67aa587eb2 a couple of minor merges from 2_2 -
John Terpstra
8051406588 Patch from Mandrakesoft to ensure we close all files. -
Jeremy Allison
94747b4639 Got "medieval on our ass" about adding the -1 to slprintf.
Jeremy.
-
Jeremy Allison
d0fcd91443 Sync up Urbans changes from 2.2 into HEAD.
Jeremy.
-
Jeremy Allison
0cd37c831d 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.
-
Jeremy Allison
148628b616 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.
-
Andrew Tridgell
b563be824b 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.
-
Andrew Tridgell
453a822a76 first pass at updating head branch to be to be the same as the SAMBA_2_0 branch -
Luke Leighton
e4d92ff9df sys_select added one more argument (read, write selectors). -
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
-
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...
-
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...
-
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.
-
Jeremy Allison
60c2278e8c Fixed uid->vuid confusion in smbmount (hopefully).
Jeremy.
-