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

899 Commits

Author SHA1 Message Date
Andrew Tridgell
60c04512a0 fixed error code for buffer_too_large in trans reply
(This used to be commit a0a556a36b)
2000-05-12 05:25:22 +00:00
Andrew Tridgell
dd8f9b5491 fixed a problem with appliance operation
(This used to be commit acf9286e82)
2000-05-12 05:10:32 +00:00
Andrew Tridgell
ebd73f37a2 use our primary domain trust account for trusted domain authentication
(This used to be commit db90a4b960)
2000-05-12 05:07:26 +00:00
Jeremy Allison
28d8970987 Check fstat return for error.
Jeremy.
(This used to be commit c54e77b1f9)
2000-05-12 00:11:49 +00:00
Jeremy Allison
612738a9e1 lib/util_unistr.c:
libsmb/clilist.c:
rpc_server/srv_spoolss_nt.c:
smbd/trans2.c: Changed unistr_to_ascii to unistr_to_dos - do codepage conversion.
msdfs/msdfs.c: Removed stub unistr_to_dos.
libsmb/pwd_cache.c: Removed obfuscation functions as they don't do anything and
					don't add any security.
Jeremy.
(This used to be commit 1ed146467e)
2000-05-10 22:47:09 +00:00
Andrew Tridgell
43a3faab08 - changed smb_getpwnam() to use winbind style usernames
- finished ntdom -> winbind rename in head
(This used to be commit ada483cb56)
2000-05-10 14:48:33 +00:00
Andrew Tridgell
a71d9b291c treat a blank "password server =" line as a "*" if in domain security
(This used to be commit 5a617c013c)
2000-05-10 13:21:32 +00:00
Andrew Tridgell
e86cba2194 check for sighup on each packet - otherwise it can take a _long_ time
to reload services
(This used to be commit 0fb4ba4e03)
2000-05-10 11:49:55 +00:00
Andrew Tridgell
a3d897cfb3 formatting fix
(This used to be commit 3e710f6602)
2000-05-10 11:45:16 +00:00
Andrew Tridgell
15c1b7663d patch from Dominik Kubla <dominik.kubla@uni-mainz.de>
(This used to be commit 9c598e571d)
2000-05-10 11:08:08 +00:00
Andrew Tridgell
49a0e6d598 more merging voodoo
this adds "#define OLD_NTDOMAIN 1" in lots of places. Don't panic -
this isn't permanent, it should go after another few merge steps have
been done
(This used to be commit 92109d7b3c)
2000-05-10 10:41:59 +00:00
Andrew Tridgell
ddc9b8b406 more merging
it is now at the stage that winbindd can compile in the head branch,
but not link
(This used to be commit d178c00aae)
2000-05-10 09:49:55 +00:00
Herb Lewis
c88222da0c Fix for misunderstanding of fsync added when vfs layer
was done. Samba was doing fsync's (bleagh).
Jeremy.
(This used to be commit f9a52cadbf)
2000-05-10 01:31:46 +00:00
Herb Lewis
f7089e3cba Fix for check_kernel_oplocks looking for the var directory
before it may need to be created.
Jeremy.
(This used to be commit 6bf74da8b8)
2000-05-09 22:07:07 +00:00
Herb Lewis
4fb6ca6677 This is reall Jeremy commiting as Herb at SGI labs. Fix
for "socket operation on non-socket" error in log.smb
on HEAD branch startup (server_fd not initialized to -1).
Jeremy.
(This used to be commit ebb4f76550)
2000-05-09 22:05:39 +00:00
Andrew Tridgell
4c061ca15c - use smb_gwtpwnam() in another couple of places
- don't call add/del user if the scripts are empty
(This used to be commit 43860215d4)
2000-05-09 15:09:52 +00:00
Andrew Tridgell
2958dfcdf8 added secrets.tdb and changed storage of trust account password to use
it
(This used to be commit 88ad00b82a)
2000-05-08 10:42:21 +00:00
Andrew Tridgell
2684f50849 fixed a vfs crash bug
(This used to be commit 76da586396)
2000-05-06 15:00:49 +00:00
Jeremy Allison
652d98c0bc Fix for dual unix_to_dos conversion in readdir from A.V.Shutko <AVShutko@mail.khstu.ru>
Jeremy.
(This used to be commit 1152f2ed00)
2000-05-05 19:57:02 +00:00
Jeremy Allison
a12b2cd9e8 Fix for read_file() returning -1.
Jeremy.
(This used to be commit b899943658)
2000-05-05 02:39:02 +00:00
Jeremy Allison
045469493c rpc_server/srv_lsa.c: Bring into sync with 2.0.x.
rpc_server/srv_pipe_hnd.c: Bring into sync with 2.0.x.
smbd/blocking.c: Improve blocking debug reporting.
utils/torture.c: Added check for NT locking bug.
Jeremy.
(This used to be commit e8ff6d3fb5)
2000-05-04 21:57:28 +00:00
Andrew Tridgell
f6844e0b7e a minimal change to get appliance mode to work with winbindd
we needed to accept usernames of the form DOMAIN/user, which means we
needed to pass the domain to a getpwnam() like routine in certain
critical spots.

