cvs2svn Import User [Mon, 1 May 2000 00:44:53 +0000 (00:44 +0000)]
This commit was manufactured by cvs2svn to create tag
'release-alpha-2-5-1'.
Samba Release Account [Mon, 1 May 2000 00:44:52 +0000 (00:44 +0000)]
preparing for release of alpha.2.5.1
Luke Leighton [Sun, 30 Apr 2000 22:37:03 +0000 (22:37 +0000)]
more merge, and gratuitous merge.
Luke Leighton [Sun, 30 Apr 2000 14:52:42 +0000 (14:52 +0000)]
merge.
cvs2svn Import User [Sun, 30 Apr 2000 11:25:10 +0000 (11:25 +0000)]
This commit was manufactured by cvs2svn to create branch 'SAMBA_TNG'.
Andrew Tridgell [Sun, 30 Apr 2000 11:25:09 +0000 (11:25 +0000)]
some cleanups
Andrew Tridgell [Sun, 30 Apr 2000 11:15:27 +0000 (11:15 +0000)]
we don't need fnmatch.c any more
Andrew Tridgell [Sun, 30 Apr 2000 11:11:19 +0000 (11:11 +0000)]
changed masktest to test the internal algorithm against one server,
rather than 2 servers
Andrew Tridgell [Sun, 30 Apr 2000 11:04:28 +0000 (11:04 +0000)]
- 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
Andrew Tridgell [Sun, 30 Apr 2000 04:45:16 +0000 (04:45 +0000)]
YIPEE!!!!!
We finally have a perfect emulation of Microsoft wildcard
matching. The routine ms_fnmatch() does wildcard matching with all MS
wildcards (including the unicode wildcards), and masktest against a
NT4 workstation with hundreds of thousands of random exmaples has not
found a single error.
amazingly it is only about 60 lines of code, but it has taken us years
to get it right. I didn't sleep much last night :)
Elrond [Sat, 29 Apr 2000 11:23:31 +0000 (11:23 +0000)]
tdb update from HEAD
cvs2svn Import User [Sat, 29 Apr 2000 04:05:39 +0000 (04:05 +0000)]
This commit was manufactured by cvs2svn to create branch 'SAMBA_TNG'.
Andrew Tridgell [Sat, 29 Apr 2000 04:05:38 +0000 (04:05 +0000)]
put tdb utility functions in a separate file
Jeremy Allison [Sat, 29 Apr 2000 01:09:31 +0000 (01:09 +0000)]
Removed tdb locking calls (picky Andrew...:-)
Jeremy Allison [Fri, 28 Apr 2000 21:18:42 +0000 (21:18 +0000)]
Forgot to add new file...
Jeremy.
Jeremy Allison [Fri, 28 Apr 2000 21:10:43 +0000 (21:10 +0000)]
Port of new POSIX locking functionality from HEAD to TNG.
Also vfs de-init change.
Jeremy.
Jeremy Allison [Fri, 28 Apr 2000 21:09:26 +0000 (21:09 +0000)]
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.
cvs2svn Import User [Fri, 28 Apr 2000 20:54:24 +0000 (20:54 +0000)]
This commit was manufactured by cvs2svn to create branch 'SAMBA_TNG'.
Jeremy Allison [Fri, 28 Apr 2000 20:54:23 +0000 (20:54 +0000)]
Ok - this is the *third* implementation of this (third time's the charm :-).
This implementation keeps all POSIX lock records in a separate in memory
tdb database only known about in locking/posix.c. In addition, the pending
close fd's are also held in a tdb which has an array of fd's indexed by
device and inode.
The walk-split code uglyness has been moved to posix.c from brlock.c,
which is the only place that needs to know about it, and the extra
functions hacked into brlock to expose internal state have been removed.
This implementation passes smbtorture locktest4, the only thing I need
to check now for completeness is what to do about lock upgrade/downgrades
which Win32 allows under some *very* strange circumstances.
Jeremy.
Jeremy Allison [Fri, 28 Apr 2000 19:38:38 +0000 (19:38 +0000)]
Split off of POSIX locking into separate unit as Andrew requested.
Done so I don't lose my edits... :-).
Jeremy.
Shirish Kalele [Fri, 28 Apr 2000 18:36:47 +0000 (18:36 +0000)]
Added info level 1005 to netsharegetinfo (is the share a DFS root)
Added dfs_server announcement in set_default_server_announce_type()
Luke Leighton [Fri, 28 Apr 2000 08:45:46 +0000 (08:45 +0000)]
oh, dear, two commits-in-one.
1) spoolss code, wrote spoolss_getprinterdata then discovered i need
getprinter not data. argh!
2) returning uint32 results from cmd_* now, now void. fixup all sam
commands because that's the one where it's needed.
now, samedit -S \\server -U% -l log -c 'enumusers -u' will work, and
if it fails, samedit returns an exit status.
i want to abstract cli_error() so that i can parse NT_STATUSxxxxx into
a unix error code. cli_error() currently *has* to receive a cli_state
which is, like... bogus, in msrpc code.
Tim Potter [Fri, 28 Apr 2000 07:54:15 +0000 (07:54 +0000)]
Removed some debug messages.
Tim Potter [Fri, 28 Apr 2000 07:53:31 +0000 (07:53 +0000)]
Added constant for WINBINDD_DOMAIN environment variable.
Added domain parameter in winbindd_request data union.
Tim Potter [Fri, 28 Apr 2000 07:52:24 +0000 (07:52 +0000)]
#include stdlib.h for getenv()
Tim Potter [Fri, 28 Apr 2000 07:51:59 +0000 (07:51 +0000)]
Modified timeout parameters slightly. Still not happy with ntdom behaviour
when winbind daemon dies.
Pass contents of environment variable WINBINDD_DOMAIN to winbindd daemon
with each of {set,get,end}{pw,gr}ent() calls.
Removed pwent_ndx and grent_ndx statics for the moment - need to think
about how to implement server-side reuse of these in order to get clients
restarting from the correct point after when a get{pw,gr}ent() call has
been interrupted.
Tim Potter [Fri, 28 Apr 2000 07:48:21 +0000 (07:48 +0000)]
Remove code that rejected reuse = True for ncacn_np_use_add(). The correct
action is to create a new connection.
Tim Potter [Fri, 28 Apr 2000 07:44:56 +0000 (07:44 +0000)]
Set reuse to True in cli_connection_init_auth()
Jeremy Allison [Fri, 28 Apr 2000 02:06:19 +0000 (02:06 +0000)]
Added tdb_get/set_int_byblob, which takes a size_t len and then implemented
the tdb_get/set_int string functions in terms of them. Will be useful in storing
POSIX pending close records (which are ints but indexed by dev/inode pairs).
Jeremy.
Jeremy Allison [Fri, 28 Apr 2000 01:08:32 +0000 (01:08 +0000)]
Forgot to close when "posix locking" is set to False.
Jeremy.
Jeremy Allison [Fri, 28 Apr 2000 01:01:07 +0000 (01:01 +0000)]
Added optimization where we are single opener (don't free POSIX locks).
Jeremy.
Jeremy Allison [Fri, 28 Apr 2000 00:39:23 +0000 (00:39 +0000)]
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.
Jeremy Allison [Thu, 27 Apr 2000 23:28:56 +0000 (23:28 +0000)]
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.
Jeremy Allison [Thu, 27 Apr 2000 22:23:04 +0000 (22:23 +0000)]
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.
Jeremy Allison [Thu, 27 Apr 2000 21:12:33 +0000 (21:12 +0000)]
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.
Jeremy Allison [Thu, 27 Apr 2000 18:46:10 +0000 (18:46 +0000)]
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.
Jeremy Allison [Thu, 27 Apr 2000 17:15:49 +0000 (17:15 +0000)]
Fixed range check on writeX.
Jeremy.
Jeremy Allison [Thu, 27 Apr 2000 17:14:45 +0000 (17:14 +0000)]
Fixed range check on writeX.
Jeremy.
Jeremy Allison [Thu, 27 Apr 2000 17:05:35 +0000 (17:05 +0000)]
Tidyup of smbecho.
Elrond [Thu, 27 Apr 2000 17:02:52 +0000 (17:02 +0000)]
splitting clientgen.c like in HEAD, not yet complete, but
it still compiles.
finaly added "extern int DEBUGLEVEL;" to debug.h
Elrond [Thu, 27 Apr 2000 16:54:44 +0000 (16:54 +0000)]
cli_use_wait_keyboard(): Checking for NULL-pointers
Jeremy Allison [Thu, 27 Apr 2000 16:53:31 +0000 (16:53 +0000)]
Tidyup of smbecho.
Jeremy.
Elrond [Thu, 27 Apr 2000 13:50:06 +0000 (13:50 +0000)]
dropped in config.guess/config.sub from libtool-1.3.4,
cause libtool didn't any more build shared libraries on my
linux box.
Jeremy, I think, the main problem was, that you dropped in
only config.sub from HEAD, which was compatible with the
config.guess from TNG.
Tim Potter [Thu, 27 Apr 2000 08:37:46 +0000 (08:37 +0000)]
global_myworkgroup is a fstring, not a pstring
Tim Potter [Thu, 27 Apr 2000 07:58:11 +0000 (07:58 +0000)]
Create winbind daemon prototypes in a separate file in nsswitch directory.
Tim Potter [Thu, 27 Apr 2000 07:55:59 +0000 (07:55 +0000)]
make proto
Tim Potter [Thu, 27 Apr 2000 07:55:31 +0000 (07:55 +0000)]
Include winbindd.h instead of includes.h
Tim Potter [Thu, 27 Apr 2000 07:55:07 +0000 (07:55 +0000)]
Include only winbindd.h
Tim Potter [Thu, 27 Apr 2000 07:54:42 +0000 (07:54 +0000)]
Include only winbindd.h
Fixed memory leaks and dodgy free() calls found by insure.
Tim Potter [Thu, 27 Apr 2000 07:52:17 +0000 (07:52 +0000)]
Include only winbindd.h
Reinstated sigint signal handler.
Tim Potter [Thu, 27 Apr 2000 07:51:06 +0000 (07:51 +0000)]
Removed embarassing string function #undef hackery.
Changed license to LGPL from GPL so non-GPL applications can use it without
having to make their source code available.
Modifications to include the minimum amount of headers.
Tim Potter [Thu, 27 Apr 2000 07:47:15 +0000 (07:47 +0000)]
Let's all give a big hand to winbindd_proto.h which has made the big move
over from the include directory.
[FX: applause]
Tim Potter [Thu, 27 Apr 2000 07:46:13 +0000 (07:46 +0000)]
Types used by both nss ntdom library and winbind daemon. Used to live in
winbindd.h header file.
Tim Potter [Thu, 27 Apr 2000 07:46:11 +0000 (07:46 +0000)]
file winbindd_ntdom.h was initially added on branch SAMBA_TNG.
Tim Potter [Thu, 27 Apr 2000 07:45:32 +0000 (07:45 +0000)]
config.h equivalent for nss ntdom library.
cvs2svn Import User [Thu, 27 Apr 2000 07:45:31 +0000 (07:45 +0000)]
This commit was manufactured by cvs2svn to create branch 'SAMBA_TNG'.
Tim Potter [Thu, 27 Apr 2000 07:45:30 +0000 (07:45 +0000)]
file ntdom_config.h was initially added on branch SAMBA_TNG.
Tim Potter [Thu, 27 Apr 2000 07:42:01 +0000 (07:42 +0000)]
Moved from include directory.
Busted up into some other files so the nss ntdom module does not have to
pull in bucketloads of unnecessary other stuff.
Added #include of includes.h winbindd_proto.h so this file is the only one
necessary to include when compiling files for the winbind daemon.
Tim Potter [Thu, 27 Apr 2000 07:38:20 +0000 (07:38 +0000)]
Moved to nsswitch directory.
Tim Potter [Thu, 27 Apr 2000 07:36:44 +0000 (07:36 +0000)]
Don't #include winbindd.h anymore. It's been moved back to the
nsswitch directory.
Andrew Tridgell [Thu, 27 Apr 2000 07:36:06 +0000 (07:36 +0000)]
quick hack to get smbtorture working again
Luke Leighton [Thu, 27 Apr 2000 06:28:29 +0000 (06:28 +0000)]
couple of minor, important fixes. 1) andrew, i think your code doesn't
like blank files. 2) cli_NetServerEnum doesn't like NULL rparam returned.
Tim Potter [Thu, 27 Apr 2000 05:20:54 +0000 (05:20 +0000)]
Slight re-arrangment of definition of True, False, Auto macros.
Luke Leighton [Wed, 26 Apr 2000 11:21:32 +0000 (11:21 +0000)]
return results used.
Luke Leighton [Wed, 26 Apr 2000 11:02:38 +0000 (11:02 +0000)]
return result uint32 from cmds, lots of warnings.
Luke Leighton [Wed, 26 Apr 2000 08:32:16 +0000 (08:32 +0000)]
more merge, cvs main. compiles, now.
Luke Leighton [Wed, 26 Apr 2000 08:26:23 +0000 (08:26 +0000)]
more merge plus copied config.sub over from cvs main.
Luke Leighton [Wed, 26 Apr 2000 04:21:53 +0000 (04:21 +0000)]
more merge. easy (no complaints :) using dirdiff. hey, paul, dirdiff is
great!
jeremy, i renamed read_pipe and write_pipe to match your functions. i
still have write_then_read_pipe() because it does a write, then a read,
then a select(). still have to talk to andrew about this one :)
Tim Potter [Wed, 26 Apr 2000 03:27:26 +0000 (03:27 +0000)]
Don't bother trying to connect to winbindd daemon if the UNIX socket does
not exist.
Reinstated the security check on the UNIX socket - not sure where it went.
Jeremy Allison [Tue, 25 Apr 2000 20:36:28 +0000 (20:36 +0000)]
Same fix I just put into HEAD. Luke, I cannot compile tng at the moment
(configure fails with libtool failure ?) but this is the core of the
POSIX locking fix.
Map brl locks correctly into POSIX locks, including the
really nasty case of large range unlock.
There is a lot of pretty ASCII art in locking/brlock.c explaining
exactly how this code works. If it is unclear, please ask me.
Jeremy.
Jeremy Allison [Tue, 25 Apr 2000 20:30:58 +0000 (20:30 +0000)]
Added the hard code :-).
HEAD should now map brl locks correctly into POSIX locks, including the
really nasty case of large range unlock.
There is a lot of pretty ASCII art in locking/brlock.c explaining
exactly how this code works. If it is unclear, please ask me.
Jeremy.
Elrond [Tue, 25 Apr 2000 15:56:26 +0000 (15:56 +0000)]
merge from HEAD:
> fixed a parameter bug found by insure
> don't qsort a list less than 2 entries
This was just drop-in of nmbd_workgroupdb.c,
nmbd_incomingrequests.c and make proto.
Elrond [Tue, 25 Apr 2000 15:46:50 +0000 (15:46 +0000)]
merge from HEAD:
> fixed a memory leak I caused last week with my lines[] changes
> fixed another memory leak
Luke, we should maybe have a source/sync-status.txt, so
people (including us) know, which files are completely
in-sync with HEAD and one can just drop in the new
version, and for which files one needs to extract a diff
in HEAD and then apply that to TNG.
Elrond [Tue, 25 Apr 2000 15:30:45 +0000 (15:30 +0000)]
merge from HEAD:
> fixed a memory leak in nmblookup
Elrond [Tue, 25 Apr 2000 15:27:20 +0000 (15:27 +0000)]
merge from HEAD:
> use an size_t not a ssize_t when checking for out of bounds errors
> dump in a binary format
Elrond [Tue, 25 Apr 2000 15:15:17 +0000 (15:15 +0000)]
Doing some real stuff:
Rewrote lsa_query_info server-side API to use an
LSA_INFO_UNION.
Implemented server-side lsa auditsettings response, now
samba tells everybody, it audits everything. NT tells this
info only admins.
By trying to set the auditsettings, found the LSA_SET_INFO
opcode. I've also got the LSA_Q_SET_INFO-struct, but
neither the parser, nor the response-struct. I hope to add
the parser at least soon.
If you want to do something crazy and destroy your nt-box,
you could now write up the client-code for lsa_set_info and
try setting the member-name and sid. ("Don't do that at
home, kids!")
ordered netlogon-opcodes numericaly.
Andrew Tridgell [Tue, 25 Apr 2000 14:06:57 +0000 (14:06 +0000)]
moved trans2.h and nterr.h into includes.h with all our other includes
Andrew Tridgell [Tue, 25 Apr 2000 14:04:06 +0000 (14:04 +0000)]
split clientgen.c into several parts
the next step is splitting out the auth code, to make adding lukes
NTLMSSP support easier
Tim Potter [Tue, 25 Apr 2000 12:27:39 +0000 (12:27 +0000)]
Some bug fixes for connection caching code. Still seems to be some problem
with looking up group members in different domains.
Tim Potter [Tue, 25 Apr 2000 12:25:12 +0000 (12:25 +0000)]
Implemented robust handling of server failure.
Andrew Tridgell [Tue, 25 Apr 2000 01:17:45 +0000 (01:17 +0000)]
added TDB_MODIFY flag - patch from from luke
Andrew Tridgell [Tue, 25 Apr 2000 00:46:46 +0000 (00:46 +0000)]
fixed a memory leak in nmblookup
Andrew Tridgell [Tue, 25 Apr 2000 00:46:24 +0000 (00:46 +0000)]
fixed a memory leak of devmode in spoolss
this stuff is screaming out for talloc() rather than malloc/free
Andrew Tridgell [Tue, 25 Apr 2000 00:45:42 +0000 (00:45 +0000)]
don't qsort a list less than 2 entries
Jeremy Allison [Mon, 24 Apr 2000 20:48:40 +0000 (20:48 +0000)]
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.
Jeremy Allison [Mon, 24 Apr 2000 19:23:51 +0000 (19:23 +0000)]
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.
Andrew Tridgell [Mon, 24 Apr 2000 14:36:44 +0000 (14:36 +0000)]
dump in a binary format
Andrew Tridgell [Mon, 24 Apr 2000 14:36:25 +0000 (14:36 +0000)]
use an size_t not a ssize_t when checking for out of bounds errors
Samba Release Account [Mon, 24 Apr 2000 14:13:23 +0000 (14:13 +0000)]
preparing for release of alpha.2.5
Luke Leighton [Mon, 24 Apr 2000 14:09:52 +0000 (14:09 +0000)]
merge.
Andrew Tridgell [Mon, 24 Apr 2000 11:31:20 +0000 (11:31 +0000)]
moved INSURE hook into util.c
Andrew Tridgell [Mon, 24 Apr 2000 11:31:01 +0000 (11:31 +0000)]
fixed another memory leak
Andrew Tridgell [Mon, 24 Apr 2000 11:30:45 +0000 (11:30 +0000)]
fixed a parameter bug found by insure
Andrew Tridgell [Mon, 24 Apr 2000 11:30:24 +0000 (11:30 +0000)]
moved the INSURE hook into util.c
Luke Leighton [Mon, 24 Apr 2000 08:18:26 +0000 (08:18 +0000)]
sizeof(fstring) needed, not sizeof(arg).
Andrew Tridgell [Sun, 23 Apr 2000 14:25:36 +0000 (14:25 +0000)]
more pstring/fstring errors found by insure
Andrew Tridgell [Sun, 23 Apr 2000 14:25:04 +0000 (14:25 +0000)]
fixed a locking database bug - it was actually harmless except that
smbstatus could display the wrong filename when files change dev/inum
after a rename
Luke Leighton [Sun, 23 Apr 2000 13:25:12 +0000 (13:25 +0000)]
memory over-read. insure strikes again.
Luke Leighton [Sun, 23 Apr 2000 10:56:03 +0000 (10:56 +0000)]
more insure stuff.
Luke Leighton [Sun, 23 Apr 2000 10:32:38 +0000 (10:32 +0000)]
insure is cool.