1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-10 13:57:47 +03:00

187 Commits

Author SHA1 Message Date
Andrew Tridgell
5937ab14d2 finally got sick of the "extern int Client" code and the stupid
assumption that we have one socket everywhere

while doing so I discovered a few bugs!

1) the clientgen session retarget code if used from smbd or nmbd would
cause a crash as it called close_sockets() which closed our main
socket! fixed by removing close_sockets() completely - it is unnecessary

2) the caching in client_addr() and client_name() was bogus - it could
easily get fooled and give the wrong result. fixed.

3) the retarget could could recurse, allowing an easy denial of
service attack on nmbd. fixed.
-
Andrew Tridgell
d1827a3648 the bulk of the changes to get rid of fd_ptr and move print open
handling to printing/printing.c

most of this was just replacing things like fsp->fd_ptr->fd with fsp->fd

the changes in open.c are quite dramatic. Most of it is removing all
the functions that handled the fd multiplexing
-
Jeremy Allison
7325059a09 Removed strange optimisation (paranoia fix maybe ?) that stopped smbd
from returning '.' and '..' in a top level listing of a trans2 directory
scan. NT does return these entries.
Jeremy.
-
Jeremy Allison
676db02f1c Win2k will only accept volume labels in UNICODE. Fixed.... :-(.
Jeremy.
-
Jeremy Allison
f15ca0d927 Moved common code to set parameter offset field correctly oout of 'if'
statement into main function code path.
Jeremy.
-
Andrew Tridgell
426c904333 changed the definition of dos_PutUniCode
the previous definition could result is us overflowing a buffer. The
null termination was always added yet the size returned did not
include the null termination.

the new function takes a BOOL null_terminate, and always returns the
total number of bytes consumed by the string.
-
Shirish Kalele
b5a489fbb8 Cleaning up call_trans2getdfsreferral.
Instead of a #ifdef MS_DFS in call_trans2getdfsreferral()... , now using a generic call leading to some #define problems.. hopefully I've corrected the last of them.
-
Shirish Kalele
2b99318341 Cleaned up call_trans2getdfsreferral for when MS_DFS is not defined. -
Jean-François Micouleau
b534fb03b1 moved #endif to end of function to compile when dfs is disabled.
J.F.
-
Shirish Kalele
ca02d9f821 Cleaning up the warnings from configure.developer.
Found that Jeremy had already made some of the changes.
-
Jeremy Allison
a462191698 Fixups for compiles with gcc flags -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual
Partially implemented rpc daemon redirect (needs more work).
Jeremy.
-
Shirish Kalele
4684b4a188 dded Microsoft Dfs services.
* added a new msdfs/ directory under source/
* added msdfs sources under this directory.
* modified configure setup to add a --with-msdfs configure time option

 Modified Files:
 	Makefile.in acconfig.h configure configure.in
 	include/config.h.in include/includes.h include/proto.h
 	include/smb.h include/smb_macros.h param/loadparm.c
 	smbd/negprot.c smbd/nttrans.c smbd/process.c smbd/reply.c
 	smbd/server.c smbd/trans2.c
 Added Files:
 	include/msdfs.h msdfs/README msdfs/msdfs.c msdfs/msdfs_tdb.c
 	msdfs/parse_dfs_map.c
 ----------------------------------------------------------------------
-
Jeremy Allison
801ed2389b Fix for reporting file system attributes correctly.
Jeremy.
-
Tim Potter
3aad500c0f Mega-VFS merge. Yeah baby!
Synopsis: change every disk access function to work through a vfs_ops
structure contained in the connection_struct.
-
Jeremy Allison
eb06c19916 useable_space does not include the alignment offset calculations.
Bugfix from Marc_Jacobsen@hp.com.
Jeremy.
-
Jeremy Allison
38dffd360d Added "inherit permissions" patch.
Fixed locking bug found by Andrew.
Jeremy.
-
Jeremy Allison
2cf408772f Changed MAX to MIN in SET_FILE_BASIC_INFO as recommended by "Michael C. Adler" <Michael.Adler@compaq.com>
as this breaks the least number of programs.
Jeremy.
-
Andrew Tridgell
e48c2d9937 converted all our existing shared memory code to use a tdb database
instead of either sysv or mmap shared memory or lock files.

this means we can now completely remove
	locking_shm.c
	locking_slow.c
	shmem.c
	shmem_sysv.c
and lots of other things also got simpler

locking.c got a bit larger, but is much better compartmentalised now
-
Jeremy Allison
8f93c08881 *Finally*. Correct patch to fix timestamp problems from Paul Eggert <eggert@twinsun.com>.
I wish I had written this one :-).
Jeremy.
-
Andrew Tridgell
453a822a76 first pass at updating head branch to be to be the same as the SAMBA_2_0 branch -
Luke Leighton
00d4aebce9 more dfs stuff. this looks like it's going to be more appropriate to use
the vfs tables.  at the moment, i replaced all calls to unix_convert()
with unix_dfs_convert().