What I'd rather do is get rid of "char *user" everywhere and use the
new userdom_struct, but that will have to wait a few days.
(This used to be commit 8b7a10febe)
2000-05-04 16:01:47 +00:00
Andrew Tridgell
f3a861e04e - use full_name instead of real_name
- got rid of guest map code in lpq parser
(This used to be commit 8e53f781d3)
2000-05-04 07:59:34 +00:00
Andrew Tridgell
6ed606cab4 if the stat cache is off then don't initialise it
(This used to be commit cd5dcd9e65)
2000-05-04 06:28:38 +00:00
Jeremy Allison
99352a0986 Insure uninitialized memory read fixes.
Jeremy.
(This used to be commit 577ddbfbec)
2000-05-03 02:24:01 +00:00
Andrew Tridgell
32d5416b6a split the username in the vuser structure into a separate
userdom_struct. As the name implies this also contains a domain
(unused at the moment).

This will be important shortly, as operation in appliance mode needs
the domain to be always carried with the username.
(This used to be commit ee8546342d)
2000-05-02 13:55:42 +00:00
Andrew Tridgell
c39e2e6f9a fixed a memory leak (calling hash_table_init twice)
(This used to be commit 610fcef4d3)
2000-05-02 07:10:54 +00:00
Jeremy Allison
ba020b0612 Moved uglyness needed in fcntl locking (64->32 bit mapping, NFS
errors etc.) into locking/posix.c, where it is needed. fcntl_lock in lib/util.c
is now very small and clean.
Added (*lock) op to vfs layer.
Jeremy.
(This used to be commit 46092ee141)
2000-05-02 03:20:47 +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
05cb3464f9 - added some error checking
- removed the VTP hook in smbd
(This used to be commit 09355fcd50)
2000-04-30 15:13:15 +00:00
Andrew Tridgell
29ba16f792 fixed dptr_wcard handling (need to use strdup)
(This used to be commit 0bab030074)
2000-04-30 14:59:00 +00:00
Andrew Tridgell
cb6327cd2d removed more cruft from our old wildcard matching code
(This used to be commit 4a15924ffe)
2000-04-30 14:34:31 +00:00
Andrew Tridgell
0f35ded18e go back to ascii in SMB_FIND_FILE_BOTH_DIRECTORY_INFO
NT gives out unicode, but NT clients can't handle a unicode response!
(This used to be commit 85d634974f)
2000-04-30 14:30:47 +00:00
Andrew Tridgell
34cd425c1d fixed our smbsearch code. We now store the mask with the dptr, this
turns out to be essential for a correct implementation (there ins't
enough room to store all possible masks in the status return
structure!)
(This used to be commit 38f5e13367)
2000-04-30 14:29:45 +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
46d66938e7 Moved deletion of vfs handle into smbd/conn.c as it was being done too
soon in smbd/service.c (file operations were being done after the
handle was closed).

It looks cleaner in smbd/conn.c as it is part of the closing of a conn
struct anyway.

Jeremy.
(This used to be commit 858eb53dc5)
2000-04-28 21:09:26 +00:00
Jeremy Allison
be828fcec8 Made changes suggested by Andrew review.
fd_close now calls fd_close_posix() directly.
set_posix_lock/release_posix_lock() now handle the reference counting.
More changes due when this gets moved to the file locking/posix.c
Jeremy.
(This used to be commit 239abd48f0)
2000-04-28 00:39:23 +00:00
Jeremy Allison
4b60a33c6f Ok - this is more subtle than it looks :-).
When a file is being closed, once it passes the fnum and tid tests then
the locking context should be ignored when removing all locks. This is
what is done in the brl close case, but when you have outstanding
POSIX locks, then you cannot remove all the brl locks in one go, you
have to get the lock list and call do_unlock individually. As this
uses global_smbpid as the locking context, you need to make sure
that this is set correctly for the specific lock being removed. I
now do this by storing the smbpid in each entry in the unlock list returned from
the query call. I removed the smbpid from fsp (not needed) and
things seem ok (even with the stupid smbpid tricks that smbtorture plays :-).

Jeremy.
(This used to be commit 6baa96bb46)
2000-04-27 23:28:56 +00:00
Jeremy Allison
36db78feda Fixed subtle unlocking bug when a file is closed. We need to store the
smbpid used when a file was opened in the files_struct. Else we use
the wrong global_smbpid when we are closing the file and trying to
remove the brl locks - this causes the brl locks to be left when the
file is closed as the samba_context check fails.
Jeremy.
(This used to be commit 2746e5602e)
2000-04-27 22:23:04 +00:00
Jeremy Allison
3d3c50326b Did the rewrite Andrew wanted where all knowledge of POSIX locking is
removed from the smbd/open.c code.
We now use a dlink list of structures indexed by dev/inode to store
all pending fd's for close. This could be rewritten to use lib/hash.c
if this is discovered to be too slow in use.
Andrew, please take a look and let me know if this is what you
had in mind.
Jeremy.
(This used to be commit 0487841120)
2000-04-27 21:12:33 +00:00
Jeremy Allison
e3987ff7a6 Fixed crash bugs Andrew pointed out with LOCK4 smbtorture
test. Was miscounting posix locks, plus was not taking into account
the case where other_fsp == fsp in the 'move locks' case. DOH ! This
code will be re-written anyway :-).
Jeremy.
(This used to be commit 5278ec016c)
2000-04-27 18:46:10 +00:00
Jeremy Allison
3d9141d415 Fixed range check on writeX.
Jeremy.
(This used to be commit 9cde198108)
2000-04-27 17:14:45 +00:00
Jeremy Allison
c4af7ad8dc Tidyup of smbecho.
Jeremy.
(This used to be commit 4a4b7a994b)
2000-04-27 16:53:31 +00:00
Andrew Tridgell
00e3fe1324 moved trans2.h and nterr.h into includes.h with all our other includes
(This used to be commit d7cd7c88fd)
2000-04-25 14:06:57 +00:00
Jeremy Allison
644f22ac61 Added the code that keeps fd's open across a close if there are other fsp's
open on the same dev/inode pair with existing POSIX locks.

This is done at the smbd/open layer, so smbd just calls fd_close() and
the transfer of any open fd's is done under the covers of fd_close().
When an fsp is closed and no other fsp's open on the same dev/inode
pair have existing POSIX locks then all fd's associated with this fsp
are closed.

Now only the hard part of doing the POSIX range unlock code when read
locks overlap remains for full POSIX/SMB lock integration....

Jeremy.
(This used to be commit 1df48ed55e)
2000-04-24 20:48:40 +00:00
Jeremy Allison
e82dbfcbe9 Now that fsp's are created on successful file open, the structure member
fsp->open is no longer needed (if an fsp pointer is valid, then it's open :-).

NB for Luke, this patch also did not apply to TNG. TNG is not yet
identical w.r.t file serving with HEAD. This makes it impossible for
me to help maintain TNG. Please fix asap.

lib/substitute.c: Removed unused variable (pidstr).

Jeremy.
(This used to be commit 389b700a26)
2000-04-24 19:23:51 +00:00
Andrew Tridgell
73417c07f7 moved INSURE hook into util.c
(This used to be commit 2fba24ef0e)
2000-04-24 11:31:20 +00:00
Andrew Tridgell
7fcdb8fb7e fixed two uninitialised memory references
(This used to be commit e4ddd1a4a9)
2000-04-23 07:44:01 +00:00
Andrew Tridgell
c389bd2d6b trick to get full stack trace when using the free version of insure
(This used to be commit bb9b3e03de)
2000-04-23 07:43:32 +00:00
Andrew Tridgell
d44ae9e229 insure caught an uninitialised memory reference - ensure it starts as
zero
(This used to be commit 53077295b7)
2000-04-23 07:42:13 +00:00