this does the job, but it's not very nice.
-
Luke Leighton
d9ada8b55d dfs issues -
Luke Leighton
5d1fad53c2 dfs parsed string length was being set explicitly to value "6", overwriting
the correct length.
-
Luke Leighton
270981960b Jean-Francois Micouleau's rewritten DFS patch, originally written by
Nigel Williams.  despite the data format being *exactly* the same as
NT's, this still doesn't work yet.  more work needed.
-
Tim Potter
cfddbdb624 Use VFS operations for file I/O. -
Matthew Chapman
ce24191939 Always null-terminate strings.
Also some string length and sizeof(pointer) corrections.
-
Matthew Chapman
a1d39af1ce UNICODE cleanup (see lib/util_unistr.c).
No more ugly static library buffers and all functions take a destination
string length (especially unistrcpy was rather dangerous; we were only
saved by the fact that datagrams are limited in size).
-
Jeremy Allison
81b9020891 Fixed -Wall -Wshadow warning.
Jeremy.
-
Jeremy Allison
1ef6d3bd63 Sync up with 2.0 code.
Added HPUX autoconf changes.
Added "gross hack" printer code.
Jeremy.
-
Jeremy Allison
c154b1601f Fixed crash bug which was assuming that fd_ptr was always non-null
(which is not the case with open directories).
Jeremy.
-
Jeremy Allison
92a7a86f0e Fixed NT modify timestamp issue.
If a client does a modify timestamp on an open file (which will
do no good at all on UNIX :-) then keep the modify request pending
in the files_struct and apply it at close instead.
Jeremy.
-
Andrew Tridgell
d9d44d98ec change ROUNDUP to SMB_ROUNDUP to prevent conflicts with system macros -
Jeremy Allison
4332bc06c6 Fixed a couple of issues with the SMB_QUERY_FILE_ALL_INFO query.
Ensured offset was being reported correctly for 64 bit file access,
ensured delete on close bit was being reported correctly.
Jeremy.
-
Andrew Tridgell
2565ccf9de volker was concerned about unique inode numbers and smbsh. This set of
changes uses the unique index number from a SMB_QUERY_FILE_ALL_INFO to
try to provide inode numbers. If it is 0 then use the hash of the
filename as before.
-
Jeremy Allison
222d686a6c Handle the case where multiple smbd have the file open, some of whom
don't have the ALLOW_DELETE_ON_CLOSE share flag enabled. Told you
this was fiddly code :-).
Jeremy.
-
Jeremy Allison
8de02620ea Make the new code conditional on lp_share_modes() just like the code in open_file_shared().
Jeremy.
-
Jeremy Allison
d815e2d7a6 Fixed debug reporting in the changed code.
Jeremy.
-
Jeremy Allison
269bca2b3b Fixed bug in previous commit where I was overwriting share_mode from
one fsp with that of another. Not good :-).
Jeremy.
-
Jeremy Allison
5e6a7cd99d Reasonably large change to give us *exactly* correct NT delete on close semantics.
This was trickier than it looks :-). Check out the new DELETE_ON_CLOSE
flag in the share modes and the new code that iterates through all open
files on the same device and inode in files.c and trans2.c

Also changed the code that modifies share mode entries to take
generic function pointers rather than doing a specific thing so
this sort of change should be easier in the future.

Jeremy.
-
Jeremy Allison
8e1ce307bd include/smb.h: Added #defines for lots of things - makes our code a *lot* easier to read.
lib/util.c: Fixed Luke's set_first_token() function - should return void.
smbd/close.c: Move delete_on_close into file_fd_struct structure.
smbd/ipc.c: Changed local_machine back to fstring.
smbd/nttrans.c: Use defines for mapping share modes.
smbd/open.c: Move delete_on_close into file_fd_struct structure, added code for ALLOW_SHARE_DELETE.
smbd/reply.c: Use defines for mapping share modes.
smbd/trans2.c: Move delete_on_close into file_fd_struct structure.
Jeremy.
-
Jeremy Allison
0b44d27d0b Fixed mainly signed/unsigned issues found by SGI cc in -fullwarn mode.
smbd/chgpasswd.c: Fixed (my) stupid bug where I was returning stack based variables. Doh !
smbd/trans2.c: Allows SETFILEINFO as well as QFILEINFO on directory handles.
Jeremy.
-
Jeremy Allison
76448d1d82 smbd/nttrans.c smbd/trans2.c: First fixes for NT5.0beta2. That redirector
has some *horrible* bugs !
smbwrapper/shared.c smbwrapper/smbsh.c smbwrapper/smbw.c: Fixed gcc warnings.
Jeremy.
-
Jeremy Allison
b8b781191d Fixed sys_lseek and seek_file calls so all returns
are *checked* :-).
Jeremy.
-
Andrew Tridgell
91d224735d only do the MAC extensions if we are a NTFS filesystem -
Jeremy Allison
514e52e4b4 trans2.h: Added Thursby MAC extension.
smbd/trans2.c: Added Thursby MAX extension.
libsmb/clientgen.c: Fixed smbtorture lock code.
Jeremy.
-
Andrew Tridgell
624097e8f4 fixed some cast warnings from "cc -64" on IRIX -
Andrew Tridgell
080fb61b69 added support for printing via smbwrapper
You can print using "cp filename /smb/SERVER/PRINTER/jobname"

You can list the current printqueue using ls
-
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.
-
Jeremy Allison
c3c5e13f85 First cut at kernel oplocks. This should have no effect unless runnin
on a machine that supports them in autoconf.

Move various functions out of lib/util.c into smbd/process.c
and smbd/oplock.c where they belong.

Jeremy.
-
Andrew Tridgell
24b8a757ae look at the CAP_NT_SMBS bit in the client capabilities to determine if
we should serve up volume labels as ascii or unicode.

NT wants ascii, W95 wants unicode. It's a crazy protocol!
-